summaryrefslogtreecommitdiff
path: root/drivers/remoteproc
diff options
context:
space:
mode:
authorPeng Fan <peng.fan@nxp.com>2024-07-19 16:36:13 +0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2024-10-04 16:29:26 +0200
commitd271e66f74b5f5c9b3a1bece514beb21e6c418c1 (patch)
treed698a7d7d4b054b7b9217b32445c66fcbd1211a3 /drivers/remoteproc
parent2941577c764bc3576fa1fe415beeee81eb5f76ef (diff)
downloadlinux-d271e66f74b5f5c9b3a1bece514beb21e6c418c1.tar.gz
linux-d271e66f74b5f5c9b3a1bece514beb21e6c418c1.tar.bz2
linux-d271e66f74b5f5c9b3a1bece514beb21e6c418c1.zip
remoteproc: imx_rproc: Initialize workqueue earlier
[ Upstream commit 858e57c1d3dd7b92cc0fa692ba130a0a5d57e49d ] 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 <peng.fan@nxp.com> Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com> Link: https://lore.kernel.org/r/20240719-imx_rproc-v2-3-10d0268c7eb1@nxp.com Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'drivers/remoteproc')
-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 ac32b46b4e0f..d68d4b22f528 100644
--- a/drivers/remoteproc/imx_rproc.c
+++ b/drivers/remoteproc/imx_rproc.c
@@ -1134,6 +1134,8 @@ static int imx_rproc_probe(struct platform_device *pdev)
goto err_put_rproc;
}
+ INIT_WORK(&priv->rproc_work, imx_rproc_vq_work);
+
ret = imx_rproc_xtr_mbox_init(rproc);
if (ret)
goto err_put_wkq;
@@ -1152,8 +1154,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");