diff --git a/lib/remoteproc/remoteproc_virtio.c b/lib/remoteproc/remoteproc_virtio.c index ef39c49e..aae026c0 100644 --- a/lib/remoteproc/remoteproc_virtio.c +++ b/lib/remoteproc/remoteproc_virtio.c @@ -15,6 +15,7 @@ #include #include #include +#include static void rproc_virtio_delete_virtqueues(struct virtio_device *vdev) { @@ -412,6 +413,6 @@ void rproc_virtio_wait_remote_ready(struct virtio_device *vdev) status = rproc_virtio_get_status(vdev); if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) return; - metal_cpu_yield(); + metal_sleep_usec(1000); } } diff --git a/lib/rpmsg/rpmsg_virtio.c b/lib/rpmsg/rpmsg_virtio.c index 7baaedd5..d1508600 100644 --- a/lib/rpmsg/rpmsg_virtio.c +++ b/lib/rpmsg/rpmsg_virtio.c @@ -271,8 +271,8 @@ static int rpmsg_virtio_wait_remote_ready(struct rpmsg_virtio_device *rvdev) } else if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) { return 0; } - /* TODO: clarify metal_cpu_yield usage*/ - metal_cpu_yield(); + /* TODO: clarify metal_sleep_usec usage*/ + metal_sleep_usec(RPMSG_TICKS_PER_INTERVAL); } }