summaryrefslogtreecommitdiff
path: root/arch/arm/mach-imx
diff options
context:
space:
mode:
authorRobin Gong <yibin.gong@nxp.com>2018-04-13 19:35:12 +0800
committerLeonard Crestez <leonard.crestez@nxp.com>2018-08-24 12:41:33 +0300
commite6fe6e5a1c72d04f3e2452222cc70295a4e15e34 (patch)
tree2456a980cc05917a9e99d38ed32d6ffdd00ca3cc /arch/arm/mach-imx
parent6d596d4c6532025987a982aa94b801b2f3d9c337 (diff)
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> (cherry picked from commit e069300629d4cba26a2812c85f37ccaf0bd2e683)
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r--arch/arm/mach-imx/pm-imx7ulp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/pm-imx7ulp.c b/arch/arm/mach-imx/pm-imx7ulp.c
index 63fe0d4ed7f5..b4789a305742 100644
--- a/arch/arm/mach-imx/pm-imx7ulp.c
+++ b/arch/arm/mach-imx/pm-imx7ulp.c
@@ -788,6 +788,7 @@ static irqreturn_t imx7ulp_nmi_isr(int irq, void *param)
{
writel_relaxed(readl_relaxed(mu_base + MU_SR) | MU_B_SR_NMIC,
mu_base + MU_SR);
+ pm_system_wakeup();
return IRQ_HANDLED;
}