sh: sh7723 evt2irq migration.
authorPaul Mundt <lethal@linux-sh.org>
Fri, 18 May 2012 03:57:59 +0000 (12:57 +0900)
committerPaul Mundt <lethal@linux-sh.org>
Fri, 18 May 2012 03:57:59 +0000 (12:57 +0900)
Migrate SH7723 to evt2irq() backed hwirq lookups.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
arch/sh/kernel/cpu/sh4a/setup-sh7723.c

index a188c9e..28d6fd8 100644 (file)
@@ -15,6 +15,7 @@
 #include <linux/uio_driver.h>
 #include <linux/usb/r8a66597.h>
 #include <linux/sh_timer.h>
+#include <linux/sh_intc.h>
 #include <linux/io.h>
 #include <asm/clock.h>
 #include <asm/mmzone.h>
@@ -28,7 +29,7 @@ static struct plat_sci_port scif0_platform_data = {
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { 80, 80, 80, 80 },
+       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
@@ -47,7 +48,7 @@ static struct plat_sci_port scif1_platform_data = {
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { 81, 81, 81, 81 },
+       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc20)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
@@ -66,7 +67,7 @@ static struct plat_sci_port scif2_platform_data = {
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { 82, 82, 82, 82 },
+       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc40)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
@@ -85,7 +86,7 @@ static struct plat_sci_port scif3_platform_data = {
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = { 56, 56, 56, 56 },
+       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
 };
 
 static struct platform_device scif3_device = {
@@ -103,7 +104,7 @@ static struct plat_sci_port scif4_platform_data = {
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = { 88, 88, 88, 88 },
+       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xd00)),
 };
 
 static struct platform_device scif4_device = {
@@ -121,7 +122,7 @@ static struct plat_sci_port scif5_platform_data = {
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = { 109, 109, 109, 109 },
+       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xfa0)),
 };
 
 static struct platform_device scif5_device = {
@@ -135,7 +136,7 @@ static struct platform_device scif5_device = {
 static struct uio_info vpu_platform_data = {
        .name = "VPU5",
        .version = "0",
-       .irq = 60,
+       .irq = evt2irq(0x980),
 };
 
 static struct resource vpu_resources[] = {
@@ -163,7 +164,7 @@ static struct platform_device vpu_device = {
 static struct uio_info veu0_platform_data = {
        .name = "VEU2H",
        .version = "0",
-       .irq = 54,
+       .irq = evt2irq(0x8c0),
 };
 
 static struct resource veu0_resources[] = {
@@ -191,7 +192,7 @@ static struct platform_device veu0_device = {
 static struct uio_info veu1_platform_data = {
        .name = "VEU2H",
        .version = "0",
-       .irq = 27,
+       .irq = evt2irq(0x560),
 };
 
 static struct resource veu1_resources[] = {
@@ -230,7 +231,7 @@ static struct resource cmt_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 104,
+               .start  = evt2irq(0xf00),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -258,7 +259,7 @@ static struct resource tmu0_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 16,
+               .start  = evt2irq(0x400),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -286,7 +287,7 @@ static struct resource tmu1_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 17,
+               .start  = evt2irq(0x420),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -313,7 +314,7 @@ static struct resource tmu2_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 18,
+               .start  = evt2irq(0x440),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -340,7 +341,7 @@ static struct resource tmu3_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 57,
+               .start  = evt2irq(0x920),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -367,7 +368,7 @@ static struct resource tmu4_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 58,
+               .start  = evt2irq(0x940),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -394,7 +395,7 @@ static struct resource tmu5_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 57,
+               .start  = evt2irq(0x920),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -417,17 +418,17 @@ static struct resource rtc_resources[] = {
        },
        [1] = {
                /* Period IRQ */
-               .start  = 69,
+               .start  = evt2irq(0xaa0),
                .flags  = IORESOURCE_IRQ,
        },
        [2] = {
                /* Carry IRQ */
-               .start  = 70,
+               .start  = evt2irq(0xac0),
                .flags  = IORESOURCE_IRQ,
        },
        [3] = {
                /* Alarm IRQ */
-               .start  = 68,
+               .start  = evt2irq(0xa80),
                .flags  = IORESOURCE_IRQ,
        },
 };
@@ -450,8 +451,8 @@ static struct resource sh7723_usb_host_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 65,
-               .end    = 65,
+               .start  = evt2irq(0xa20),
+               .end    = evt2irq(0xa20),
                .flags  = IORESOURCE_IRQ | IRQF_TRIGGER_LOW,
        },
 };
@@ -476,8 +477,8 @@ static struct resource iic_resources[] = {
                .flags  = IORESOURCE_MEM,
        },
        [1] = {
-               .start  = 96,
-               .end    = 99,
+               .start  = evt2irq(0xe00),
+               .end    = evt2irq(0xe60),
                .flags  = IORESOURCE_IRQ,
        },
 };