Re: [PATCH] pxa3xx: fix PXA GPIO IRQ handling

From: Eric Miao
Date: Tue Jan 18 2011 - 11:15:51 EST


On Tue, Jan 18, 2011 at 3:47 AM, Lars-Peter Clausen <lars@xxxxxxxxxx> wrote:
> On 01/18/2011 09:18 AM, Sven Neumann wrote:
>> From: Lars-Peter Clausen <lars@xxxxxxxxxx>
>>
>> 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.

Not really sure if this is necessary. Lennert has done the transition to
irq_data to those _set_wake() functions as well, so it should be OK
that compat handler doesn't get installed.

Now I'm not against moving this above, just wondering if there were
any consequences/errors coming out?

>>
>> Tested-by: Sven Neumann <s.neumann@xxxxxxxxxxxx>
>
> Signed-off-by: Lars-Peter Clausen <lars@xxxxxxxxxx>
>
>> ---
>> Â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)
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@xxxxxxxxxxxxxxxxxxx
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/