mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 15:18:19 +00:00
mailbox: imx: fix wakeup failure from freeze mode
commit 892cb524ae
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: b7b2796b9b31e("mailbox: imx: ONLY IPC MU needs IRQF_NO_SUSPEND flag")
Reviewed-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jassi Brar <jaswinder.singh@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8cbf4ae7a2
commit
c78d23ea75
1 changed files with 9 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include <linux/module.h>
|
#include <linux/module.h>
|
||||||
#include <linux/of_device.h>
|
#include <linux/of_device.h>
|
||||||
#include <linux/pm_runtime.h>
|
#include <linux/pm_runtime.h>
|
||||||
|
#include <linux/suspend.h>
|
||||||
#include <linux/slab.h>
|
#include <linux/slab.h>
|
||||||
|
|
||||||
#define IMX_MU_CHANS 16
|
#define IMX_MU_CHANS 16
|
||||||
|
@ -67,6 +68,7 @@ struct imx_mu_priv {
|
||||||
const struct imx_mu_dcfg *dcfg;
|
const struct imx_mu_dcfg *dcfg;
|
||||||
struct clk *clk;
|
struct clk *clk;
|
||||||
int irq;
|
int irq;
|
||||||
|
bool suspend;
|
||||||
|
|
||||||
u32 xcr[4];
|
u32 xcr[4];
|
||||||
|
|
||||||
|
@ -307,6 +309,9 @@ static irqreturn_t imx_mu_isr(int irq, void *p)
|
||||||
return IRQ_NONE;
|
return IRQ_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (priv->suspend)
|
||||||
|
pm_system_wakeup();
|
||||||
|
|
||||||
return IRQ_HANDLED;
|
return IRQ_HANDLED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -652,6 +657,8 @@ static int __maybe_unused imx_mu_suspend_noirq(struct device *dev)
|
||||||
priv->xcr[i] = imx_mu_read(priv, priv->dcfg->xCR[i]);
|
priv->xcr[i] = imx_mu_read(priv, priv->dcfg->xCR[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->suspend = true;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -673,6 +680,8 @@ static int __maybe_unused imx_mu_resume_noirq(struct device *dev)
|
||||||
imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]);
|
imx_mu_write(priv, priv->xcr[i], priv->dcfg->xCR[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
priv->suspend = false;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue