hil: add hil_set_vdev_ipi
authorWendy Liang <jliang@xilinx.com>
Wed, 25 Jan 2017 22:02:59 +0000 (14:02 -0800)
committerWendy Liang <jliang@xilinx.com>
Fri, 3 Feb 2017 21:41:24 +0000 (13:41 -0800)
Add hil_set_vdev_ipi to set ipi for vdev configs notification.

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

index b00ea87c741b3c9ec88a885be9ec790d1eb8c94f..7ba40638d4b89e29859d90fbfd7bd1768418e419 100644 (file)
@@ -551,6 +551,22 @@ int hil_set_vring (struct hil_proc *proc, int index,
        return 0;
 }
 
+int hil_set_vdev_ipi (struct hil_proc *proc, int index,
+                unsigned int irq, void *data)
+{
+       struct proc_intr *vring_intr;
+
+       /* As we support only one vdev for now */
+       (void)index;
+
+       if (!proc)
+               return -1;
+       vring_intr = &proc->vdev.intr_info;
+       vring_intr->vect_id = irq;
+       vring_intr->data = data;
+       return 0;
+}
+
 int hil_set_vring_ipi (struct hil_proc *proc, int index,
                 unsigned int irq, void *data)
 {
index 7c04b5ec122c60fbdebfe6a1678761dce5ec06f8..4cc7873c2ee65b4883178ef5ccef7535f2cdfb17 100644 (file)
@@ -476,6 +476,21 @@ int hil_set_shm (struct hil_proc *proc,
 int hil_set_vring (struct hil_proc *proc, int index,
                   const char *bus_name, const char *name);
 
+/**
+ * hil_set_vdev_ipi
+ *
+ * This function set HIL proc vdev IPI
+ *
+ * @param proc     - hil_proc to set
+ * @param index    - vring index for the IPI
+ * @param irq      - IPI irq vector ID
+ * @param data     - IPI data
+ *
+ * @return - 0 for no errors, non-0 for errors.
+ */
+int hil_set_vdev_ipi (struct hil_proc *proc, int index,
+                unsigned int irq, void *data);
+
 /**
  * hil_set_vring_ipi
  *