提交 017b8756 编写于 作者: R Robin Gong 提交者: Zheng Zengkai

mailbox: imx: fix wakeup failure from freeze mode

stable inclusion
from stable-v5.10.110
commit a16f5ae8ade1644250a934198431f3018663e57b
bugzilla: https://gitee.com/openeuler/kernel/issues/I574AL

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a16f5ae8ade1644250a934198431f3018663e57b

--------------------------------

commit 892cb524 upstream.

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: b7b2796b("mailbox: imx: ONLY IPC MU needs IRQF_NO_SUSPEND flag")
Reviewed-by: NJacky Bai <ping.bai@nxp.com>
Reviewed-by: NPeng Fan <peng.fan@nxp.com>
Signed-off-by: NRobin Gong <yibin.gong@nxp.com>
Signed-off-by: NPeng Fan <peng.fan@nxp.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYu Liao <liaoyu15@huawei.com>
Reviewed-by: NWei Li <liwei391@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 e63b1b9b
......@@ -13,6 +13,7 @@
#include <linux/module.h>
#include <linux/of_device.h>
#include <linux/pm_runtime.h>
#include <linux/suspend.h>
#include <linux/slab.h>
#define IMX_MU_xSR_GIPn(x) BIT(28 + (3 - (x)))
......@@ -66,6 +67,7 @@ struct imx_mu_priv {
const struct imx_mu_dcfg *dcfg;
struct clk *clk;
int irq;
bool suspend;
u32 xcr;
......@@ -277,6 +279,9 @@ static irqreturn_t imx_mu_isr(int irq, void *p)
return IRQ_NONE;
}
if (priv->suspend)
pm_system_wakeup();
return IRQ_HANDLED;
}
......@@ -326,6 +331,8 @@ static int imx_mu_startup(struct mbox_chan *chan)
break;
}
priv->suspend = true;
return 0;
}
......@@ -543,6 +550,8 @@ static int imx_mu_probe(struct platform_device *pdev)
clk_disable_unprepare(priv->clk);
priv->suspend = false;
return 0;
disable_runtime_pm:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册