]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - processor-sdk/open-amp.git/commitdiff
rpmsg: remove setting remote dev active from remote dev kick
authorWendy Liang <jliang@xilinx.com>
Mon, 16 Jan 2017 06:38:09 +0000 (22:38 -0800)
committerWendy Liang <jliang@xilinx.com>
Fri, 3 Feb 2017 21:41:22 +0000 (13:41 -0800)
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 <jliang@xilinx.com>
lib/rpmsg/remote_device.c
lib/rpmsg/rpmsg_core.c

index 9ddfa93c0edb0718e3d254ef5e68a3de23c1492a..1d038cbdebcd1572a044f470a16ef04937b37dd5 100644 (file)
@@ -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;
 }
 
 /**
index a55b36308efd279bf7c9a42155c20e741f57eb6b..728645d381d9cb2754eaecc330fcae0cc46a0b52 100644 (file)
@@ -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;
 }