]> rtime.felk.cvut.cz Git - vajnamar/linux-xlnx.git/commitdiff
remoteproc: add config_wait_complete to rproc_vdev
authorWendy Liang <wendy.liang@xilinx.com>
Wed, 1 Feb 2017 07:49:03 +0000 (23:49 -0800)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 1 Feb 2017 13:52:26 +0000 (14:52 +0100)
Add config_wait_complete to rproc_vdev.
This attribute is used for vdev config operation to
wait for the remote to respond. When there is a
notification comes from the remote, it can wake up
the waiting client by marking this attribute.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
drivers/remoteproc/remoteproc_virtio.c
include/linux/remoteproc.h

index 895606ec978d9b4f82d01f51871947148028009a..94dca4191b871eb00ce4093664bdfbe053ca04b8 100644 (file)
@@ -345,6 +345,7 @@ int rproc_add_virtio_dev(struct rproc_vdev *rvdev, int id)
        vdev->dev.parent = dev;
        vdev->dev.release = rproc_vdev_release;
 
+       init_completion(&rvdev->config_wait_complete);
        /*
         * We're indirectly making a non-temporary copy of the rproc pointer
         * here, because drivers probed with this vdev will indirectly
index f24769af4fdbcb3e7e849be288718cc5e9d3d100..bb1c13f26f11e25c3750d99b8c7c830f6b3811c1 100644 (file)
@@ -516,6 +516,7 @@ struct rproc_vring {
  * @vdev: the virio device
  * @vring: the vrings for this vdev
  * @rsc_offset: offset of the vdev's resource entry
+ * @config_wait_complete: mark asynchronous vdev config wait complete
  */
 struct rproc_vdev {
        struct list_head node;
@@ -523,6 +524,7 @@ struct rproc_vdev {
        struct virtio_device vdev;
        struct rproc_vring vring[RVDEV_NUM_VRINGS];
        u32 rsc_offset;
+       struct completion config_wait_complete;
 };
 
 struct rproc *rproc_get_by_phandle(phandle phandle);