diff options
author | wanzongshun <mcuos.com@gmail.com> | 2009-08-21 02:07:46 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-09-02 06:22:23 -0400 |
commit | 35c9221acb133ecc9abd701a1fb6fa909d177a77 (patch) | |
tree | e2a283112398450001410b5f3fa9a471c34738a7 /arch/arm/mach-w90x900/irq.c | |
parent | a8bc4eadd936bbad9e99b89fe692679451ad75c9 (diff) |
ARM: 5682/1: Add cpu.c and dev.c and modify some files of w90p910 platform
Add the cpu.c and dev.c and modify w90p910 platform
to apply to use the common API(provided by cpu.c and dev.c)
at the same time, I renamed all w90x900 to nuc900 in every
c file of w90x900 platform and touchscreen's driver name.
Signed-off-by: Wan ZongShun <mcuos.com@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/mach-w90x900/irq.c')
-rw-r--r-- | arch/arm/mach-w90x900/irq.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/arch/arm/mach-w90x900/irq.c b/arch/arm/mach-w90x900/irq.c index a296c9b81d24..0ce9d8e867eb 100644 --- a/arch/arm/mach-w90x900/irq.c +++ b/arch/arm/mach-w90x900/irq.c | |||
@@ -36,13 +36,13 @@ struct group_irq { | |||
36 | 36 | ||
37 | static DEFINE_SPINLOCK(groupirq_lock); | 37 | static DEFINE_SPINLOCK(groupirq_lock); |
38 | 38 | ||
39 | #define DEFINE_GROUP(_name, _ctrlbit, _num) \ | 39 | #define DEFINE_GROUP(_name, _ctrlbit, _num) \ |
40 | struct group_irq group_##_name = { \ | 40 | struct group_irq group_##_name = { \ |
41 | .enable = w90x900_group_enable, \ | 41 | .enable = nuc900_group_enable, \ |
42 | .gpen = ((2 ^ _num) - 1) << _ctrlbit, \ | 42 | .gpen = ((1 << _num) - 1) << _ctrlbit, \ |
43 | } | 43 | } |
44 | 44 | ||
45 | static void w90x900_group_enable(struct group_irq *gpirq, int enable); | 45 | static void nuc900_group_enable(struct group_irq *gpirq, int enable); |
46 | 46 | ||
47 | static DEFINE_GROUP(nirq0, 0, 4); | 47 | static DEFINE_GROUP(nirq0, 0, 4); |
48 | static DEFINE_GROUP(nirq1, 4, 4); | 48 | static DEFINE_GROUP(nirq1, 4, 4); |
@@ -77,7 +77,7 @@ static void group_irq_disable(struct group_irq *group_irq) | |||
77 | spin_unlock_irqrestore(&groupirq_lock, flags); | 77 | spin_unlock_irqrestore(&groupirq_lock, flags); |
78 | } | 78 | } |
79 | 79 | ||
80 | static void w90x900_group_enable(struct group_irq *gpirq, int enable) | 80 | static void nuc900_group_enable(struct group_irq *gpirq, int enable) |
81 | { | 81 | { |
82 | unsigned int groupen = gpirq->gpen; | 82 | unsigned int groupen = gpirq->gpen; |
83 | unsigned long regval; | 83 | unsigned long regval; |
@@ -92,7 +92,7 @@ static void w90x900_group_enable(struct group_irq *gpirq, int enable) | |||
92 | __raw_writel(regval, REG_AIC_GEN); | 92 | __raw_writel(regval, REG_AIC_GEN); |
93 | } | 93 | } |
94 | 94 | ||
95 | static void w90x900_irq_mask(unsigned int irq) | 95 | static void nuc900_irq_mask(unsigned int irq) |
96 | { | 96 | { |
97 | struct group_irq *group_irq; | 97 | struct group_irq *group_irq; |
98 | 98 | ||
@@ -143,12 +143,12 @@ static void w90x900_irq_mask(unsigned int irq) | |||
143 | * to REG_AIC_EOSCR for ACK | 143 | * to REG_AIC_EOSCR for ACK |
144 | */ | 144 | */ |
145 | 145 | ||
146 | static void w90x900_irq_ack(unsigned int irq) | 146 | static void nuc900_irq_ack(unsigned int irq) |
147 | { | 147 | { |
148 | __raw_writel(0x01, REG_AIC_EOSCR); | 148 | __raw_writel(0x01, REG_AIC_EOSCR); |
149 | } | 149 | } |
150 | 150 | ||
151 | static void w90x900_irq_unmask(unsigned int irq) | 151 | static void nuc900_irq_unmask(unsigned int irq) |
152 | { | 152 | { |
153 | struct group_irq *group_irq; | 153 | struct group_irq *group_irq; |
154 | 154 | ||
@@ -194,20 +194,20 @@ static void w90x900_irq_unmask(unsigned int irq) | |||
194 | group_irq_enable(group_irq); | 194 | group_irq_enable(group_irq); |
195 | } | 195 | } |
196 | 196 | ||
197 | static struct irq_chip w90x900_irq_chip = { | 197 | static struct irq_chip nuc900_irq_chip = { |
198 | .ack = w90x900_irq_ack, | 198 | .ack = nuc900_irq_ack, |
199 | .mask = w90x900_irq_mask, | 199 | .mask = nuc900_irq_mask, |
200 | .unmask = w90x900_irq_unmask, | 200 | .unmask = nuc900_irq_unmask, |
201 | }; | 201 | }; |
202 | 202 | ||
203 | void __init w90x900_init_irq(void) | 203 | void __init nuc900_init_irq(void) |
204 | { | 204 | { |
205 | int irqno; | 205 | int irqno; |
206 | 206 | ||
207 | __raw_writel(0xFFFFFFFE, REG_AIC_MDCR); | 207 | __raw_writel(0xFFFFFFFE, REG_AIC_MDCR); |
208 | 208 | ||
209 | for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) { | 209 | for (irqno = IRQ_WDT; irqno <= IRQ_ADC; irqno++) { |
210 | set_irq_chip(irqno, &w90x900_irq_chip); | 210 | set_irq_chip(irqno, &nuc900_irq_chip); |
211 | set_irq_handler(irqno, handle_level_irq); | 211 | set_irq_handler(irqno, handle_level_irq); |
212 | set_irq_flags(irqno, IRQF_VALID); | 212 | set_irq_flags(irqno, IRQF_VALID); |
213 | } | 213 | } |