MLK-18004: ARM: imx: pm-imx7ulp: fix resume failure in freeze mode
authorRobin Gong <yibin.gong@nxp.com>
Fri, 13 Apr 2018 11:35:12 +0000 (19:35 +0800)
committerRobin Gong <yibin.gong@nxp.com>
Fri, 13 Apr 2018 13:31:20 +0000 (21:31 +0800)
commite069300629d4cba26a2812c85f37ccaf0bd2e683
treed8dfc4096ad7f9afc63d40fd067c7a00045b0007
parent7562b8f9044ee46885ca0576696a765e100324fb
MLK-18004: ARM: imx: pm-imx7ulp: fix resume failure in freeze mode

This patch fix resume failure in freeze suspend mode on i.mx7ULP
("echo freeze > /sys/power/state") while pressing onoff key or
enabling rtc alarm wakeup. In freeze mode, kernel can only be woken
up by drivers which register wakup source such as 'device_init_wakeup'
or 'irq_set_irq_wake', otherwise, kernel will wait for irq handler
freeze_wake(). Unfortunately, our NMI interrupt which used to wakeup
A7 by M4 is not a common device and request irq as 'IRQF_NO_SUSPEND'
which means feeze_wake() never get chance to run while wakeup by any
event from M4 such as RTC, ONOFF. In this case, use pm_system_wakeup()
instead in NMI interrupt handle to trigger freeze_wake() directly.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
arch/arm/mach-imx/pm-imx7ulp.c