diff mbox series

mailbox: imx: keep MU irq working during suspend/resume

Message ID 1549974905-12116-1-git-send-email-Anson.Huang@nxp.com (mailing list archive)
State Mainlined, archived
Commit 17b860bbfc844a3d8e38135ef430d4af8e436b9e
Headers show
Series mailbox: imx: keep MU irq working during suspend/resume | expand

Commit Message

Anson Huang Feb. 12, 2019, 12:40 p.m. UTC
During noirq suspend phase, mailbox MU irq will be masked
but many drivers still need to communicate with system
controller firmware via mailbox, if MU irq is masked, it
will cause RPC timeout as below:

[   23.372103] imx-scu scu: RPC send msg timeout

Setting MU irq to be wakeup source is NOT working as GIC
driver does NOT have .irq_set_wake implemented, so to
support suspend/resume, just make imx mailbox driver NOT
suspend, since MU is always a wakeup source on i.MX platforms
with system controller inside, and its power/clock is
maintained by system controller, mailbox driver no need
to manage them.

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
---
 drivers/mailbox/imx-mailbox.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Anson Huang March 11, 2019, 7:42 a.m. UTC | #1
Ping...

Best Regards!
Anson Huang

> -----Original Message-----
> From: Anson Huang [mailto:Anson.Huang@nxp.com]
> Sent: 2019年2月12日 20:40
> To: jassisinghbrar@gmail.com; shawnguo@kernel.org;
> s.hauer@pengutronix.de; kernel@pengutronix.de; festevam@gmail.com;
> linux-kernel@vger.kernel.org; linux-arm-kernel@lists.infradead.org
> Cc: dl-linux-imx <linux-imx@nxp.com>
> Subject: [PATCH] mailbox: imx: keep MU irq working during suspend/resume
> 
> During noirq suspend phase, mailbox MU irq will be masked but many
> drivers still need to communicate with system controller firmware via
> mailbox, if MU irq is masked, it will cause RPC timeout as below:
> 
> [   23.372103] imx-scu scu: RPC send msg timeout
> 
> Setting MU irq to be wakeup source is NOT working as GIC driver does NOT
> have .irq_set_wake implemented, so to support suspend/resume, just make
> imx mailbox driver NOT suspend, since MU is always a wakeup source on
> i.MX platforms with system controller inside, and its power/clock is
> maintained by system controller, mailbox driver no need to manage them.
> 
> Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
> ---
>  drivers/mailbox/imx-mailbox.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
> index 774362a..85fc5b5 100644
> --- a/drivers/mailbox/imx-mailbox.c
> +++ b/drivers/mailbox/imx-mailbox.c
> @@ -187,8 +187,8 @@ static int imx_mu_startup(struct mbox_chan *chan)
>  		return 0;
>  	}
> 
> -	ret = request_irq(priv->irq, imx_mu_isr, IRQF_SHARED, cp->irq_desc,
> -			  chan);
> +	ret = request_irq(priv->irq, imx_mu_isr, IRQF_SHARED |
> +			  IRQF_NO_SUSPEND, cp->irq_desc, chan);
>  	if (ret) {
>  		dev_err(priv->dev,
>  			"Unable to acquire IRQ %d\n", priv->irq);
> --
> 2.7.4
diff mbox series

Patch

diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 774362a..85fc5b5 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -187,8 +187,8 @@  static int imx_mu_startup(struct mbox_chan *chan)
 		return 0;
 	}
 
-	ret = request_irq(priv->irq, imx_mu_isr, IRQF_SHARED, cp->irq_desc,
-			  chan);
+	ret = request_irq(priv->irq, imx_mu_isr, IRQF_SHARED |
+			  IRQF_NO_SUSPEND, cp->irq_desc, chan);
 	if (ret) {
 		dev_err(priv->dev,
 			"Unable to acquire IRQ %d\n", priv->irq);