diff options
author | Paul Mundt <lethal@linux-sh.org> | 2012-05-18 01:04:49 -0400 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2012-05-18 01:04:49 -0400 |
commit | ddb3208497599764cd7209b4c1b7e2a607689a6b (patch) | |
tree | 4f6143d027d55a1add988a192d91d744bcff2093 /arch/sh | |
parent | 89ed34f34842fc4ed766a93838302f613d5f4801 (diff) |
sh: sh7785 evt2irq migration.
Migrate SH7785 to evt2irq() backed hwirq lookups.
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh')
-rw-r--r-- | arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 43 |
1 files changed, 25 insertions, 18 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c index 81588ef15a6..0968ecb962e 100644 --- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c +++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c | |||
@@ -15,6 +15,7 @@ | |||
15 | #include <linux/mm.h> | 15 | #include <linux/mm.h> |
16 | #include <linux/sh_dma.h> | 16 | #include <linux/sh_dma.h> |
17 | #include <linux/sh_timer.h> | 17 | #include <linux/sh_timer.h> |
18 | #include <linux/sh_intc.h> | ||
18 | #include <asm/mmzone.h> | 19 | #include <asm/mmzone.h> |
19 | #include <cpu/dma-register.h> | 20 | #include <cpu/dma-register.h> |
20 | 21 | ||
@@ -24,7 +25,7 @@ static struct plat_sci_port scif0_platform_data = { | |||
24 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, | 25 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, |
25 | .scbrr_algo_id = SCBRR_ALGO_1, | 26 | .scbrr_algo_id = SCBRR_ALGO_1, |
26 | .type = PORT_SCIF, | 27 | .type = PORT_SCIF, |
27 | .irqs = { 40, 40, 40, 40 }, | 28 | .irqs = SCIx_IRQ_MUXED(evt2irq(0x700)), |
28 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, | 29 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, |
29 | }; | 30 | }; |
30 | 31 | ||
@@ -42,7 +43,7 @@ static struct plat_sci_port scif1_platform_data = { | |||
42 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, | 43 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, |
43 | .scbrr_algo_id = SCBRR_ALGO_1, | 44 | .scbrr_algo_id = SCBRR_ALGO_1, |
44 | .type = PORT_SCIF, | 45 | .type = PORT_SCIF, |
45 | .irqs = { 44, 44, 44, 44 }, | 46 | .irqs = SCIx_IRQ_MUXED(evt2irq(0x780)), |
46 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, | 47 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, |
47 | }; | 48 | }; |
48 | 49 | ||
@@ -60,7 +61,7 @@ static struct plat_sci_port scif2_platform_data = { | |||
60 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, | 61 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, |
61 | .scbrr_algo_id = SCBRR_ALGO_1, | 62 | .scbrr_algo_id = SCBRR_ALGO_1, |
62 | .type = PORT_SCIF, | 63 | .type = PORT_SCIF, |
63 | .irqs = { 60, 60, 60, 60 }, | 64 | .irqs = SCIx_IRQ_MUXED(evt2irq(0x980)), |
64 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, | 65 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, |
65 | }; | 66 | }; |
66 | 67 | ||
@@ -78,7 +79,7 @@ static struct plat_sci_port scif3_platform_data = { | |||
78 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, | 79 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, |
79 | .scbrr_algo_id = SCBRR_ALGO_1, | 80 | .scbrr_algo_id = SCBRR_ALGO_1, |
80 | .type = PORT_SCIF, | 81 | .type = PORT_SCIF, |
81 | .irqs = { 61, 61, 61, 61 }, | 82 | .irqs = SCIx_IRQ_MUXED(evt2irq(0x9a0)), |
82 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, | 83 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, |
83 | }; | 84 | }; |
84 | 85 | ||
@@ -96,7 +97,7 @@ static struct plat_sci_port scif4_platform_data = { | |||
96 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, | 97 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, |
97 | .scbrr_algo_id = SCBRR_ALGO_1, | 98 | .scbrr_algo_id = SCBRR_ALGO_1, |
98 | .type = PORT_SCIF, | 99 | .type = PORT_SCIF, |
99 | .irqs = { 62, 62, 62, 62 }, | 100 | .irqs = SCIx_IRQ_MUXED(evt2irq(0x9c0)), |
100 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, | 101 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, |
101 | }; | 102 | }; |
102 | 103 | ||
@@ -114,7 +115,7 @@ static struct plat_sci_port scif5_platform_data = { | |||
114 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, | 115 | .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1, |
115 | .scbrr_algo_id = SCBRR_ALGO_1, | 116 | .scbrr_algo_id = SCBRR_ALGO_1, |
116 | .type = PORT_SCIF, | 117 | .type = PORT_SCIF, |
117 | .irqs = { 63, 63, 63, 63 }, | 118 | .irqs = SCIx_IRQ_MUXED(evt2irq(0x9e0)), |
118 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, | 119 | .regtype = SCIx_SH4_SCIF_FIFODATA_REGTYPE, |
119 | }; | 120 | }; |
120 | 121 | ||
@@ -139,7 +140,7 @@ static struct resource tmu0_resources[] = { | |||
139 | .flags = IORESOURCE_MEM, | 140 | .flags = IORESOURCE_MEM, |
140 | }, | 141 | }, |
141 | [1] = { | 142 | [1] = { |
142 | .start = 28, | 143 | .start = evt2irq(0x580), |
143 | .flags = IORESOURCE_IRQ, | 144 | .flags = IORESOURCE_IRQ, |
144 | }, | 145 | }, |
145 | }; | 146 | }; |
@@ -167,7 +168,7 @@ static struct resource tmu1_resources[] = { | |||
167 | .flags = IORESOURCE_MEM, | 168 | .flags = IORESOURCE_MEM, |
168 | }, | 169 | }, |
169 | [1] = { | 170 | [1] = { |
170 | .start = 29, | 171 | .start = evt2irq(0x5a0), |
171 | .flags = IORESOURCE_IRQ, | 172 | .flags = IORESOURCE_IRQ, |
172 | }, | 173 | }, |
173 | }; | 174 | }; |
@@ -194,7 +195,7 @@ static struct resource tmu2_resources[] = { | |||
194 | .flags = IORESOURCE_MEM, | 195 | .flags = IORESOURCE_MEM, |
195 | }, | 196 | }, |
196 | [1] = { | 197 | [1] = { |
197 | .start = 30, | 198 | .start = evt2irq(0x5c0), |
198 | .flags = IORESOURCE_IRQ, | 199 | .flags = IORESOURCE_IRQ, |
199 | }, | 200 | }, |
200 | }; | 201 | }; |
@@ -221,7 +222,7 @@ static struct resource tmu3_resources[] = { | |||
221 | .flags = IORESOURCE_MEM, | 222 | .flags = IORESOURCE_MEM, |
222 | }, | 223 | }, |
223 | [1] = { | 224 | [1] = { |
224 | .start = 96, | 225 | .start = evt2irq(0xe00), |
225 | .flags = IORESOURCE_IRQ, | 226 | .flags = IORESOURCE_IRQ, |
226 | }, | 227 | }, |
227 | }; | 228 | }; |
@@ -248,7 +249,7 @@ static struct resource tmu4_resources[] = { | |||
248 | .flags = IORESOURCE_MEM, | 249 | .flags = IORESOURCE_MEM, |
249 | }, | 250 | }, |
250 | [1] = { | 251 | [1] = { |
251 | .start = 97, | 252 | .start = evt2irq(0xe20), |
252 | .flags = IORESOURCE_IRQ, | 253 | .flags = IORESOURCE_IRQ, |
253 | }, | 254 | }, |
254 | }; | 255 | }; |
@@ -275,7 +276,7 @@ static struct resource tmu5_resources[] = { | |||
275 | .flags = IORESOURCE_MEM, | 276 | .flags = IORESOURCE_MEM, |
276 | }, | 277 | }, |
277 | [1] = { | 278 | [1] = { |
278 | .start = 98, | 279 | .start = evt2irq(0xe40), |
279 | .flags = IORESOURCE_IRQ, | 280 | .flags = IORESOURCE_IRQ, |
280 | }, | 281 | }, |
281 | }; | 282 | }; |
@@ -375,10 +376,13 @@ static struct resource sh7785_dmae0_resources[] = { | |||
375 | .flags = IORESOURCE_MEM, | 376 | .flags = IORESOURCE_MEM, |
376 | }, | 377 | }, |
377 | { | 378 | { |
378 | /* Real DMA error IRQ is 39, and channel IRQs are 33-38 */ | 379 | /* |
380 | * Real DMA error vector is 0x6e0, and channel | ||
381 | * vectors are 0x620-0x6c0 | ||
382 | */ | ||
379 | .name = "error_irq", | 383 | .name = "error_irq", |
380 | .start = 33, | 384 | .start = evt2irq(0x620), |
381 | .end = 33, | 385 | .end = evt2irq(0x620), |
382 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE, | 386 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE, |
383 | }, | 387 | }, |
384 | }; | 388 | }; |
@@ -392,10 +396,13 @@ static struct resource sh7785_dmae1_resources[] = { | |||
392 | }, | 396 | }, |
393 | /* DMAC1 has no DMARS */ | 397 | /* DMAC1 has no DMARS */ |
394 | { | 398 | { |
395 | /* Real DMA error IRQ is 58, and channel IRQs are 52-57 */ | 399 | /* |
400 | * Real DMA error vector is 0x940, and channel | ||
401 | * vectors are 0x880-0x920 | ||
402 | */ | ||
396 | .name = "error_irq", | 403 | .name = "error_irq", |
397 | .start = 52, | 404 | .start = evt2irq(0x880), |
398 | .end = 52, | 405 | .end = evt2irq(0x880), |
399 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE, | 406 | .flags = IORESOURCE_IRQ | IORESOURCE_IRQ_SHAREABLE, |
400 | }, | 407 | }, |
401 | }; | 408 | }; |