Skip to content

Commit 0b6c3bc

Browse files
MrVanandersson
authored andcommitted
remoteproc: imx_rproc: iterate all notifiyids in rx callback
The current code only supports one vdev and a single callback, but there are cases need more vdevs. So iterate all notifyids to support more vdevs with the single callback. Signed-off-by: Peng Fan <peng.fan@nxp.com> Link: https://lore.kernel.org/r/20230629093327.3376308-1-peng.fan@oss.nxp.com Signed-off-by: Bjorn Andersson <andersson@kernel.org>
1 parent 3aacc3b commit 0b6c3bc

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

drivers/remoteproc/imx_rproc.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -725,13 +725,22 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
725725
return 0;
726726
}
727727

728+
static int imx_rproc_notified_idr_cb(int id, void *ptr, void *data)
729+
{
730+
struct rproc *rproc = data;
731+
732+
rproc_vq_interrupt(rproc, id);
733+
734+
return 0;
735+
}
736+
728737
static void imx_rproc_vq_work(struct work_struct *work)
729738
{
730739
struct imx_rproc *priv = container_of(work, struct imx_rproc,
731740
rproc_work);
741+
struct rproc *rproc = priv->rproc;
732742

733-
rproc_vq_interrupt(priv->rproc, 0);
734-
rproc_vq_interrupt(priv->rproc, 1);
743+
idr_for_each(&rproc->notifyids, imx_rproc_notified_idr_cb, rproc);
735744
}
736745

737746
static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg)

0 commit comments

Comments
 (0)