Commit 5f0af07e authored by Daniel Baluta's avatar Daniel Baluta Committed by Jassi Brar

mailbox: imx: Clear the right interrupts at shutdown

Make sure to only clear enabled interrupts keeping count
of the connection type.
Suggested-by: default avatarOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: default avatarRichard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: default avatarDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent bf159d15
...@@ -219,8 +219,19 @@ static void imx_mu_shutdown(struct mbox_chan *chan) ...@@ -219,8 +219,19 @@ static void imx_mu_shutdown(struct mbox_chan *chan)
return; return;
} }
imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx) | switch (cp->type) {
IMX_MU_xCR_RIEn(cp->idx) | IMX_MU_xCR_GIEn(cp->idx)); case IMX_MU_TYPE_TX:
imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx));
break;
case IMX_MU_TYPE_RX:
imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_RIEn(cp->idx));
break;
case IMX_MU_TYPE_RXDB:
imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_GIEn(cp->idx));
break;
default:
break;
}
free_irq(priv->irq, chan); free_irq(priv->irq, chan);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment