]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - rpmsg/rpmsg.git/commitdiff
irqchip/irq-pruss-intc: Fix an incorrect loop counter limit value
authorSuman Anna <s-anna@ti.com>
Mon, 22 Apr 2019 20:59:53 +0000 (15:59 -0500)
committerSuman Anna <s-anna@ti.com>
Mon, 22 Apr 2019 21:51:10 +0000 (16:51 -0500)
The ICSSG IP on K3 AM65x SoCs has greater PRU host interrupts than
the regular PRUSS IP on all other SoCs. The commit 3f154172451e
("irqchip/pruss-intc: Add support for ICSSG INTC on K3 AM65x SoCs")
missed replacing the previous host interrupt loop counter limit value
MAX_PRU_HOST_INT in the pruss_intc_unconfigure() function with an
appropriate variable reflecting the PRU host interrupts number. Fix
this properly in line with the usage in the pruss_intc_configure()
function.

Fixes: 3f154172451e ("irqchip/pruss-intc: Add support for ICSSG INTC on K3 AM65x SoCs")
Signed-off-by: Suman Anna <s-anna@ti.com>
drivers/irqchip/irq-pruss-intc.c

index 51500779c4a54f41b2ae7d7d0fa8c33f818cbe80..006a6aeeaf3b6aa90cdda284953b5de26b762547 100644 (file)
@@ -367,7 +367,7 @@ int pruss_intc_unconfigure(struct pruss *pruss,
        }
 
        /* disable host interrupts */
-       for (i = 0; i < MAX_PRU_HOST_INT; i++) {
+       for (i = 0; i < num_intrs; i++) {
                if (host_mask & BIT(i))
                        pruss_intc_write_reg(intc, PRU_INTC_HIDISR, i);
        }