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 <wangyongrong@xiaomi.com>
This commit is contained in:
parent
60ab9ae37e
commit
0b1f45d600
|
@ -100,7 +100,7 @@ rptun_get_mem(FAR struct remoteproc *rproc,
|
||||||
metal_phys_addr_t da,
|
metal_phys_addr_t da,
|
||||||
FAR void *va, size_t size,
|
FAR void *va, size_t size,
|
||||||
FAR struct remoteproc_mem *buf);
|
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_start(FAR struct remoteproc *rproc);
|
||||||
static int rptun_dev_stop(FAR struct remoteproc *rproc, bool stop_ns);
|
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,
|
.stop = rptun_stop,
|
||||||
.notify = rptun_notify,
|
.notify = rptun_notify,
|
||||||
.get_mem = rptun_get_mem,
|
.get_mem = rptun_get_mem,
|
||||||
.notify_wait = rptun_notify_wait,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef CONFIG_RPTUN_LOADER
|
#ifdef CONFIG_RPTUN_LOADER
|
||||||
|
@ -527,9 +526,10 @@ rptun_get_mem(FAR struct remoteproc *rproc,
|
||||||
return buf;
|
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))
|
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.rdev.ns_unbind_cb = rpmsg_ns_unbind;
|
||||||
|
priv->rvdev.notify_wait_cb = rptun_notify_wait;
|
||||||
|
|
||||||
/* Remote proc start */
|
/* Remote proc start */
|
||||||
|
|
||||||
|
|
|
@ -250,7 +250,6 @@ static const struct virtio_dispatch g_virtio_mmio_dispatch =
|
||||||
virtio_mmio_write_config, /* write_config */
|
virtio_mmio_write_config, /* write_config */
|
||||||
virtio_mmio_reset_device, /* reset_device */
|
virtio_mmio_reset_device, /* reset_device */
|
||||||
virtio_mmio_notify, /* notify */
|
virtio_mmio_notify, /* notify */
|
||||||
NULL, /* notify_wait */
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|
Loading…
Reference in New Issue