aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSuman Anna2019-04-18 14:46:59 -0500
committerSuman Anna2019-04-22 12:07:03 -0500
commit6929520b166894ac807fe61d900dd9627eb9554b (patch)
tree12e6fa8a6a0d64169dc00dcfcf5bc0d1a59887b2
parent3f7a6ae7d5d9724cfbe480bb8a12009aa4e5061c (diff)
downloadremoteproc-6929520b166894ac807fe61d900dd9627eb9554b.tar.gz
remoteproc-6929520b166894ac807fe61d900dd9627eb9554b.tar.xz
remoteproc-6929520b166894ac807fe61d900dd9627eb9554b.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++)