diff options
author | Peng Fan <peng.fan@nxp.com> | 2023-06-29 17:33:27 +0800 |
---|---|---|
committer | Bjorn Andersson <andersson@kernel.org> | 2023-07-15 12:36:22 -0700 |
commit | 0b6c3bc88bd920d2e89921cd308a0276f05ad8c7 (patch) | |
tree | f0f2e5fdb787f690f738870a02ff07d1dec8fffa /drivers/remoteproc | |
parent | 3aacc3b2e4ea862c21de5a0efbfa8cd59192bc43 (diff) | |
download | linux-0b6c3bc88bd920d2e89921cd308a0276f05ad8c7.tar.gz linux-0b6c3bc88bd920d2e89921cd308a0276f05ad8c7.tar.bz2 linux-0b6c3bc88bd920d2e89921cd308a0276f05ad8c7.zip |
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>
Diffstat (limited to 'drivers/remoteproc')
-rw-r--r-- | drivers/remoteproc/imx_rproc.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/remoteproc/imx_rproc.c b/drivers/remoteproc/imx_rproc.c index b403a37ddb02..4ee2646ce62a 100644 --- a/drivers/remoteproc/imx_rproc.c +++ b/drivers/remoteproc/imx_rproc.c @@ -725,13 +725,22 @@ static int imx_rproc_addr_init(struct imx_rproc *priv, return 0; } +static int imx_rproc_notified_idr_cb(int id, void *ptr, void *data) +{ + struct rproc *rproc = data; + + rproc_vq_interrupt(rproc, id); + + return 0; +} + static void imx_rproc_vq_work(struct work_struct *work) { struct imx_rproc *priv = container_of(work, struct imx_rproc, rproc_work); + struct rproc *rproc = priv->rproc; - rproc_vq_interrupt(priv->rproc, 0); - rproc_vq_interrupt(priv->rproc, 1); + idr_for_each(&rproc->notifyids, imx_rproc_notified_idr_cb, rproc); } static void imx_rproc_rx_callback(struct mbox_client *cl, void *msg) |