Thread (27 messages) 27 messages, 4 authors, 2011-03-04
STALE5568d

[PATCH 6/6] ARM: nmk: update GPIO chained IRQ handler to use EOI in parent chip

From: Russell King - ARM Linux <hidden>
Date: 2011-02-28 14:03:27

On Mon, Feb 28, 2011 at 01:33:42PM +0000, Will Deacon wrote:
quoted hunk ↗ jump to hunk
The chained GPIO IRQ handler for the nomadik platform can be called
with the GIC as its host chip on the mach-ux500 machines.

This patch updates the code to use ->irq_eoi when it is available.

Cc: Rabin Vincent <redacted>
Signed-off-by: Will Deacon <redacted>
---
 arch/arm/plat-nomadik/gpio.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/arch/arm/plat-nomadik/gpio.c b/arch/arm/plat-nomadik/gpio.c
index 1e88ecb..51cc71b 100644
--- a/arch/arm/plat-nomadik/gpio.c
+++ b/arch/arm/plat-nomadik/gpio.c
@@ -538,6 +538,8 @@ static void nmk_gpio_irq_handler(unsigned int irq, struct irq_desc *desc)
 	}
 
 	host_chip->irq_unmask(&desc->irq_data);
+	if (host_chip->irq_eoi)
+		host_chip->irq_eoi(&desc->irq_data);
I notice in some you delete the irq_unmask, others you leave it.  Shouldn't
they all be similar?

Maybe we do something like:

static inline void chained_irq_exit(struct irq_chip *chip, struct irq_desc *desc)
{
	if (chip->irq_eoi)
		chip->irq_eoi(&desc->irq_data);
	else
		chip->irq_unmask(&desc->irq_data);
}

to cover these exit paths in a common way?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help