aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Anna2019-04-18 14:46:59 -0500
committerSuman Anna2019-07-01 11:25:50 -0500
commit1d1f0588b864e4e23d19099c04b3cd0807124c18 (patch)
tree5bca8b4ce9d09f328247aba69334580d0c465d36
parent696961f5004879c0ef4b7a5669392b17edd27aaf (diff)
downloadremoteproc-1d1f0588b864e4e23d19099c04b3cd0807124c18.tar.gz
remoteproc-1d1f0588b864e4e23d19099c04b3cd0807124c18.tar.xz
remoteproc-1d1f0588b864e4e23d19099c04b3cd0807124c18.zip
irqchip/irq-pruss-intc: Reset chained handlers during cleanup
The PRUSS INTC irqchip implementation provides a standard IRQ API for consumers to directly use the PRU System Events as interrupts and uses chained interrupts for connecting these to the main ARM GIC interrupt controllers. These chained irq handlers are not removed at present during any failures in probe, or uninstalled in remove. Reset these chained handlers so that the interrupts at the GIC level are deactivated properly when the INTC devices are unbound from the driver. Signed-off-by: Suman Anna <s-anna@ti.com>
-rw-r--r--drivers/irqchip/irq-pruss-intc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/irqchip/irq-pruss-intc.c b/drivers/irqchip/irq-pruss-intc.c
index 022b4cfa811a..c02e5e9600c9 100644
--- a/drivers/irqchip/irq-pruss-intc.c
+++ b/drivers/irqchip/irq-pruss-intc.c
@@ -577,6 +577,11 @@ static int pruss_intc_probe(struct platform_device *pdev)
577 return 0; 577 return 0;
578 578
579fail_irq: 579fail_irq:
580 while (--i >= 0) {
581 if (intc->irqs[i])
582 irq_set_chained_handler_and_data(intc->irqs[i], NULL,
583 NULL);
584 }
580 irq_domain_remove(intc->domain); 585 irq_domain_remove(intc->domain);
581 return irq; 586 return irq;
582} 587}
@@ -585,6 +590,13 @@ static int pruss_intc_remove(struct platform_device *pdev)
585{ 590{
586 struct pruss_intc *intc = platform_get_drvdata(pdev); 591 struct pruss_intc *intc = platform_get_drvdata(pdev);
587 unsigned int hwirq; 592 unsigned int hwirq;
593 int i;
594
595 for (i = 0; i < MAX_HOST_NUM_IRQS; i++) {
596 if (intc->irqs[i])
597 irq_set_chained_handler_and_data(intc->irqs[i], NULL,
598 NULL);
599 }
588 600
589 if (intc->domain) { 601 if (intc->domain) {
590 for (hwirq = 0; hwirq < MAX_PRU_SYS_EVENTS; hwirq++) 602 for (hwirq = 0; hwirq < MAX_PRU_SYS_EVENTS; hwirq++)