lkml.org 
[lkml]   [2011]   [Jan]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ARM: pxa: fix GPIO IRQ handling
Date
From: Lars-Peter Clausen <lars@metafoo.de>

Set the "set_wake" field of the irq_chip struct before calling
set_irq_chip() for all of the IRQs, so that the compat handler
actually gets installed.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Sven Neumann <s.neumann@raumfeld.com>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@kernel.org (for 2.6.37 only)
---
arch/arm/mach-pxa/irq.c | 7 ++++---
arch/arm/mach-pxa/pxa3xx.c | 4 ++--
2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 1beb40f..a5b42a7 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -111,13 +111,13 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
GRER0 &= ~0x3;
GEDR0 = 0x3;

+ pxa_low_gpio_chip.set_wake = fn;
+
for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
set_irq_chip(irq, &pxa_low_gpio_chip);
set_irq_handler(irq, handle_edge_irq);
set_irq_flags(irq, IRQF_VALID);
}
-
- pxa_low_gpio_chip.set_wake = fn;
}

void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -142,13 +142,14 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
/* only unmasked interrupts kick us out of idle */
ICCR = 1;

+ pxa_internal_irq_chip.set_wake = fn;
+
for (irq = PXA_IRQ(0); irq < PXA_IRQ(irq_nr); irq++) {
set_irq_chip(irq, &pxa_internal_irq_chip);
set_irq_handler(irq, handle_level_irq);
set_irq_flags(irq, IRQF_VALID);
}

- pxa_internal_irq_chip.set_wake = fn;
pxa_init_low_gpio_irq(fn);
}

diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index 276e8fb..5a8fe5c 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -567,13 +567,13 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn)
{
int irq;

+ pxa_ext_wakeup_chip.set_wake = fn;
+
for (irq = IRQ_WAKEUP0; irq <= IRQ_WAKEUP1; irq++) {
set_irq_chip(irq, &pxa_ext_wakeup_chip);
set_irq_handler(irq, handle_edge_irq);
set_irq_flags(irq, IRQF_VALID);
}
-
- pxa_ext_wakeup_chip.set_wake = fn;
}

void __init pxa3xx_init_irq(void)
--
1.7.1


\
 
 \ /
  Last update: 2011-01-18 13:33    [W:0.058 / U:0.444 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site