diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2011-04-27 10:48:04 -0400 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2011-07-12 07:45:21 -0400 |
commit | 5d284e353eb11ab2e8b1c5671ba06489b0bd1e0c (patch) | |
tree | 4c8edb89d7d977e39415df3a06b1af88012bb053 | |
parent | 9c86441081e84c9fb9fac3929c6e7d3e6f4dd891 (diff) |
ARM: pxa: avoid accessing interrupt registers directly
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
-rw-r--r-- | arch/arm/mach-pxa/include/mach/irqs.h | 7 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/regs-intc.h | 30 | ||||
-rw-r--r-- | arch/arm/mach-pxa/irq.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa3xx.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-pxa/pxa95x.c | 1 |
5 files changed, 11 insertions, 36 deletions
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index 038402404e39..a94c694b4af9 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -104,4 +104,11 @@ | |||
104 | 104 | ||
105 | #define NR_IRQS (IRQ_BOARD_START) | 105 | #define NR_IRQS (IRQ_BOARD_START) |
106 | 106 | ||
107 | #ifndef __ASSEMBLY__ | ||
108 | struct irq_data; | ||
109 | |||
110 | void pxa_mask_irq(struct irq_data *); | ||
111 | void pxa_unmask_irq(struct irq_data *); | ||
112 | #endif | ||
113 | |||
107 | #endif /* __ASM_MACH_IRQS_H */ | 114 | #endif /* __ASM_MACH_IRQS_H */ |
diff --git a/arch/arm/mach-pxa/include/mach/regs-intc.h b/arch/arm/mach-pxa/include/mach/regs-intc.h deleted file mode 100644 index 662288eb6f95..000000000000 --- a/arch/arm/mach-pxa/include/mach/regs-intc.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | #ifndef __ASM_MACH_REGS_INTC_H | ||
2 | #define __ASM_MACH_REGS_INTC_H | ||
3 | |||
4 | #include <mach/hardware.h> | ||
5 | |||
6 | /* | ||
7 | * Interrupt Controller | ||
8 | */ | ||
9 | |||
10 | #define ICIP __REG(0x40D00000) /* Interrupt Controller IRQ Pending Register */ | ||
11 | #define ICMR __REG(0x40D00004) /* Interrupt Controller Mask Register */ | ||
12 | #define ICLR __REG(0x40D00008) /* Interrupt Controller Level Register */ | ||
13 | #define ICFP __REG(0x40D0000C) /* Interrupt Controller FIQ Pending Register */ | ||
14 | #define ICPR __REG(0x40D00010) /* Interrupt Controller Pending Register */ | ||
15 | #define ICCR __REG(0x40D00014) /* Interrupt Controller Control Register */ | ||
16 | #define ICHP __REG(0x40D00018) /* Interrupt Controller Highest Priority Register */ | ||
17 | |||
18 | #define ICIP2 __REG(0x40D0009C) /* Interrupt Controller IRQ Pending Register 2 */ | ||
19 | #define ICMR2 __REG(0x40D000A0) /* Interrupt Controller Mask Register 2 */ | ||
20 | #define ICLR2 __REG(0x40D000A4) /* Interrupt Controller Level Register 2 */ | ||
21 | #define ICFP2 __REG(0x40D000A8) /* Interrupt Controller FIQ Pending Register 2 */ | ||
22 | #define ICPR2 __REG(0x40D000AC) /* Interrupt Controller Pending Register 2 */ | ||
23 | |||
24 | #define ICIP3 __REG(0x40D00130) /* Interrupt Controller IRQ Pending Register 3 */ | ||
25 | #define ICMR3 __REG(0x40D00134) /* Interrupt Controller Mask Register 3 */ | ||
26 | #define ICLR3 __REG(0x40D00138) /* Interrupt Controller Level Register 3 */ | ||
27 | #define ICFP3 __REG(0x40D0013C) /* Interrupt Controller FIQ Pending Register 3 */ | ||
28 | #define ICPR3 __REG(0x40D00140) /* Interrupt Controller Pending Register 3 */ | ||
29 | |||
30 | #endif /* __ASM_MACH_REGS_INTC_H */ | ||
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 32ed551bf9c5..c89c0e40fe32 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c | |||
@@ -64,7 +64,7 @@ static inline void __iomem *irq_base(int i) | |||
64 | return (void __iomem *)io_p2v(phys_base[i]); | 64 | return (void __iomem *)io_p2v(phys_base[i]); |
65 | } | 65 | } |
66 | 66 | ||
67 | static void pxa_mask_irq(struct irq_data *d) | 67 | void pxa_mask_irq(struct irq_data *d) |
68 | { | 68 | { |
69 | void __iomem *base = irq_data_get_irq_chip_data(d); | 69 | void __iomem *base = irq_data_get_irq_chip_data(d); |
70 | uint32_t icmr = __raw_readl(base + ICMR); | 70 | uint32_t icmr = __raw_readl(base + ICMR); |
@@ -73,7 +73,7 @@ static void pxa_mask_irq(struct irq_data *d) | |||
73 | __raw_writel(icmr, base + ICMR); | 73 | __raw_writel(icmr, base + ICMR); |
74 | } | 74 | } |
75 | 75 | ||
76 | static void pxa_unmask_irq(struct irq_data *d) | 76 | void pxa_unmask_irq(struct irq_data *d) |
77 | { | 77 | { |
78 | void __iomem *base = irq_data_get_irq_chip_data(d); | 78 | void __iomem *base = irq_data_get_irq_chip_data(d); |
79 | uint32_t icmr = __raw_readl(base + ICMR); | 79 | uint32_t icmr = __raw_readl(base + ICMR); |
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c index 8521d7d6f1da..e66dc1562cda 100644 --- a/arch/arm/mach-pxa/pxa3xx.c +++ b/arch/arm/mach-pxa/pxa3xx.c | |||
@@ -31,7 +31,6 @@ | |||
31 | #include <mach/ohci.h> | 31 | #include <mach/ohci.h> |
32 | #include <mach/pm.h> | 32 | #include <mach/pm.h> |
33 | #include <mach/dma.h> | 33 | #include <mach/dma.h> |
34 | #include <mach/regs-intc.h> | ||
35 | #include <mach/smemc.h> | 34 | #include <mach/smemc.h> |
36 | 35 | ||
37 | #include "generic.h" | 36 | #include "generic.h" |
@@ -328,13 +327,13 @@ static void pxa_ack_ext_wakeup(struct irq_data *d) | |||
328 | 327 | ||
329 | static void pxa_mask_ext_wakeup(struct irq_data *d) | 328 | static void pxa_mask_ext_wakeup(struct irq_data *d) |
330 | { | 329 | { |
331 | ICMR2 &= ~(1 << ((d->irq - PXA_IRQ(0)) & 0x1f)); | 330 | pxa_mask_irq(d); |
332 | PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0); | 331 | PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0); |
333 | } | 332 | } |
334 | 333 | ||
335 | static void pxa_unmask_ext_wakeup(struct irq_data *d) | 334 | static void pxa_unmask_ext_wakeup(struct irq_data *d) |
336 | { | 335 | { |
337 | ICMR2 |= 1 << ((d->irq - PXA_IRQ(0)) & 0x1f); | 336 | pxa_unmask_irq(d); |
338 | PECR |= PECR_IE(d->irq - IRQ_WAKEUP0); | 337 | PECR |= PECR_IE(d->irq - IRQ_WAKEUP0); |
339 | } | 338 | } |
340 | 339 | ||
diff --git a/arch/arm/mach-pxa/pxa95x.c b/arch/arm/mach-pxa/pxa95x.c index ecc82a330fad..0ee166b61f81 100644 --- a/arch/arm/mach-pxa/pxa95x.c +++ b/arch/arm/mach-pxa/pxa95x.c | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <mach/reset.h> | 27 | #include <mach/reset.h> |
28 | #include <mach/pm.h> | 28 | #include <mach/pm.h> |
29 | #include <mach/dma.h> | 29 | #include <mach/dma.h> |
30 | #include <mach/regs-intc.h> | ||
31 | 30 | ||
32 | #include "generic.h" | 31 | #include "generic.h" |
33 | #include "devices.h" | 32 | #include "devices.h" |