summaryrefslogtreecommitdiff
path: root/arch/arm/mach-pxa/irq.c
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2010-11-17 14:03:36 +0300
committerEric Miao <eric.y.miao@gmail.com>2010-12-16 09:31:19 +0300
commitbb71bdd31b48efa2b9834f1a47eb5f657e3c217c (patch)
tree1d5592c2e91d33f7d9ac799e0215fb7c66c1b976 /arch/arm/mach-pxa/irq.c
parentd04e67cd1d088762c17e8edf08fbc14e4af1981a (diff)
downloadlinux-bb71bdd31b48efa2b9834f1a47eb5f657e3c217c.tar.xz
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.c11
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];
}