Commit 858e57c1 authored by Peng Fan's avatar Peng Fan Committed by Mathieu Poirier

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: 2df70620 ("remoteproc: imx_proc: enable virtio/mailbox")
Signed-off-by: default avatarPeng Fan <peng.fan@nxp.com>
Reviewed-by: default avatarDaniel Baluta <daniel.baluta@nxp.com>
Link: https://lore.kernel.org/r/20240719-imx_rproc-v2-3-10d0268c7eb1@nxp.comSigned-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
parent e954a1bd
......@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment