Skip to content

Commit b7b2796

Browse files
Anson-HuangJassiBrar
authored andcommitted
mailbox: imx: ONLY IPC MU needs IRQF_NO_SUSPEND flag
IPC MU has no power domain assigned and there could be IPC during noirq suspend phase, so IRQF_NO_SUSPEND flag is needed for IPC MU. However, for other MUs, they have power domain assigned and their power will be turned off during noirq suspend phase, but with IRQF_NO_SUSPEND set, their interrupts are NOT disabled even after their power turned off, it will cause system crash when mailbox driver trys to handle pending interrupts but the MU power is already turned off. So, IRQF_NO_SUSPEND flag should ONLY be added to IPC MU which has power domain managed by SCU, then all other MUs' pending interrupts after noirq suspend phase will be handled after system resume. Signed-off-by: Anson Huang <[email protected]> Signed-off-by: Jassi Brar <[email protected]>
1 parent bb2b262 commit b7b2796

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

drivers/mailbox/imx-mailbox.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ static int imx_mu_startup(struct mbox_chan *chan)
292292
{
293293
struct imx_mu_priv *priv = to_imx_mu_priv(chan->mbox);
294294
struct imx_mu_con_priv *cp = chan->con_priv;
295+
unsigned long irq_flag = IRQF_SHARED;
295296
int ret;
296297

297298
pm_runtime_get_sync(priv->dev);
@@ -302,8 +303,12 @@ static int imx_mu_startup(struct mbox_chan *chan)
302303
return 0;
303304
}
304305

305-
ret = request_irq(priv->irq, imx_mu_isr, IRQF_SHARED |
306-
IRQF_NO_SUSPEND, cp->irq_desc, chan);
306+
/* IPC MU should be with IRQF_NO_SUSPEND set */
307+
if (!priv->dev->pm_domain)
308+
irq_flag |= IRQF_NO_SUSPEND;
309+
310+
ret = request_irq(priv->irq, imx_mu_isr, irq_flag,
311+
cp->irq_desc, chan);
307312
if (ret) {
308313
dev_err(priv->dev,
309314
"Unable to acquire IRQ %d\n", priv->irq);

0 commit comments

Comments
 (0)