remoteproc: remove ipi deinit function
authorWendy Liang <jliang@xilinx.com>
Sun, 10 Jul 2016 06:17:46 +0000 (23:17 -0700)
committerWendy Liang <jliang@xilinx.com>
Thu, 13 Oct 2016 05:01:45 +0000 (22:01 -0700)
Each remoteproc driver is responsible to define the way to handle
IPI interrupt after the remoteproc resource is deleted.

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

index 39908693824331bb6c0dcf1146c7138ab0a577d6..4a4d3b2c1ff580beaf96793cedec5a323732b35f 100644 (file)
@@ -389,14 +389,6 @@ struct hil_platform_ops {
      */
        int (*enable_interrupt) (struct proc_vring * vring_hw);
 
-    /**
-     * reg_ipi_after_deinit()
-     * This function register interrupt(IPI) after openamp resource .
-     *
-     * @param vring_hw - pointer to vring control block
-     */
-       void (*reg_ipi_after_deinit) (struct proc_vring * vring_hw);
-
     /**
      * notify()
      *
index 3be73e513e11ac968e6e5145298563546540f64d..91cea1afbfe734ada9586f412ed3ec4497f38055 100644 (file)
@@ -65,7 +65,6 @@ static void _ipi_handler_deinit(int vect_id, void *data);
 /*--------------------------- Globals ---------------------------------- */
 struct hil_platform_ops zynqmp_r5_a53_proc_ops = {
        .enable_interrupt     = _enable_interrupt,
-       .reg_ipi_after_deinit = _reg_ipi_after_deinit,
        .notify               = _notify,
        .boot_cpu             = _boot_cpu,
        .shutdown_cpu         = _shutdown_cpu,
@@ -203,6 +202,12 @@ static struct hil_proc * _initialize(void *pdata, int cpu_id)
 
 static void _release(struct hil_proc *proc)
 {
+       int i;
+       struct proc_vring *vring_hw;
+       for (i = 0; i < (int)proc->vdev.num_vrings; i++) {
+               vring_hw = &proc->vdev.vring_info[i];
+               _reg_ipi_after_deinit(vring_hw);
+       }
        env_free_memory(proc);
 }
 
index f3ebe8fb1c3b9c171218abcb1d9036448fbfdafd..bce24f0b114619c33eedfacfde74aef627235d27 100644 (file)
@@ -119,19 +119,8 @@ int remoteproc_resource_init(struct rsc_table_info *rsc_info,
 
 int remoteproc_resource_deinit(struct remote_proc *rproc)
 {
-       int i = 0;
-       struct proc_vring *vring_hw = 0;
        if (rproc) {
                if (rproc->rdev) {
-                       /* disable IPC interrupts */
-                       if (rproc->proc->ops->reg_ipi_after_deinit) {
-                               for (i = 0; i < 2; i++) {
-                                       vring_hw =
-                                           &rproc->proc->vdev.vring_info[i];
-                                       rproc->proc->ops->
-                                           reg_ipi_after_deinit(vring_hw);
-                               }
-                       }
                        rpmsg_deinit(rproc->rdev);
                }
                if (rproc->proc) {