diff options
author | Eric Miao <eric.y.miao@gmail.com> | 2009-12-26 03:23:02 -0500 |
---|---|---|
committer | Eric Miao <eric.y.miao@gmail.com> | 2010-03-01 18:40:51 -0500 |
commit | 19851c58e680f71d087b79b53edbf814193e1d33 (patch) | |
tree | 50a1c533c9953ec5e9c95d970a1e9788cf5308aa /arch/arm | |
parent | 08fa159003aa510027951671b94aadc380ab2d2a (diff) |
[ARM] sa1111: allow cascaded IRQs to be used by platforms
Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/common/sa1111.c | 112 | ||||
-rw-r--r-- | arch/arm/include/asm/hardware/sa1111.h | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/include/mach/irqs.h | 54 | ||||
-rw-r--r-- | arch/arm/mach-pxa/lubbock.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/badge4.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/include/mach/irqs.h | 54 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/jornada720.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-sa1100/neponset.c | 5 |
8 files changed, 116 insertions, 130 deletions
diff --git a/arch/arm/common/sa1111.c b/arch/arm/common/sa1111.c index 8ba7044c554d..a52a27c1d9be 100644 --- a/arch/arm/common/sa1111.c +++ b/arch/arm/common/sa1111.c | |||
@@ -35,6 +35,58 @@ | |||
35 | 35 | ||
36 | #include <asm/hardware/sa1111.h> | 36 | #include <asm/hardware/sa1111.h> |
37 | 37 | ||
38 | /* SA1111 IRQs */ | ||
39 | #define IRQ_GPAIN0 (0) | ||
40 | #define IRQ_GPAIN1 (1) | ||
41 | #define IRQ_GPAIN2 (2) | ||
42 | #define IRQ_GPAIN3 (3) | ||
43 | #define IRQ_GPBIN0 (4) | ||
44 | #define IRQ_GPBIN1 (5) | ||
45 | #define IRQ_GPBIN2 (6) | ||
46 | #define IRQ_GPBIN3 (7) | ||
47 | #define IRQ_GPBIN4 (8) | ||
48 | #define IRQ_GPBIN5 (9) | ||
49 | #define IRQ_GPCIN0 (10) | ||
50 | #define IRQ_GPCIN1 (11) | ||
51 | #define IRQ_GPCIN2 (12) | ||
52 | #define IRQ_GPCIN3 (13) | ||
53 | #define IRQ_GPCIN4 (14) | ||
54 | #define IRQ_GPCIN5 (15) | ||
55 | #define IRQ_GPCIN6 (16) | ||
56 | #define IRQ_GPCIN7 (17) | ||
57 | #define IRQ_MSTXINT (18) | ||
58 | #define IRQ_MSRXINT (19) | ||
59 | #define IRQ_MSSTOPERRINT (20) | ||
60 | #define IRQ_TPTXINT (21) | ||
61 | #define IRQ_TPRXINT (22) | ||
62 | #define IRQ_TPSTOPERRINT (23) | ||
63 | #define SSPXMTINT (24) | ||
64 | #define SSPRCVINT (25) | ||
65 | #define SSPROR (26) | ||
66 | #define AUDXMTDMADONEA (32) | ||
67 | #define AUDRCVDMADONEA (33) | ||
68 | #define AUDXMTDMADONEB (34) | ||
69 | #define AUDRCVDMADONEB (35) | ||
70 | #define AUDTFSR (36) | ||
71 | #define AUDRFSR (37) | ||
72 | #define AUDTUR (38) | ||
73 | #define AUDROR (39) | ||
74 | #define AUDDTS (40) | ||
75 | #define AUDRDD (41) | ||
76 | #define AUDSTO (42) | ||
77 | #define IRQ_USBPWR (43) | ||
78 | #define IRQ_HCIM (44) | ||
79 | #define IRQ_HCIBUFFACC (45) | ||
80 | #define IRQ_HCIRMTWKP (46) | ||
81 | #define IRQ_NHCIMFCIR (47) | ||
82 | #define IRQ_USB_PORT_RESUME (48) | ||
83 | #define IRQ_S0_READY_NINT (49) | ||
84 | #define IRQ_S1_READY_NINT (50) | ||
85 | #define IRQ_S0_CD_VALID (51) | ||
86 | #define IRQ_S1_CD_VALID (52) | ||
87 | #define IRQ_S0_BVD1_STSCHG (53) | ||
88 | #define IRQ_S1_BVD1_STSCHG (54) | ||
89 | |||
38 | extern void __init sa1110_mb_enable(void); | 90 | extern void __init sa1110_mb_enable(void); |
39 | 91 | ||
40 | /* | 92 | /* |
@@ -49,6 +101,7 @@ struct sa1111 { | |||
49 | struct clk *clk; | 101 | struct clk *clk; |
50 | unsigned long phys; | 102 | unsigned long phys; |
51 | int irq; | 103 | int irq; |
104 | int irq_base; /* base for cascaded on-chip IRQs */ | ||
52 | spinlock_t lock; | 105 | spinlock_t lock; |
53 | void __iomem *base; | 106 | void __iomem *base; |
54 | #ifdef CONFIG_PM | 107 | #ifdef CONFIG_PM |
@@ -152,36 +205,37 @@ static void | |||
152 | sa1111_irq_handler(unsigned int irq, struct irq_desc *desc) | 205 | sa1111_irq_handler(unsigned int irq, struct irq_desc *desc) |
153 | { | 206 | { |
154 | unsigned int stat0, stat1, i; | 207 | unsigned int stat0, stat1, i; |
155 | void __iomem *base = get_irq_data(irq); | 208 | struct sa1111 *sachip = get_irq_data(irq); |
209 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
156 | 210 | ||
157 | stat0 = sa1111_readl(base + SA1111_INTSTATCLR0); | 211 | stat0 = sa1111_readl(mapbase + SA1111_INTSTATCLR0); |
158 | stat1 = sa1111_readl(base + SA1111_INTSTATCLR1); | 212 | stat1 = sa1111_readl(mapbase + SA1111_INTSTATCLR1); |
159 | 213 | ||
160 | sa1111_writel(stat0, base + SA1111_INTSTATCLR0); | 214 | sa1111_writel(stat0, mapbase + SA1111_INTSTATCLR0); |
161 | 215 | ||
162 | desc->chip->ack(irq); | 216 | desc->chip->ack(irq); |
163 | 217 | ||
164 | sa1111_writel(stat1, base + SA1111_INTSTATCLR1); | 218 | sa1111_writel(stat1, mapbase + SA1111_INTSTATCLR1); |
165 | 219 | ||
166 | if (stat0 == 0 && stat1 == 0) { | 220 | if (stat0 == 0 && stat1 == 0) { |
167 | do_bad_IRQ(irq, desc); | 221 | do_bad_IRQ(irq, desc); |
168 | return; | 222 | return; |
169 | } | 223 | } |
170 | 224 | ||
171 | for (i = IRQ_SA1111_START; stat0; i++, stat0 >>= 1) | 225 | for (i = 0; stat0; i++, stat0 >>= 1) |
172 | if (stat0 & 1) | 226 | if (stat0 & 1) |
173 | handle_edge_irq(i, irq_desc + i); | 227 | generic_handle_irq(i + sachip->irq_base); |
174 | 228 | ||
175 | for (i = IRQ_SA1111_START + 32; stat1; i++, stat1 >>= 1) | 229 | for (i = 32; stat1; i++, stat1 >>= 1) |
176 | if (stat1 & 1) | 230 | if (stat1 & 1) |
177 | handle_edge_irq(i, irq_desc + i); | 231 | generic_handle_irq(i + sachip->irq_base); |
178 | 232 | ||
179 | /* For level-based interrupts */ | 233 | /* For level-based interrupts */ |
180 | desc->chip->unmask(irq); | 234 | desc->chip->unmask(irq); |
181 | } | 235 | } |
182 | 236 | ||
183 | #define SA1111_IRQMASK_LO(x) (1 << (x - IRQ_SA1111_START)) | 237 | #define SA1111_IRQMASK_LO(x) (1 << (x - sachip->irq_base)) |
184 | #define SA1111_IRQMASK_HI(x) (1 << (x - IRQ_SA1111_START - 32)) | 238 | #define SA1111_IRQMASK_HI(x) (1 << (x - sachip->irq_base - 32)) |
185 | 239 | ||
186 | static void sa1111_ack_irq(unsigned int irq) | 240 | static void sa1111_ack_irq(unsigned int irq) |
187 | { | 241 | { |
@@ -189,7 +243,8 @@ static void sa1111_ack_irq(unsigned int irq) | |||
189 | 243 | ||
190 | static void sa1111_mask_lowirq(unsigned int irq) | 244 | static void sa1111_mask_lowirq(unsigned int irq) |
191 | { | 245 | { |
192 | void __iomem *mapbase = get_irq_chip_data(irq); | 246 | struct sa1111 *sachip = get_irq_chip_data(irq); |
247 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
193 | unsigned long ie0; | 248 | unsigned long ie0; |
194 | 249 | ||
195 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); | 250 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); |
@@ -199,7 +254,8 @@ static void sa1111_mask_lowirq(unsigned int irq) | |||
199 | 254 | ||
200 | static void sa1111_unmask_lowirq(unsigned int irq) | 255 | static void sa1111_unmask_lowirq(unsigned int irq) |
201 | { | 256 | { |
202 | void __iomem *mapbase = get_irq_chip_data(irq); | 257 | struct sa1111 *sachip = get_irq_chip_data(irq); |
258 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
203 | unsigned long ie0; | 259 | unsigned long ie0; |
204 | 260 | ||
205 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); | 261 | ie0 = sa1111_readl(mapbase + SA1111_INTEN0); |
@@ -216,8 +272,9 @@ static void sa1111_unmask_lowirq(unsigned int irq) | |||
216 | */ | 272 | */ |
217 | static int sa1111_retrigger_lowirq(unsigned int irq) | 273 | static int sa1111_retrigger_lowirq(unsigned int irq) |
218 | { | 274 | { |
275 | struct sa1111 *sachip = get_irq_chip_data(irq); | ||
276 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
219 | unsigned int mask = SA1111_IRQMASK_LO(irq); | 277 | unsigned int mask = SA1111_IRQMASK_LO(irq); |
220 | void __iomem *mapbase = get_irq_chip_data(irq); | ||
221 | unsigned long ip0; | 278 | unsigned long ip0; |
222 | int i; | 279 | int i; |
223 | 280 | ||
@@ -237,8 +294,9 @@ static int sa1111_retrigger_lowirq(unsigned int irq) | |||
237 | 294 | ||
238 | static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) | 295 | static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) |
239 | { | 296 | { |
297 | struct sa1111 *sachip = get_irq_chip_data(irq); | ||
298 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
240 | unsigned int mask = SA1111_IRQMASK_LO(irq); | 299 | unsigned int mask = SA1111_IRQMASK_LO(irq); |
241 | void __iomem *mapbase = get_irq_chip_data(irq); | ||
242 | unsigned long ip0; | 300 | unsigned long ip0; |
243 | 301 | ||
244 | if (flags == IRQ_TYPE_PROBE) | 302 | if (flags == IRQ_TYPE_PROBE) |
@@ -260,8 +318,9 @@ static int sa1111_type_lowirq(unsigned int irq, unsigned int flags) | |||
260 | 318 | ||
261 | static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) | 319 | static int sa1111_wake_lowirq(unsigned int irq, unsigned int on) |
262 | { | 320 | { |
321 | struct sa1111 *sachip = get_irq_chip_data(irq); | ||
322 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
263 | unsigned int mask = SA1111_IRQMASK_LO(irq); | 323 | unsigned int mask = SA1111_IRQMASK_LO(irq); |
264 | void __iomem *mapbase = get_irq_chip_data(irq); | ||
265 | unsigned long we0; | 324 | unsigned long we0; |
266 | 325 | ||
267 | we0 = sa1111_readl(mapbase + SA1111_WAKEEN0); | 326 | we0 = sa1111_readl(mapbase + SA1111_WAKEEN0); |
@@ -286,7 +345,8 @@ static struct irq_chip sa1111_low_chip = { | |||
286 | 345 | ||
287 | static void sa1111_mask_highirq(unsigned int irq) | 346 | static void sa1111_mask_highirq(unsigned int irq) |
288 | { | 347 | { |
289 | void __iomem *mapbase = get_irq_chip_data(irq); | 348 | struct sa1111 *sachip = get_irq_chip_data(irq); |
349 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
290 | unsigned long ie1; | 350 | unsigned long ie1; |
291 | 351 | ||
292 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); | 352 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); |
@@ -296,7 +356,8 @@ static void sa1111_mask_highirq(unsigned int irq) | |||
296 | 356 | ||
297 | static void sa1111_unmask_highirq(unsigned int irq) | 357 | static void sa1111_unmask_highirq(unsigned int irq) |
298 | { | 358 | { |
299 | void __iomem *mapbase = get_irq_chip_data(irq); | 359 | struct sa1111 *sachip = get_irq_chip_data(irq); |
360 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
300 | unsigned long ie1; | 361 | unsigned long ie1; |
301 | 362 | ||
302 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); | 363 | ie1 = sa1111_readl(mapbase + SA1111_INTEN1); |
@@ -313,8 +374,9 @@ static void sa1111_unmask_highirq(unsigned int irq) | |||
313 | */ | 374 | */ |
314 | static int sa1111_retrigger_highirq(unsigned int irq) | 375 | static int sa1111_retrigger_highirq(unsigned int irq) |
315 | { | 376 | { |
377 | struct sa1111 *sachip = get_irq_chip_data(irq); | ||
378 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
316 | unsigned int mask = SA1111_IRQMASK_HI(irq); | 379 | unsigned int mask = SA1111_IRQMASK_HI(irq); |
317 | void __iomem *mapbase = get_irq_chip_data(irq); | ||
318 | unsigned long ip1; | 380 | unsigned long ip1; |
319 | int i; | 381 | int i; |
320 | 382 | ||
@@ -334,8 +396,9 @@ static int sa1111_retrigger_highirq(unsigned int irq) | |||
334 | 396 | ||
335 | static int sa1111_type_highirq(unsigned int irq, unsigned int flags) | 397 | static int sa1111_type_highirq(unsigned int irq, unsigned int flags) |
336 | { | 398 | { |
399 | struct sa1111 *sachip = get_irq_chip_data(irq); | ||
400 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
337 | unsigned int mask = SA1111_IRQMASK_HI(irq); | 401 | unsigned int mask = SA1111_IRQMASK_HI(irq); |
338 | void __iomem *mapbase = get_irq_chip_data(irq); | ||
339 | unsigned long ip1; | 402 | unsigned long ip1; |
340 | 403 | ||
341 | if (flags == IRQ_TYPE_PROBE) | 404 | if (flags == IRQ_TYPE_PROBE) |
@@ -357,8 +420,9 @@ static int sa1111_type_highirq(unsigned int irq, unsigned int flags) | |||
357 | 420 | ||
358 | static int sa1111_wake_highirq(unsigned int irq, unsigned int on) | 421 | static int sa1111_wake_highirq(unsigned int irq, unsigned int on) |
359 | { | 422 | { |
423 | struct sa1111 *sachip = get_irq_chip_data(irq); | ||
424 | void __iomem *mapbase = sachip->base + SA1111_INTC; | ||
360 | unsigned int mask = SA1111_IRQMASK_HI(irq); | 425 | unsigned int mask = SA1111_IRQMASK_HI(irq); |
361 | void __iomem *mapbase = get_irq_chip_data(irq); | ||
362 | unsigned long we1; | 426 | unsigned long we1; |
363 | 427 | ||
364 | we1 = sa1111_readl(mapbase + SA1111_WAKEEN1); | 428 | we1 = sa1111_readl(mapbase + SA1111_WAKEEN1); |
@@ -412,14 +476,14 @@ static void sa1111_setup_irq(struct sa1111 *sachip) | |||
412 | 476 | ||
413 | for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) { | 477 | for (irq = IRQ_GPAIN0; irq <= SSPROR; irq++) { |
414 | set_irq_chip(irq, &sa1111_low_chip); | 478 | set_irq_chip(irq, &sa1111_low_chip); |
415 | set_irq_chip_data(irq, irqbase); | 479 | set_irq_chip_data(irq, sachip); |
416 | set_irq_handler(irq, handle_edge_irq); | 480 | set_irq_handler(irq, handle_edge_irq); |
417 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 481 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
418 | } | 482 | } |
419 | 483 | ||
420 | for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) { | 484 | for (irq = AUDXMTDMADONEA; irq <= IRQ_S1_BVD1_STSCHG; irq++) { |
421 | set_irq_chip(irq, &sa1111_high_chip); | 485 | set_irq_chip(irq, &sa1111_high_chip); |
422 | set_irq_chip_data(irq, irqbase); | 486 | set_irq_chip_data(irq, sachip); |
423 | set_irq_handler(irq, handle_edge_irq); | 487 | set_irq_handler(irq, handle_edge_irq); |
424 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 488 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
425 | } | 489 | } |
@@ -428,7 +492,7 @@ static void sa1111_setup_irq(struct sa1111 *sachip) | |||
428 | * Register SA1111 interrupt | 492 | * Register SA1111 interrupt |
429 | */ | 493 | */ |
430 | set_irq_type(sachip->irq, IRQ_TYPE_EDGE_RISING); | 494 | set_irq_type(sachip->irq, IRQ_TYPE_EDGE_RISING); |
431 | set_irq_data(sachip->irq, irqbase); | 495 | set_irq_data(sachip->irq, sachip); |
432 | set_irq_chained_handler(sachip->irq, sa1111_irq_handler); | 496 | set_irq_chained_handler(sachip->irq, sa1111_irq_handler); |
433 | } | 497 | } |
434 | 498 | ||
diff --git a/arch/arm/include/asm/hardware/sa1111.h b/arch/arm/include/asm/hardware/sa1111.h index 5da2595759e5..92ed254c175b 100644 --- a/arch/arm/include/asm/hardware/sa1111.h +++ b/arch/arm/include/asm/hardware/sa1111.h | |||
@@ -578,4 +578,8 @@ void sa1111_set_io_dir(struct sa1111_dev *sadev, unsigned int bits, unsigned int | |||
578 | void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); | 578 | void sa1111_set_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); |
579 | void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); | 579 | void sa1111_set_sleep_io(struct sa1111_dev *sadev, unsigned int bits, unsigned int v); |
580 | 580 | ||
581 | struct sa1111_platform_data { | ||
582 | int irq_base; /* base for cascaded on-chip IRQs */ | ||
583 | }; | ||
584 | |||
581 | #endif /* _ASM_ARCH_SA1111 */ | 585 | #endif /* _ASM_ARCH_SA1111 */ |
diff --git a/arch/arm/mach-pxa/include/mach/irqs.h b/arch/arm/mach-pxa/include/mach/irqs.h index 83b14f193a63..b35b3ac86e45 100644 --- a/arch/arm/mach-pxa/include/mach/irqs.h +++ b/arch/arm/mach-pxa/include/mach/irqs.h | |||
@@ -135,58 +135,6 @@ | |||
135 | #define IRQ_BOARD_END (IRQ_BOARD_START + 16) | 135 | #define IRQ_BOARD_END (IRQ_BOARD_START + 16) |
136 | #endif | 136 | #endif |
137 | 137 | ||
138 | #define IRQ_SA1111_START (IRQ_BOARD_END) | ||
139 | #define IRQ_GPAIN0 (IRQ_BOARD_END + 0) | ||
140 | #define IRQ_GPAIN1 (IRQ_BOARD_END + 1) | ||
141 | #define IRQ_GPAIN2 (IRQ_BOARD_END + 2) | ||
142 | #define IRQ_GPAIN3 (IRQ_BOARD_END + 3) | ||
143 | #define IRQ_GPBIN0 (IRQ_BOARD_END + 4) | ||
144 | #define IRQ_GPBIN1 (IRQ_BOARD_END + 5) | ||
145 | #define IRQ_GPBIN2 (IRQ_BOARD_END + 6) | ||
146 | #define IRQ_GPBIN3 (IRQ_BOARD_END + 7) | ||
147 | #define IRQ_GPBIN4 (IRQ_BOARD_END + 8) | ||
148 | #define IRQ_GPBIN5 (IRQ_BOARD_END + 9) | ||
149 | #define IRQ_GPCIN0 (IRQ_BOARD_END + 10) | ||
150 | #define IRQ_GPCIN1 (IRQ_BOARD_END + 11) | ||
151 | #define IRQ_GPCIN2 (IRQ_BOARD_END + 12) | ||
152 | #define IRQ_GPCIN3 (IRQ_BOARD_END + 13) | ||
153 | #define IRQ_GPCIN4 (IRQ_BOARD_END + 14) | ||
154 | #define IRQ_GPCIN5 (IRQ_BOARD_END + 15) | ||
155 | #define IRQ_GPCIN6 (IRQ_BOARD_END + 16) | ||
156 | #define IRQ_GPCIN7 (IRQ_BOARD_END + 17) | ||
157 | #define IRQ_MSTXINT (IRQ_BOARD_END + 18) | ||
158 | #define IRQ_MSRXINT (IRQ_BOARD_END + 19) | ||
159 | #define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20) | ||
160 | #define IRQ_TPTXINT (IRQ_BOARD_END + 21) | ||
161 | #define IRQ_TPRXINT (IRQ_BOARD_END + 22) | ||
162 | #define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23) | ||
163 | #define SSPXMTINT (IRQ_BOARD_END + 24) | ||
164 | #define SSPRCVINT (IRQ_BOARD_END + 25) | ||
165 | #define SSPROR (IRQ_BOARD_END + 26) | ||
166 | #define AUDXMTDMADONEA (IRQ_BOARD_END + 32) | ||
167 | #define AUDRCVDMADONEA (IRQ_BOARD_END + 33) | ||
168 | #define AUDXMTDMADONEB (IRQ_BOARD_END + 34) | ||
169 | #define AUDRCVDMADONEB (IRQ_BOARD_END + 35) | ||
170 | #define AUDTFSR (IRQ_BOARD_END + 36) | ||
171 | #define AUDRFSR (IRQ_BOARD_END + 37) | ||
172 | #define AUDTUR (IRQ_BOARD_END + 38) | ||
173 | #define AUDROR (IRQ_BOARD_END + 39) | ||
174 | #define AUDDTS (IRQ_BOARD_END + 40) | ||
175 | #define AUDRDD (IRQ_BOARD_END + 41) | ||
176 | #define AUDSTO (IRQ_BOARD_END + 42) | ||
177 | #define IRQ_USBPWR (IRQ_BOARD_END + 43) | ||
178 | #define IRQ_HCIM (IRQ_BOARD_END + 44) | ||
179 | #define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45) | ||
180 | #define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46) | ||
181 | #define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47) | ||
182 | #define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48) | ||
183 | #define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49) | ||
184 | #define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50) | ||
185 | #define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51) | ||
186 | #define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52) | ||
187 | #define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53) | ||
188 | #define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54) | ||
189 | |||
190 | /* | 138 | /* |
191 | * Figure out the MAX IRQ number. | 139 | * Figure out the MAX IRQ number. |
192 | * | 140 | * |
@@ -195,7 +143,7 @@ | |||
195 | * Otherwise, we have the standard IRQs only. | 143 | * Otherwise, we have the standard IRQs only. |
196 | */ | 144 | */ |
197 | #ifdef CONFIG_SA1111 | 145 | #ifdef CONFIG_SA1111 |
198 | #define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1) | 146 | #define NR_IRQS (IRQ_BOARD_END + 55) |
199 | #elif defined(CONFIG_PXA_HAVE_BOARD_IRQS) | 147 | #elif defined(CONFIG_PXA_HAVE_BOARD_IRQS) |
200 | #define NR_IRQS (IRQ_BOARD_END) | 148 | #define NR_IRQS (IRQ_BOARD_END) |
201 | #else | 149 | #else |
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c index 2f5e45e08f5c..63d65a2a0387 100644 --- a/arch/arm/mach-pxa/lubbock.c +++ b/arch/arm/mach-pxa/lubbock.c | |||
@@ -228,11 +228,18 @@ static struct resource sa1111_resources[] = { | |||
228 | }, | 228 | }, |
229 | }; | 229 | }; |
230 | 230 | ||
231 | static struct sa1111_platform_data sa1111_info = { | ||
232 | .irq_base = IRQ_BOARD_END, | ||
233 | }; | ||
234 | |||
231 | static struct platform_device sa1111_device = { | 235 | static struct platform_device sa1111_device = { |
232 | .name = "sa1111", | 236 | .name = "sa1111", |
233 | .id = -1, | 237 | .id = -1, |
234 | .num_resources = ARRAY_SIZE(sa1111_resources), | 238 | .num_resources = ARRAY_SIZE(sa1111_resources), |
235 | .resource = sa1111_resources, | 239 | .resource = sa1111_resources, |
240 | .dev = { | ||
241 | .platform_data = &sa1111_info, | ||
242 | }, | ||
236 | }; | 243 | }; |
237 | 244 | ||
238 | /* ADS7846 is connected through SSP ... and if your board has J5 populated, | 245 | /* ADS7846 is connected through SSP ... and if your board has J5 populated, |
diff --git a/arch/arm/mach-sa1100/badge4.c b/arch/arm/mach-sa1100/badge4.c index 051ec0f0023c..259cb2c15fff 100644 --- a/arch/arm/mach-sa1100/badge4.c +++ b/arch/arm/mach-sa1100/badge4.c | |||
@@ -51,6 +51,10 @@ static struct resource sa1111_resources[] = { | |||
51 | }, | 51 | }, |
52 | }; | 52 | }; |
53 | 53 | ||
54 | static struct sa1111_platform_data sa1111_info = { | ||
55 | .irq_base = IRQ_BOARD_END, | ||
56 | }; | ||
57 | |||
54 | static u64 sa1111_dmamask = 0xffffffffUL; | 58 | static u64 sa1111_dmamask = 0xffffffffUL; |
55 | 59 | ||
56 | static struct platform_device sa1111_device = { | 60 | static struct platform_device sa1111_device = { |
@@ -59,6 +63,7 @@ static struct platform_device sa1111_device = { | |||
59 | .dev = { | 63 | .dev = { |
60 | .dma_mask = &sa1111_dmamask, | 64 | .dma_mask = &sa1111_dmamask, |
61 | .coherent_dma_mask = 0xffffffff, | 65 | .coherent_dma_mask = 0xffffffff, |
66 | .platform_data = &sa1111_info, | ||
62 | }, | 67 | }, |
63 | .num_resources = ARRAY_SIZE(sa1111_resources), | 68 | .num_resources = ARRAY_SIZE(sa1111_resources), |
64 | .resource = sa1111_resources, | 69 | .resource = sa1111_resources, |
diff --git a/arch/arm/mach-sa1100/include/mach/irqs.h b/arch/arm/mach-sa1100/include/mach/irqs.h index 6e51b549a4d1..8c8845b5ae5b 100644 --- a/arch/arm/mach-sa1100/include/mach/irqs.h +++ b/arch/arm/mach-sa1100/include/mach/irqs.h | |||
@@ -68,58 +68,6 @@ | |||
68 | #define IRQ_BOARD_START 49 | 68 | #define IRQ_BOARD_START 49 |
69 | #define IRQ_BOARD_END 65 | 69 | #define IRQ_BOARD_END 65 |
70 | 70 | ||
71 | #define IRQ_SA1111_START (IRQ_BOARD_END) | ||
72 | #define IRQ_GPAIN0 (IRQ_BOARD_END + 0) | ||
73 | #define IRQ_GPAIN1 (IRQ_BOARD_END + 1) | ||
74 | #define IRQ_GPAIN2 (IRQ_BOARD_END + 2) | ||
75 | #define IRQ_GPAIN3 (IRQ_BOARD_END + 3) | ||
76 | #define IRQ_GPBIN0 (IRQ_BOARD_END + 4) | ||
77 | #define IRQ_GPBIN1 (IRQ_BOARD_END + 5) | ||
78 | #define IRQ_GPBIN2 (IRQ_BOARD_END + 6) | ||
79 | #define IRQ_GPBIN3 (IRQ_BOARD_END + 7) | ||
80 | #define IRQ_GPBIN4 (IRQ_BOARD_END + 8) | ||
81 | #define IRQ_GPBIN5 (IRQ_BOARD_END + 9) | ||
82 | #define IRQ_GPCIN0 (IRQ_BOARD_END + 10) | ||
83 | #define IRQ_GPCIN1 (IRQ_BOARD_END + 11) | ||
84 | #define IRQ_GPCIN2 (IRQ_BOARD_END + 12) | ||
85 | #define IRQ_GPCIN3 (IRQ_BOARD_END + 13) | ||
86 | #define IRQ_GPCIN4 (IRQ_BOARD_END + 14) | ||
87 | #define IRQ_GPCIN5 (IRQ_BOARD_END + 15) | ||
88 | #define IRQ_GPCIN6 (IRQ_BOARD_END + 16) | ||
89 | #define IRQ_GPCIN7 (IRQ_BOARD_END + 17) | ||
90 | #define IRQ_MSTXINT (IRQ_BOARD_END + 18) | ||
91 | #define IRQ_MSRXINT (IRQ_BOARD_END + 19) | ||
92 | #define IRQ_MSSTOPERRINT (IRQ_BOARD_END + 20) | ||
93 | #define IRQ_TPTXINT (IRQ_BOARD_END + 21) | ||
94 | #define IRQ_TPRXINT (IRQ_BOARD_END + 22) | ||
95 | #define IRQ_TPSTOPERRINT (IRQ_BOARD_END + 23) | ||
96 | #define SSPXMTINT (IRQ_BOARD_END + 24) | ||
97 | #define SSPRCVINT (IRQ_BOARD_END + 25) | ||
98 | #define SSPROR (IRQ_BOARD_END + 26) | ||
99 | #define AUDXMTDMADONEA (IRQ_BOARD_END + 32) | ||
100 | #define AUDRCVDMADONEA (IRQ_BOARD_END + 33) | ||
101 | #define AUDXMTDMADONEB (IRQ_BOARD_END + 34) | ||
102 | #define AUDRCVDMADONEB (IRQ_BOARD_END + 35) | ||
103 | #define AUDTFSR (IRQ_BOARD_END + 36) | ||
104 | #define AUDRFSR (IRQ_BOARD_END + 37) | ||
105 | #define AUDTUR (IRQ_BOARD_END + 38) | ||
106 | #define AUDROR (IRQ_BOARD_END + 39) | ||
107 | #define AUDDTS (IRQ_BOARD_END + 40) | ||
108 | #define AUDRDD (IRQ_BOARD_END + 41) | ||
109 | #define AUDSTO (IRQ_BOARD_END + 42) | ||
110 | #define IRQ_USBPWR (IRQ_BOARD_END + 43) | ||
111 | #define IRQ_HCIM (IRQ_BOARD_END + 44) | ||
112 | #define IRQ_HCIBUFFACC (IRQ_BOARD_END + 45) | ||
113 | #define IRQ_HCIRMTWKP (IRQ_BOARD_END + 46) | ||
114 | #define IRQ_NHCIMFCIR (IRQ_BOARD_END + 47) | ||
115 | #define IRQ_USB_PORT_RESUME (IRQ_BOARD_END + 48) | ||
116 | #define IRQ_S0_READY_NINT (IRQ_BOARD_END + 49) | ||
117 | #define IRQ_S1_READY_NINT (IRQ_BOARD_END + 50) | ||
118 | #define IRQ_S0_CD_VALID (IRQ_BOARD_END + 51) | ||
119 | #define IRQ_S1_CD_VALID (IRQ_BOARD_END + 52) | ||
120 | #define IRQ_S0_BVD1_STSCHG (IRQ_BOARD_END + 53) | ||
121 | #define IRQ_S1_BVD1_STSCHG (IRQ_BOARD_END + 54) | ||
122 | |||
123 | /* | 71 | /* |
124 | * Figure out the MAX IRQ number. | 72 | * Figure out the MAX IRQ number. |
125 | * | 73 | * |
@@ -128,7 +76,7 @@ | |||
128 | * Otherwise, we have the standard IRQs only. | 76 | * Otherwise, we have the standard IRQs only. |
129 | */ | 77 | */ |
130 | #ifdef CONFIG_SA1111 | 78 | #ifdef CONFIG_SA1111 |
131 | #define NR_IRQS (IRQ_S1_BVD1_STSCHG + 1) | 79 | #define NR_IRQS (IRQ_BOARD_END + 55) |
132 | #elif defined(CONFIG_SHARPSL_LOCOMO) | 80 | #elif defined(CONFIG_SHARPSL_LOCOMO) |
133 | #define NR_IRQS (IRQ_BOARD_START + 4) | 81 | #define NR_IRQS (IRQ_BOARD_START + 4) |
134 | #else | 82 | #else |
diff --git a/arch/arm/mach-sa1100/jornada720.c b/arch/arm/mach-sa1100/jornada720.c index 13ebd2d99bfd..d3ec620618f1 100644 --- a/arch/arm/mach-sa1100/jornada720.c +++ b/arch/arm/mach-sa1100/jornada720.c | |||
@@ -208,6 +208,10 @@ static struct resource sa1111_resources[] = { | |||
208 | }, | 208 | }, |
209 | }; | 209 | }; |
210 | 210 | ||
211 | static struct sa1111_platform_data sa1111_info = { | ||
212 | .irq_base = IRQ_BOARD_END, | ||
213 | }; | ||
214 | |||
211 | static u64 sa1111_dmamask = 0xffffffffUL; | 215 | static u64 sa1111_dmamask = 0xffffffffUL; |
212 | 216 | ||
213 | static struct platform_device sa1111_device = { | 217 | static struct platform_device sa1111_device = { |
@@ -216,6 +220,7 @@ static struct platform_device sa1111_device = { | |||
216 | .dev = { | 220 | .dev = { |
217 | .dma_mask = &sa1111_dmamask, | 221 | .dma_mask = &sa1111_dmamask, |
218 | .coherent_dma_mask = 0xffffffff, | 222 | .coherent_dma_mask = 0xffffffff, |
223 | .platform_data = &sa1111_info, | ||
219 | }, | 224 | }, |
220 | .num_resources = ARRAY_SIZE(sa1111_resources), | 225 | .num_resources = ARRAY_SIZE(sa1111_resources), |
221 | .resource = sa1111_resources, | 226 | .resource = sa1111_resources, |
diff --git a/arch/arm/mach-sa1100/neponset.c b/arch/arm/mach-sa1100/neponset.c index 6ccd175bc4cf..0b505d9f22d6 100644 --- a/arch/arm/mach-sa1100/neponset.c +++ b/arch/arm/mach-sa1100/neponset.c | |||
@@ -241,6 +241,10 @@ static struct resource sa1111_resources[] = { | |||
241 | }, | 241 | }, |
242 | }; | 242 | }; |
243 | 243 | ||
244 | static struct sa1111_platform_data sa1111_info = { | ||
245 | .irq_base = IRQ_BOARD_END, | ||
246 | }; | ||
247 | |||
244 | static u64 sa1111_dmamask = 0xffffffffUL; | 248 | static u64 sa1111_dmamask = 0xffffffffUL; |
245 | 249 | ||
246 | static struct platform_device sa1111_device = { | 250 | static struct platform_device sa1111_device = { |
@@ -249,6 +253,7 @@ static struct platform_device sa1111_device = { | |||
249 | .dev = { | 253 | .dev = { |
250 | .dma_mask = &sa1111_dmamask, | 254 | .dma_mask = &sa1111_dmamask, |
251 | .coherent_dma_mask = 0xffffffff, | 255 | .coherent_dma_mask = 0xffffffff, |
256 | .platform_data = &sa1111_info, | ||
252 | }, | 257 | }, |
253 | .num_resources = ARRAY_SIZE(sa1111_resources), | 258 | .num_resources = ARRAY_SIZE(sa1111_resources), |
254 | .resource = sa1111_resources, | 259 | .resource = sa1111_resources, |