From: Wendy Liang Date: Mon, 16 Jan 2017 06:38:09 +0000 (-0800) Subject: rpmsg: remove setting remote dev active from remote dev kick X-Git-Tag: v2017.04~48 X-Git-Url: https://git.ti.com/gitweb?p=processor-sdk%2Fopen-amp.git;a=commitdiff_plain;h=2018282fa6f5691bf4542d2faa743404b1a8adf8 rpmsg: remove setting remote dev active from remote dev kick Move setting the remote device status from remote dev kick function to the caller. It should be the caller to decide when it is ready. Signed-off-by: Wendy Liang --- diff --git a/lib/rpmsg/remote_device.c b/lib/rpmsg/remote_device.c index 9ddfa93..1d038cb 100644 --- a/lib/rpmsg/remote_device.c +++ b/lib/rpmsg/remote_device.c @@ -304,27 +304,9 @@ struct rpmsg_endpoint *rpmsg_rdev_get_endpoint_from_addr(struct remote_device *r */ int rpmsg_rdev_notify(struct remote_device *rdev) { - int status = RPMSG_SUCCESS; + virtqueue_kick(rdev->rvq); - if (rdev->role == RPMSG_REMOTE) { - status = hil_get_status(rdev->proc); - - /* - * Let the remote device know that Master is ready for - * communication. - */ - if (!status) - virtqueue_kick(rdev->rvq); - - } else { - status = hil_set_status(rdev->proc); - } - - if (status == RPMSG_SUCCESS) { - rdev->state = RPMSG_DEV_STATE_ACTIVE; - } - - return status; + return RPMSG_SUCCESS; } /** diff --git a/lib/rpmsg/rpmsg_core.c b/lib/rpmsg/rpmsg_core.c index a55b363..728645d 100644 --- a/lib/rpmsg/rpmsg_core.c +++ b/lib/rpmsg/rpmsg_core.c @@ -139,6 +139,8 @@ int rpmsg_start_ipc(struct remote_device *rdev) VIRTIO_CONFIG_STATUS_DRIVER_OK); status = rpmsg_rdev_notify(rdev); } + if (status == RPMSG_SUCCESS) + rdev->state = RPMSG_DEV_STATE_ACTIVE; return status; }