]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
remoteproc: zynq_remoteproc: Remove redundant IPI intr
authorWendy Liang <wendy.liang@xilinx.com>
Wed, 3 Jun 2015 07:10:47 +0000 (00:10 -0700)
committerMichal Simek <michal.simek@xilinx.com>
Wed, 3 Jun 2015 08:06:58 +0000 (10:06 +0200)
There are 3 IPI intrs required by zynq_remoteproc:

ipino
vring0
vring1

However, it actually just uses 2 which are:
vring0: remote sent message to master
vring1: master used to notify remote

This patch removes ipino but uses vring0 and vring1 for IPI on Zynq platform.

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

index d9c3a874515989bb3607f3e70e75da44de72c411..bac2290e628dc2b966aedb93b61ea2e1f2586ed5 100644 (file)
@@ -51,7 +51,6 @@ struct irq_list {
 struct zynq_rproc_pdata {
        struct irq_list mylist;
        struct rproc *rproc;
-       u32 ipino;
        u32 vring0;
        u32 vring1;
        u32 mem_start;
@@ -261,25 +260,19 @@ static int zynq_remoteproc_probe(struct platform_device *pdev)
        }
 
        /* Allocate free IPI number */
-       ret = of_property_read_u32(pdev->dev.of_node, "ipino", &local->ipino);
+       /* Read vring0 ipi number */
+       ret = of_property_read_u32(pdev->dev.of_node, "vring0", &local->vring0);
        if (ret < 0) {
                dev_err(&pdev->dev, "unable to read property");
-               goto irq_fault;
+               goto ipi_fault;
        }
 
-       ret = set_ipi_handler(local->ipino, ipi_kick, "Firmware kick");
+       ret = set_ipi_handler(local->vring0, ipi_kick, "Firmware kick");
        if (ret) {
                dev_err(&pdev->dev, "IPI handler already registered\n");
                goto irq_fault;
        }
 
-       /* Read vring0 ipi number */
-       ret = of_property_read_u32(pdev->dev.of_node, "vring0", &local->vring0);
-       if (ret < 0) {
-               dev_err(&pdev->dev, "unable to read property");
-               goto ipi_fault;
-       }
-
        /* Read vring1 ipi number */
        ret = of_property_read_u32(pdev->dev.of_node, "vring1", &local->vring1);
        if (ret < 0) {
@@ -315,7 +308,7 @@ static int zynq_remoteproc_probe(struct platform_device *pdev)
 rproc_fault:
        rproc_put(local->rproc);
 ipi_fault:
-       clear_ipi_handler(local->ipino);
+       clear_ipi_handler(local->vring0);
 
 irq_fault:
        clear_irq(pdev);
@@ -341,7 +334,7 @@ static int zynq_remoteproc_remove(struct platform_device *pdev)
 
        dma_release_declared_memory(&pdev->dev);
 
-       clear_ipi_handler(local->ipino);
+       clear_ipi_handler(local->vring0);
        clear_irq(pdev);
 
        rproc_del(local->rproc);