mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mailbox: imx: Clear the right interrupts at shutdown
[ Upstream commit 5f0af07e89199ac51cdd4f25bc303bdc703f4e9c ] Make sure to only clear enabled interrupts keeping count of the connection type. Suggested-by: Oleksij Rempel <[email protected]> Signed-off-by: Daniel Baluta <[email protected]> Signed-off-by: Richard Zhu <[email protected]> Reviewed-by: Dong Aisheng <[email protected]> Signed-off-by: Jassi Brar <[email protected]> Signed-off-by: Sasha Levin <[email protected]>
This commit is contained in:
parent
e3ef5071a5
commit
c1a6e48c0c
1 changed files with 13 additions and 2 deletions
|
|
@ -217,8 +217,19 @@ static void imx_mu_shutdown(struct mbox_chan *chan)
|
|||
if (cp->type == IMX_MU_TYPE_TXDB)
|
||||
tasklet_kill(&cp->txdb_tasklet);
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue