From: Richard Zhu <hongxing.zhu@nxp.com>
To: jassisinghbrar@gmail.com, o.rempel@pengutronix.de,
daniel.baluta@nxp.com, aisheng.dong@nxp.com
Cc: linux-imx@nxp.com, linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Richard Zhu <hongxing.zhu@nxp.com>
Subject: [RESEND PATCH v5 2/4] mailbox: imx: Clear the right interrupts at shutdown
Date: Mon, 5 Aug 2019 12:52:20 +0800 [thread overview]
Message-ID: <1564980742-19124-3-git-send-email-hongxing.zhu@nxp.com> (raw)
In-Reply-To: <1564980742-19124-1-git-send-email-hongxing.zhu@nxp.com>
From: Daniel Baluta <daniel.baluta@nxp.com>
Make sure to only clear enabled interrupts keeping count
of the connection type.
Suggested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
---
drivers/mailbox/imx-mailbox.c | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)
diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c
index 1eeabc5..afe625e 100644
--- a/drivers/mailbox/imx-mailbox.c
+++ b/drivers/mailbox/imx-mailbox.c
@@ -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));
+ 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);
}
--
2.7.4
next prev parent reply other threads:[~2019-08-05 5:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-05 4:52 [PATCH v5 0/4] mailbox: imx: bug fix and add support for imx v1 mu Richard Zhu
2019-08-05 4:52 ` [RESEND PATCH v5 1/4] mailbox: imx: Fix Tx doorbell shutdown path Richard Zhu
2019-08-05 4:52 ` Richard Zhu [this message]
2019-08-05 4:52 ` [RESEND PATCH v5 3/4] dt-bindings: mailbox: imx-mu: add imx7ulp MU support Richard Zhu
2019-08-05 19:20 ` Daniel Baluta
2019-08-05 4:52 ` [RESEND PATCH v5 4/4] mailbox: imx: add support for imx v1 mu Richard Zhu
2019-08-05 19:21 ` Daniel Baluta
2019-10-08 7:25 ` Daniel Baluta
2019-10-09 1:47 ` [EXT] " Richard Zhu
2019-10-12 1:12 ` Richard Zhu
2019-10-12 7:24 ` Daniel Baluta
[not found] ` <CAEnQRZDk4TjU0nWgGXEV06ZygvSyuPHc61_uT7KRu0j2Aaxj7w@mail.gmail.com>
2019-10-29 21:02 ` Jassi Brar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1564980742-19124-3-git-send-email-hongxing.zhu@nxp.com \
--to=hongxing.zhu@nxp.com \
--cc=aisheng.dong@nxp.com \
--cc=daniel.baluta@nxp.com \
--cc=jassisinghbrar@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).