aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeng Fan <[email protected]>2024-07-19 16:36:13 +0800
committerMathieu Poirier <[email protected]>2024-07-29 09:42:07 -0600
commit858e57c1d3dd7b92cc0fa692ba130a0a5d57e49d (patch)
tree4dde8d6f02670545e125ac3c3e8700b99b458904
parente954a1bd16102abc800629f9900715d8ec4c3130 (diff)
remoteproc: imx_rproc: Initialize workqueue earlier
Initialize workqueue before requesting mailbox channel, otherwise if mailbox interrupt comes before workqueue ready, the imx_rproc_rx_callback will trigger issue. Fixes: 2df7062002d0 ("remoteproc: imx_proc: enable virtio/mailbox") Signed-off-by: Peng Fan <[email protected]> Reviewed-by: Daniel Baluta <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Mathieu Poirier <[email protected]>
-rw-r--r--drivers/remoteproc/imx_rproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c
index 48c48b53a3aa..9e99bb27c033 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1087,6 +1087,8 @@ static int imx_rproc_probe(struct platform_device *pdev)
return -ENOMEM;
}
+ INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);
+
ret = imx_rproc_xtr_mbox_init(rproc);
if (ret)
goto err_put_wkq;
@@ -1105,8 +1107,6 @@ static int imx_rproc_probe(struct platform_device *pdev)
if (ret)
goto err_put_scu;
- INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);
-
if (rproc->state != RPROC_DETACHED)
rproc->auto_boot = of_property_read_bool(np, "fsl,auto-boot");