mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 10:09:10 +02:00
mailbox: imx: Move the RXDB part of the mailbox into the threaded handler
Move RXDB callback handling into the threaded handler. This similar to the RX side and since the imx_mu_dcfg::rxdb callback can return an error, the interrupt is only enabled on success. Move RXDB callback handling into the threaded handler. Reviewed-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Jassi Brar <jassisinghbrar@gmail.com>
This commit is contained in:
parent
e55bea377d
commit
3225a745f5
|
|
@ -554,6 +554,11 @@ static irqreturn_t imx_mu_isr_th(int irq, void *p)
|
|||
imx_mu_xcr_set_act(priv, cp, IMX_MU_RCR, IMX_MU_xCR_RIEn(priv->dcfg->type, cp->idx));
|
||||
break;
|
||||
|
||||
case IMX_MU_TYPE_RXDB:
|
||||
if (!priv->dcfg->rxdb(priv, cp))
|
||||
imx_mu_xcr_set_act(priv, cp, IMX_MU_GIER, IMX_MU_xCR_GIEn(priv->dcfg->type, cp->idx));
|
||||
break;
|
||||
|
||||
default:
|
||||
dev_warn_ratelimited(priv->dev, "Unhandled channel type %d\n",
|
||||
cp->type);
|
||||
|
|
@ -610,7 +615,8 @@ static irqreturn_t imx_mu_isr(int irq, void *p)
|
|||
ret = IRQ_WAKE_THREAD;
|
||||
} else if ((val == IMX_MU_xSR_GIPn(priv->dcfg->type, cp->idx)) &&
|
||||
(cp->type == IMX_MU_TYPE_RXDB)) {
|
||||
priv->dcfg->rxdb(priv, cp);
|
||||
imx_mu_xcr_rmw(priv, IMX_MU_GIER, 0, IMX_MU_xCR_GIEn(priv->dcfg->type, cp->idx));
|
||||
ret = IRQ_WAKE_THREAD;
|
||||
} else {
|
||||
dev_warn_ratelimited(priv->dev, "Not handled interrupt\n");
|
||||
return IRQ_NONE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user