This is an automated email from the ASF dual-hosted git repository.

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 0b1f45d60019bbd31400b6431248b76cf66a1319
Author: wangyongrong <[email protected]>
AuthorDate: Tue Jan 23 10:55:01 2024 +0800

    rptun: rptun implements notify_wait through rvdev->notify_wait_cb
    
    notify_wait has been remove in remoteproc ops and virtio_dispatch and
    has been moved to the struct rpmsg_virtio_device in new OpenAMP,
    so change the rptun too,
    
    Signed-off-by: wangyongrong <[email protected]>
---
 drivers/rptun/rptun.c        | 9 +++++----
 drivers/virtio/virtio-mmio.c | 1 -
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c
index e6a23d1620..8ae7ce02b2 100644
--- a/drivers/rptun/rptun.c
+++ b/drivers/rptun/rptun.c
@@ -100,7 +100,7 @@ rptun_get_mem(FAR struct remoteproc *rproc,
               metal_phys_addr_t da,
               FAR void *va, size_t size,
               FAR struct remoteproc_mem *buf);
-static int rptun_notify_wait(FAR struct remoteproc *rproc, uint32_t id);
+static int rptun_notify_wait(FAR struct rpmsg_device *rdev, uint32_t id);
 
 static int rptun_dev_start(FAR struct remoteproc *rproc);
 static int rptun_dev_stop(FAR struct remoteproc *rproc, bool stop_ns);
@@ -143,7 +143,6 @@ static const struct remoteproc_ops g_rptun_ops =
   .stop        = rptun_stop,
   .notify      = rptun_notify,
   .get_mem     = rptun_get_mem,
-  .notify_wait = rptun_notify_wait,
 };
 
 #ifdef CONFIG_RPTUN_LOADER
@@ -527,9 +526,10 @@ rptun_get_mem(FAR struct remoteproc *rproc,
   return buf;
 }
 
-static int rptun_notify_wait(FAR struct remoteproc *rproc, uint32_t id)
+static int rptun_notify_wait(FAR struct rpmsg_device *rdev, uint32_t id)
 {
-  FAR struct rptun_priv_s *priv = rproc->priv;
+  FAR struct rptun_priv_s *priv = (FAR struct rptun_priv_s *)
+    metal_container_of(rdev, struct rpmsg_s, rdev);
 
   if (!rptun_is_recursive(priv))
     {
@@ -919,6 +919,7 @@ static int rptun_dev_start(FAR struct remoteproc *rproc)
     }
 
   priv->rvdev.rdev.ns_unbind_cb = rpmsg_ns_unbind;
+  priv->rvdev.notify_wait_cb = rptun_notify_wait;
 
   /* Remote proc start */
 
diff --git a/drivers/virtio/virtio-mmio.c b/drivers/virtio/virtio-mmio.c
index 6caeb60f28..9c26fb5a66 100644
--- a/drivers/virtio/virtio-mmio.c
+++ b/drivers/virtio/virtio-mmio.c
@@ -250,7 +250,6 @@ static const struct virtio_dispatch g_virtio_mmio_dispatch =
   virtio_mmio_write_config,       /* write_config */
   virtio_mmio_reset_device,       /* reset_device */
   virtio_mmio_notify,             /* notify */
-  NULL,                           /* notify_wait */
 };
 
 /****************************************************************************

Reply via email to