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>
err);
}
+ err = irq_set_irq_wake(irq, 1);
+ if (err) {
+ pr_info("set mu irq wake up error %d.\n", err);
+ return err;
+ }
+
if (!scu_mu_init) {
uint32_t i;