MLK-17072-1: soc: imx: sc: ipc: enable MU interrupt as wakeup source
authorRobin Gong <yibin.gong@nxp.com>
Mon, 4 Dec 2017 06:57:13 +0000 (14:57 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:50:04 +0000 (14:50 -0500)
commitc54bf1eb47731128741563329744dbd23764dbd6
treedc26d70d864062512c37f4db4a62d7e78576cb5e
parenta78dcc5c2deffb6e04b349161041d6f7f8c3ccbe
MLK-17072-1: soc: imx: sc: ipc: enable MU interrupt as wakeup source

Currently, kernel still can be wakeup-ed by MU even without enabling it
as a wakeup source. That's because of MU never off in suspend and scfw
can wakeup A53 if MU interrupt not disabled or masked in GIC. But in a
corner case that the MU interrupt coming after suspend_device_irqs, MU
interrupt will be masked by below code in handle_fasteoi_irq:

  if (unlikely(!desc->action || irqd_irq_disabled(&desc->irq_data))) {
desc->istate |= IRQS_PENDING;
mask_irq(desc);
goto out;
  }
Thus, next MU interrupt after kernel suspend can't wakeup A53 since it's
masked in GIC and scfw can't see the 'wakeup' interrupt to power up A53.
But from kernel view, that's ok since MU interrupt not set to a wakeup
source. Enable MU as a wakeup source to follow the normal kernel wakeup
device/source flow.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
drivers/soc/imx/sc/main/ipc.c