diff options
author | Igor Grinberg <grinberg@compulab.co.il> | 2010-06-13 04:31:48 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-08-05 02:32:17 -0400 |
commit | 12882096517e17b6bc5108b843c85534aefbf6b1 (patch) | |
tree | ec379cdadea9a20d5cf8bb2d6953f8d86d054ca3 | |
parent | dcd925f95194da42e42cea7e5f901f9746cf441c (diff) |
[ARM] pxa: add set_type to the pxa3xx ext_wakeup irq chip.
pxa3xx cpu needs the irq type setup to be able to
wakeup from low power mode on IRQ_WAKEUPx events.
Signed-off-by: Igor Grinberg <grinberg@compulab.co.il>
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index f544e58e1536..c18d2dfa3faf 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -552,11 +552,23 @@ static void pxa_unmask_ext_wakeup(unsigned int irq) | |||
552 | PECR |= PECR_IE(irq - IRQ_WAKEUP0); | 552 | PECR |= PECR_IE(irq - IRQ_WAKEUP0); |
553 | } | 553 | } |
554 | 554 | ||
555 | static int pxa_set_ext_wakeup_type(unsigned int irq, unsigned int flow_type) | ||
556 | { | ||
557 | if (flow_type & IRQ_TYPE_EDGE_RISING) | ||
558 | PWER |= 1 << (irq - IRQ_WAKEUP0); | ||
559 | |||
560 | if (flow_type & IRQ_TYPE_EDGE_FALLING) | ||
561 | PWER |= 1 << (irq - IRQ_WAKEUP0 + 2); | ||
562 | |||
563 | return 0; | ||
564 | } | ||
565 | |||
555 | static struct irq_chip pxa_ext_wakeup_chip = { | 566 | static struct irq_chip pxa_ext_wakeup_chip = { |
556 | .name = "WAKEUP", | 567 | .name = "WAKEUP", |
557 | .ack = pxa_ack_ext_wakeup, | 568 | .ack = pxa_ack_ext_wakeup, |
558 | .mask = pxa_mask_ext_wakeup, | 569 | .mask = pxa_mask_ext_wakeup, |
559 | .unmask = pxa_unmask_ext_wakeup, | 570 | .unmask = pxa_unmask_ext_wakeup, |
571 | .set_type = pxa_set_ext_wakeup_type, | ||
560 | }; | 572 | }; |
561 | 573 | ||
562 | static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) | 574 | static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) |