summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1396a4e)
raw | patch | inline | side by side (parent: 1396a4e)
author | Wendy Liang <jliang@xilinx.com> | |
Sat, 28 Jan 2017 01:17:01 +0000 (17:17 -0800) | ||
committer | Wendy Liang <jliang@xilinx.com> | |
Fri, 3 Feb 2017 21:41:24 +0000 (13:41 -0800) |
If the firmware has been requested to reset, in _ready() funciton,
notify the remote and set the vdev status to 0.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
notify the remote and set the vdev status to 0.
Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/rpmsg/remote_device.c | patch | blob | history |
index ebb170f262190c80fc1e082eecfef24b450369c2..930c9e61a20c8a64f905b1a62ef61457dc115f57 100644 (file)
uint8_t status;
if (rdev->role == RPMSG_MASTER) {
while (1) {
- /* Busy wait until the remote is ready */
status = vdev->func->get_status(vdev);
- if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK)
+ /* Busy wait until the remote is ready */
+ if (status & VIRTIO_CONFIG_STATUS_NEEDS_RESET) {
+ rpmsg_rdev_set_status(vdev, 0);
+ hil_vdev_notify(vdev);
+ } else if (status & VIRTIO_CONFIG_STATUS_DRIVER_OK) {
return true;
+ }
metal_cpu_yield();
}
} else {
return;
}
+