Skip to content

Commit 892cb52

Browse files
Robin GongJassiBrar
authored andcommitted
mailbox: imx: fix wakeup failure from freeze mode
Since IRQF_NO_SUSPEND used for imx mailbox driver, that means this irq can't be used for wakeup source so that can't wakeup from freeze mode. Add pm_system_wakeup() to wakeup from freeze mode. Fixes: b7b2796("mailbox: imx: ONLY IPC MU needs IRQF_NO_SUSPEND flag") Reviewed-by: Jacky Bai <[email protected]> Reviewed-by: Peng Fan <[email protected]> Signed-off-by: Robin Gong <[email protected]> Signed-off-by: Peng Fan <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent af2dfa9 commit 892cb52

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/mailbox/imx-mailbox.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#include <linux/module.h>
1515
#include <linux/of_device.h>
1616
#include <linux/pm_runtime.h>
17+
#include <linux/suspend.h>
1718
#include <linux/slab.h>
1819

1920
#define IMX_MU_CHANS 16
@@ -76,6 +77,7 @@ struct imx_mu_priv {
7677
const struct imx_mu_dcfg *dcfg;
7778
struct clk *clk;
7879
int irq;
80+
bool suspend;
7981

8082
u32 xcr[4];
8183

@@ -334,6 +336,9 @@ static irqreturn_t imx_mu_isr(int irq, void *p)
334336
return IRQ_NONE;
335337
}
336338

339+
if (priv->suspend)
340+
pm_system_wakeup();
341+
337342
return IRQ_HANDLED;
338343
}
339344

@@ -702,6 +707,8 @@ static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
702707
priv->xcr[i] = imx_mu_read(priv, priv->dcfg->xCR[i]);
703708
}
704709

710+
priv->suspend = true;
711+
705712
return 0;
706713
}
707714

@@ -723,6 +730,8 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
723730
imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]);
724731
}
725732

733+
priv->suspend = false;
734+
726735
return 0;
727736
}
728737

0 commit comments

Comments
 (0)