aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2012-05-18 00:12:24 -0400
committerPaul Mundt <lethal@linux-sh.org>2012-05-18 00:12:24 -0400
commit16e9515358b28c787a057dfe010e797a9067294a (patch)
tree3ad49451ad82be54b6582e784f4ec89eeef2f64a /arch
parent933b954386dd6c8d04a0a406827e8c3febc619a5 (diff)
sh: sh7724 evt2irq migration.
Migrate SH7724 to evt2irq() backed hwirq lookups. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c77
1 files changed, 39 insertions, 38 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 4c671cfe68aa..26b74c2f9496 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -20,6 +20,7 @@
20#include <linux/uio_driver.h> 20#include <linux/uio_driver.h>
21#include <linux/sh_dma.h> 21#include <linux/sh_dma.h>
22#include <linux/sh_timer.h> 22#include <linux/sh_timer.h>
23#include <linux/sh_intc.h>
23#include <linux/io.h> 24#include <linux/io.h>
24#include <linux/notifier.h> 25#include <linux/notifier.h>
25 26
@@ -215,20 +216,20 @@ static struct resource sh7724_dmae0_resources[] = {
215 }, 216 },
216 { 217 {
217 .name = "error_irq", 218 .name = "error_irq",
218 .start = 78, 219 .start = evt2irq(0xbc0),
219 .end = 78, 220 .end = evt2irq(0xbc0),
220 .flags = IORESOURCE_IRQ, 221 .flags = IORESOURCE_IRQ,
221 }, 222 },
222 { 223 {
223 /* IRQ for channels 0-3 */ 224 /* IRQ for channels 0-3 */
224 .start = 48, 225 .start = evt2irq(0x800),
225 .end = 51, 226 .end = evt2irq(0x860),
226 .flags = IORESOURCE_IRQ, 227 .flags = IORESOURCE_IRQ,
227 }, 228 },
228 { 229 {
229 /* IRQ for channels 4-5 */ 230 /* IRQ for channels 4-5 */
230 .start = 76, 231 .start = evt2irq(0xb80),
231 .end = 77, 232 .end = evt2irq(0xba0),
232 .flags = IORESOURCE_IRQ, 233 .flags = IORESOURCE_IRQ,
233 }, 234 },
234}; 235};
@@ -249,20 +250,20 @@ static struct resource sh7724_dmae1_resources[] = {
249 }, 250 },
250 { 251 {
251 .name = "error_irq", 252 .name = "error_irq",
252 .start = 74, 253 .start = evt2irq(0xb40),
253 .end = 74, 254 .end = evt2irq(0xb40),
254 .flags = IORESOURCE_IRQ, 255 .flags = IORESOURCE_IRQ,
255 }, 256 },
256 { 257 {
257 /* IRQ for channels 0-3 */ 258 /* IRQ for channels 0-3 */
258 .start = 40, 259 .start = evt2irq(0x700),
259 .end = 43, 260 .end = evt2irq(0x760),
260 .flags = IORESOURCE_IRQ, 261 .flags = IORESOURCE_IRQ,
261 }, 262 },
262 { 263 {
263 /* IRQ for channels 4-5 */ 264 /* IRQ for channels 4-5 */
264 .start = 72, 265 .start = evt2irq(0xb00),
265 .end = 73, 266 .end = evt2irq(0xb20),
266 .flags = IORESOURCE_IRQ, 267 .flags = IORESOURCE_IRQ,
267 }, 268 },
268}; 269};
@@ -295,7 +296,7 @@ static struct plat_sci_port scif0_platform_data = {
295 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, 296 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
296 .scbrr_algo_id = SCBRR_ALGO_2, 297 .scbrr_algo_id = SCBRR_ALGO_2,
297 .type = PORT_SCIF, 298 .type = PORT_SCIF,
298 .irqs = { 80, 80, 80, 80 }, 299 .irqs = SCIx_IRQ_MUXED(evt2irq(0xc00)),
299 .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, 300 .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
300}; 301};
301 302
@@ -314,7 +315,7 @@ static struct plat_sci_port scif1_platform_data = {
314 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, 315 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
315 .scbrr_algo_id = SCBRR_ALGO_2, 316 .scbrr_algo_id = SCBRR_ALGO_2,
316 .type = PORT_SCIF, 317 .type = PORT_SCIF,
317 .irqs = { 81, 81, 81, 81 }, 318 .irqs = SCIx_IRQ_MUXED(evt2irq(0xc20)),
318 .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, 319 .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
319}; 320};
320 321
@@ -333,7 +334,7 @@ static struct plat_sci_port scif2_platform_data = {
333 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE, 334 .scscr = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
334 .scbrr_algo_id = SCBRR_ALGO_2, 335 .scbrr_algo_id = SCBRR_ALGO_2,
335 .type = PORT_SCIF, 336 .type = PORT_SCIF,
336 .irqs = { 82, 82, 82, 82 }, 337 .irqs = SCIx_IRQ_MUXED(evt2irq(0xc40)),
337 .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE, 338 .regtype = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
338}; 339};
339 340
@@ -352,7 +353,7 @@ static struct plat_sci_port scif3_platform_data = {
352 .scscr = SCSCR_RE | SCSCR_TE, 353 .scscr = SCSCR_RE | SCSCR_TE,
353 .scbrr_algo_id = SCBRR_ALGO_3, 354 .scbrr_algo_id = SCBRR_ALGO_3,
354 .type = PORT_SCIFA, 355 .type = PORT_SCIFA,
355 .irqs = { 56, 56, 56, 56 }, 356 .irqs = SCIx_IRQ_MUXED(evt2irq(0x900)),
356}; 357};
357 358
358static struct platform_device scif3_device = { 359static struct platform_device scif3_device = {
@@ -370,7 +371,7 @@ static struct plat_sci_port scif4_platform_data = {
370 .scscr = SCSCR_RE | SCSCR_TE, 371 .scscr = SCSCR_RE | SCSCR_TE,
371 .scbrr_algo_id = SCBRR_ALGO_3, 372 .scbrr_algo_id = SCBRR_ALGO_3,
372 .type = PORT_SCIFA, 373 .type = PORT_SCIFA,
373 .irqs = { 88, 88, 88, 88 }, 374 .irqs = SCIx_IRQ_MUXED(evt2irq(0xd00)),
374}; 375};
375 376
376static struct platform_device scif4_device = { 377static struct platform_device scif4_device = {
@@ -388,7 +389,7 @@ static struct plat_sci_port scif5_platform_data = {
388 .scscr = SCSCR_RE | SCSCR_TE, 389 .scscr = SCSCR_RE | SCSCR_TE,
389 .scbrr_algo_id = SCBRR_ALGO_3, 390 .scbrr_algo_id = SCBRR_ALGO_3,
390 .type = PORT_SCIFA, 391 .type = PORT_SCIFA,
391 .irqs = { 109, 109, 109, 109 }, 392 .irqs = SCIx_IRQ_MUXED(evt2irq(0xfa0)),
392}; 393};
393 394
394static struct platform_device scif5_device = { 395static struct platform_device scif5_device = {
@@ -408,17 +409,17 @@ static struct resource rtc_resources[] = {
408 }, 409 },
409 [1] = { 410 [1] = {
410 /* Period IRQ */ 411 /* Period IRQ */
411 .start = 69, 412 .start = evt2irq(0xaa0),
412 .flags = IORESOURCE_IRQ, 413 .flags = IORESOURCE_IRQ,
413 }, 414 },
414 [2] = { 415 [2] = {
415 /* Carry IRQ */ 416 /* Carry IRQ */
416 .start = 70, 417 .start = evt2irq(0xac0),
417 .flags = IORESOURCE_IRQ, 418 .flags = IORESOURCE_IRQ,
418 }, 419 },
419 [3] = { 420 [3] = {
420 /* Alarm IRQ */ 421 /* Alarm IRQ */
421 .start = 68, 422 .start = evt2irq(0xa80),
422 .flags = IORESOURCE_IRQ, 423 .flags = IORESOURCE_IRQ,
423 }, 424 },
424}; 425};
@@ -439,8 +440,8 @@ static struct resource iic0_resources[] = {
439 .flags = IORESOURCE_MEM, 440 .flags = IORESOURCE_MEM,
440 }, 441 },
441 [1] = { 442 [1] = {
442 .start = 96, 443 .start = evt2irq(0xe00),
443 .end = 99, 444 .end = evt2irq(0xe60),
444 .flags = IORESOURCE_IRQ, 445 .flags = IORESOURCE_IRQ,
445 }, 446 },
446}; 447};
@@ -461,8 +462,8 @@ static struct resource iic1_resources[] = {
461 .flags = IORESOURCE_MEM, 462 .flags = IORESOURCE_MEM,
462 }, 463 },
463 [1] = { 464 [1] = {
464 .start = 92, 465 .start = evt2irq(0xd80),
465 .end = 95, 466 .end = evt2irq(0xde0),
466 .flags = IORESOURCE_IRQ, 467 .flags = IORESOURCE_IRQ,
467 }, 468 },
468}; 469};
@@ -478,7 +479,7 @@ static struct platform_device iic1_device = {
478static struct uio_info vpu_platform_data = { 479static struct uio_info vpu_platform_data = {
479 .name = "VPU5F", 480 .name = "VPU5F",
480 .version = "0", 481 .version = "0",
481 .irq = 60, 482 .irq = evt2irq(0x980),
482}; 483};
483 484
484static struct resource vpu_resources[] = { 485static struct resource vpu_resources[] = {
@@ -507,7 +508,7 @@ static struct platform_device vpu_device = {
507static struct uio_info veu0_platform_data = { 508static struct uio_info veu0_platform_data = {
508 .name = "VEU3F0", 509 .name = "VEU3F0",
509 .version = "0", 510 .version = "0",
510 .irq = 83, 511 .irq = evt2irq(0xc60),
511}; 512};
512 513
513static struct resource veu0_resources[] = { 514static struct resource veu0_resources[] = {
@@ -536,7 +537,7 @@ static struct platform_device veu0_device = {
536static struct uio_info veu1_platform_data = { 537static struct uio_info veu1_platform_data = {
537 .name = "VEU3F1", 538 .name = "VEU3F1",
538 .version = "0", 539 .version = "0",
539 .irq = 54, 540 .irq = evt2irq(0x8c0),
540}; 541};
541 542
542static struct resource veu1_resources[] = { 543static struct resource veu1_resources[] = {
@@ -633,7 +634,7 @@ static struct resource cmt_resources[] = {
633 .flags = IORESOURCE_MEM, 634 .flags = IORESOURCE_MEM,
634 }, 635 },
635 [1] = { 636 [1] = {
636 .start = 104, 637 .start = evt2irq(0xf00),
637 .flags = IORESOURCE_IRQ, 638 .flags = IORESOURCE_IRQ,
638 }, 639 },
639}; 640};
@@ -661,7 +662,7 @@ static struct resource tmu0_resources[] = {
661 .flags = IORESOURCE_MEM, 662 .flags = IORESOURCE_MEM,
662 }, 663 },
663 [1] = { 664 [1] = {
664 .start = 16, 665 .start = evt2irq(0x400),
665 .flags = IORESOURCE_IRQ, 666 .flags = IORESOURCE_IRQ,
666 }, 667 },
667}; 668};
@@ -689,7 +690,7 @@ static struct resource tmu1_resources[] = {
689 .flags = IORESOURCE_MEM, 690 .flags = IORESOURCE_MEM,
690 }, 691 },
691 [1] = { 692 [1] = {
692 .start = 17, 693 .start = evt2irq(0x420),
693 .flags = IORESOURCE_IRQ, 694 .flags = IORESOURCE_IRQ,
694 }, 695 },
695}; 696};
@@ -716,7 +717,7 @@ static struct resource tmu2_resources[] = {
716 .flags = IORESOURCE_MEM, 717 .flags = IORESOURCE_MEM,
717 }, 718 },
718 [1] = { 719 [1] = {
719 .start = 18, 720 .start = evt2irq(0x440),
720 .flags = IORESOURCE_IRQ, 721 .flags = IORESOURCE_IRQ,
721 }, 722 },
722}; 723};
@@ -744,7 +745,7 @@ static struct resource tmu3_resources[] = {
744 .flags = IORESOURCE_MEM, 745 .flags = IORESOURCE_MEM,
745 }, 746 },
746 [1] = { 747 [1] = {
747 .start = 57, 748 .start = evt2irq(0x920),
748 .flags = IORESOURCE_IRQ, 749 .flags = IORESOURCE_IRQ,
749 }, 750 },
750}; 751};
@@ -771,7 +772,7 @@ static struct resource tmu4_resources[] = {
771 .flags = IORESOURCE_MEM, 772 .flags = IORESOURCE_MEM,
772 }, 773 },
773 [1] = { 774 [1] = {
774 .start = 58, 775 .start = evt2irq(0x940),
775 .flags = IORESOURCE_IRQ, 776 .flags = IORESOURCE_IRQ,
776 }, 777 },
777}; 778};
@@ -798,7 +799,7 @@ static struct resource tmu5_resources[] = {
798 .flags = IORESOURCE_MEM, 799 .flags = IORESOURCE_MEM,
799 }, 800 },
800 [1] = { 801 [1] = {
801 .start = 57, 802 .start = evt2irq(0x920),
802 .flags = IORESOURCE_IRQ, 803 .flags = IORESOURCE_IRQ,
803 }, 804 },
804}; 805};
@@ -817,7 +818,7 @@ static struct platform_device tmu5_device = {
817static struct uio_info jpu_platform_data = { 818static struct uio_info jpu_platform_data = {
818 .name = "JPU", 819 .name = "JPU",
819 .version = "0", 820 .version = "0",
820 .irq = 27, 821 .irq = evt2irq(0x560),
821}; 822};
822 823
823static struct resource jpu_resources[] = { 824static struct resource jpu_resources[] = {
@@ -846,7 +847,7 @@ static struct platform_device jpu_device = {
846static struct uio_info spu0_platform_data = { 847static struct uio_info spu0_platform_data = {
847 .name = "SPU2DSP0", 848 .name = "SPU2DSP0",
848 .version = "0", 849 .version = "0",
849 .irq = 86, 850 .irq = evt2irq(0xcc0),
850}; 851};
851 852
852static struct resource spu0_resources[] = { 853static struct resource spu0_resources[] = {
@@ -875,7 +876,7 @@ static struct platform_device spu0_device = {
875static struct uio_info spu1_platform_data = { 876static struct uio_info spu1_platform_data = {
876 .name = "SPU2DSP1", 877 .name = "SPU2DSP1",
877 .version = "0", 878 .version = "0",
878 .irq = 87, 879 .irq = evt2irq(0xce0),
879}; 880};
880 881
881static struct resource spu1_resources[] = { 882static struct resource spu1_resources[] = {