diff options
author | Haojian Zhuang <haojian.zhuang@marvell.com> | 2010-11-17 12:03:36 +0100 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-12-16 07:31:19 +0100 |
commit | bb71bdd31b48efa2b9834f1a47eb5f657e3c217c (patch) | |
tree | 1d5592c2e91d33f7d9ac799e0215fb7c66c1b976 /arch/arm/mach-pxa/irq.c | |
parent | ARM: pxa: redefine the cpu_is_pxa3xx (diff) | |
download | linux-bb71bdd31b48efa2b9834f1a47eb5f657e3c217c.tar.xz linux-bb71bdd31b48efa2b9834f1a47eb5f657e3c217c.zip |
ARM: pxa: redefine irqs.h
Define all IRQs in irqs.h. If some IRQs are sharing one IRQ number, define
them together. If some IRQs are sharing same name with different IRQ number,
define different IRQ.
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com>
Cc: Eric Miao <eric.y.miao@gmail.com>
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-pxa/irq.c')
-rw-r--r-- | arch/arm/mach-pxa/irq.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 1beb40f692fc..b5cafe2b4888 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -37,6 +37,11 @@ static int pxa_internal_irq_nr; +static inline int cpu_has_ipr(void) +{ + return !cpu_is_pxa25x(); +} + static void pxa_mask_irq(unsigned int irq) { _ICMR(irq) &= ~(1 << IRQ_BIT(irq)); @@ -134,7 +139,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn) } /* initialize interrupt priority */ - if (cpu_is_pxa27x() || cpu_is_pxa3xx()) { + if (cpu_has_ipr()) { for (i = 0; i < irq_nr; i++) IPR(i) = i | (1 << 31); } @@ -165,7 +170,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state) _ICMR(irq) = 0; } - if (cpu_is_pxa27x() || cpu_is_pxa3xx()) { + if (cpu_has_ipr()) { for (i = 0; i < pxa_internal_irq_nr; i++) saved_ipr[i] = IPR(i); } @@ -177,7 +182,7 @@ static int pxa_irq_resume(struct sys_device *dev) { int i, irq = PXA_IRQ(0); - if (cpu_is_pxa27x() || cpu_is_pxa3xx()) { + if (cpu_has_ipr()) { for (i = 0; i < pxa_internal_irq_nr; i++) IPR(i) = saved_ipr[i]; } |