hil: add API to set vdev reset callback.
authorWendy Liang <jliang@xilinx.com>
Wed, 25 Jan 2017 23:49:32 +0000 (15:49 -0800)
committerWendy Liang <jliang@xilinx.com>
Mon, 6 Feb 2017 19:31:33 +0000 (11:31 -0800)
Add API to setup vdev reset callback.

Signed-off-by: Wendy Liang <jliang@xilinx.com>
lib/common/hil.c
lib/include/openamp/hil.h

index f832d6b7aab82899d2b7f1171d8e033840fde293..c8b9ccd1e59b69ed6aa4f833ae3be49d1667c642 100644 (file)
@@ -602,3 +602,11 @@ int hil_set_rpmsg_channel (struct hil_proc *proc, int index,
        return 0;
 }
 
+int hil_set_vdev_rst_cb (struct hil_proc *proc, int index,
+               hil_proc_vdev_rst_cb_t cb)
+{
+       (void)index;
+       proc->vdev.rst_cb = cb;
+       return 0;
+}
+
index 35edf213afeba468c8c9d0dfc7e0f870d2be27fa..06e9841e60bc1637a95263be4e60ea9d06328f0c 100644 (file)
@@ -532,6 +532,20 @@ int hil_set_vring_ipi (struct hil_proc *proc, int index,
 int hil_set_rpmsg_channel (struct hil_proc *proc, int index,
                char *name);
 
+/**
+ * hil_set_vdev_rst_cb
+ *
+ * This function set HIL proc vdev reset callback
+ *
+ * @param proc     - hil_proc to set
+ * @param index    - vdev index
+ * @param cb       - reset callback
+ *
+ * @return - 0 for no errors, non-0 for errors.
+ */
+int hil_set_vdev_rst_cb (struct hil_proc *proc, int index,
+               hil_proc_vdev_rst_cb_t cb);
+
 /**
  *
  * This structure is an interface between HIL and platform porting