提交 5f0af07e 编写于 作者: D Daniel Baluta 提交者: 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: NOleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: NDaniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: NRichard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: NDong Aisheng <aisheng.dong@nxp.com>
Signed-off-by: NJassi Brar <jaswinder.singh@linaro.org>
上级 bf159d15
......@@ -219,8 +219,19 @@ static void imx_mu_shutdown(struct mbox_chan *chan)
return;
}
imx_mu_xcr_rmw(priv, 0, IMX_MU_xCR_TIEn(cp->idx) |
IMX_MU_xCR_RIEn(cp->idx) | IMX_MU_xCR_GIEn(cp->idx));
switch (cp->type) {
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);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册