sh: Declare SCIF register base and IRQ as resources
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 6 Dec 2013 09:59:48 +0000 (10:59 +0100)
committerSimon Horman <horms+renesas@verge.net.au>
Tue, 24 Dec 2013 12:49:43 +0000 (21:49 +0900)
Passing the register base address and IRQ through platform data is
deprecated. Use resources instead.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
28 files changed:
arch/sh/kernel/cpu/sh2/setup-sh7619.c
arch/sh/kernel/cpu/sh2a/setup-mxg.c
arch/sh/kernel/cpu/sh2a/setup-sh7201.c
arch/sh/kernel/cpu/sh2a/setup-sh7203.c
arch/sh/kernel/cpu/sh2a/setup-sh7206.c
arch/sh/kernel/cpu/sh2a/setup-sh7264.c
arch/sh/kernel/cpu/sh2a/setup-sh7269.c
arch/sh/kernel/cpu/sh3/setup-sh7705.c
arch/sh/kernel/cpu/sh3/setup-sh770x.c
arch/sh/kernel/cpu/sh3/setup-sh7710.c
arch/sh/kernel/cpu/sh3/setup-sh7720.c
arch/sh/kernel/cpu/sh4/setup-sh4-202.c
arch/sh/kernel/cpu/sh4/setup-sh7750.c
arch/sh/kernel/cpu/sh4/setup-sh7760.c
arch/sh/kernel/cpu/sh4a/setup-sh7343.c
arch/sh/kernel/cpu/sh4a/setup-sh7366.c
arch/sh/kernel/cpu/sh4a/setup-sh7722.c
arch/sh/kernel/cpu/sh4a/setup-sh7723.c
arch/sh/kernel/cpu/sh4a/setup-sh7724.c
arch/sh/kernel/cpu/sh4a/setup-sh7734.c
arch/sh/kernel/cpu/sh4a/setup-sh7757.c
arch/sh/kernel/cpu/sh4a/setup-sh7763.c
arch/sh/kernel/cpu/sh4a/setup-sh7770.c
arch/sh/kernel/cpu/sh4a/setup-sh7780.c
arch/sh/kernel/cpu/sh4a/setup-sh7785.c
arch/sh/kernel/cpu/sh4a/setup-sh7786.c
arch/sh/kernel/cpu/sh4a/setup-shx3.c
arch/sh/kernel/cpu/sh5/setup-sh5.c

index 4df4d4ffe39ba245b8b551afe80abf338c5ce527..1a4fe7c0e54806502ad5a3010d1f3ace0e248ffe 100644 (file)
@@ -61,51 +61,66 @@ static DECLARE_INTC_DESC(intc_desc, "sh7619", vectors, NULL,
                         NULL, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xf8400000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(88),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xf8400000, 0x100),
+       DEFINE_RES_IRQ(88),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xf8410000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(92),
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xf8410000, 0x100),
+       DEFINE_RES_IRQ(92),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xf8420000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(96),
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xf8420000, 0x100),
+       DEFINE_RES_IRQ(96),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
index f7f1cf2af3028dc8a5f4d3dfeacf5370ea3e0176..9bdc61143f404ca28836c14f46fee302df32a88e 100644 (file)
@@ -199,17 +199,22 @@ static struct platform_device mtu2_2_device = {
 };
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xff804000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(220),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xff804000, 0x100),
+       DEFINE_RES_IRQ(220),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
index 7b84785b89624664ba8a028696128f8a188c534c..7585c4ed7c5cd3974a76a798792d06a66651a830 100644 (file)
@@ -178,136 +178,176 @@ static DECLARE_INTC_DESC(intc_desc, "sh7201", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xfffe8000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(180),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xfffe8000, 0x100),
+       DEFINE_RES_IRQ(180),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xfffe8800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(184),
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xfffe8800, 0x100),
+       DEFINE_RES_IRQ(184),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xfffe9000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(188),
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xfffe9000, 0x100),
+       DEFINE_RES_IRQ(188),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xfffe9800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(192),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xfffe9800, 0x100),
+       DEFINE_RES_IRQ(192),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xfffea000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(196),
+};
+
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xfffea000, 0x100),
+       DEFINE_RES_IRQ(196),
 };
 
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xfffea800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(200),
+};
+
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xfffea800, 0x100),
+       DEFINE_RES_IRQ(200),
 };
 
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
 };
 
 static struct plat_sci_port scif6_platform_data = {
-       .mapbase        = 0xfffeb000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(204),
+};
+
+static struct resource scif6_resources[] = {
+       DEFINE_RES_MEM(0xfffeb000, 0x100),
+       DEFINE_RES_IRQ(204),
 };
 
 static struct platform_device scif6_device = {
        .name           = "sh-sci",
        .id             = 6,
+       .resource       = scif6_resources,
+       .num_resources  = ARRAY_SIZE(scif6_resources),
        .dev            = {
                .platform_data  = &scif6_platform_data,
        },
 };
 
 static struct plat_sci_port scif7_platform_data = {
-       .mapbase        = 0xfffeb800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(208),
+};
+
+static struct resource scif7_resources[] = {
+       DEFINE_RES_MEM(0xfffeb800, 0x100),
+       DEFINE_RES_IRQ(208),
 };
 
 static struct platform_device scif7_device = {
        .name           = "sh-sci",
        .id             = 7,
+       .resource       = scif7_resources,
+       .num_resources  = ARRAY_SIZE(scif7_resources),
        .dev            = {
                .platform_data  = &scif7_platform_data,
        },
index bfc33f6a28c3492b3a3ec54116d0d5d3dcea1aa9..f2a9baaa541bc78ed0db3bd8e60bd68d6b1fb53e 100644 (file)
@@ -174,76 +174,96 @@ static DECLARE_INTC_DESC(intc_desc, "sh7203", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xfffe8000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(192),
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xfffe8000, 0x100),
+       DEFINE_RES_IRQ(192),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xfffe8800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(196),
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xfffe8800, 0x100),
+       DEFINE_RES_IRQ(196),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xfffe9000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(200),
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xfffe9000, 0x100),
+       DEFINE_RES_IRQ(200),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xfffe9800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(204),
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xfffe9800, 0x100),
+       DEFINE_RES_IRQ(204),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
index a5010741de854cd00383b4d9431cc43b73122bc1..fc7cacd36729e299e2cfa584f319db4b81b16ae7 100644 (file)
@@ -134,68 +134,88 @@ static DECLARE_INTC_DESC(intc_desc, "sh7206", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xfffe8000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(240),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xfffe8000, 0x100),
+       DEFINE_RES_IRQ(240),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xfffe8800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(244),
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xfffe8800, 0x100),
+       DEFINE_RES_IRQ(244),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xfffe9000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(248),
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xfffe9000, 0x100),
+       DEFINE_RES_IRQ(248),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xfffe9800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(252),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xfffe9800, 0x100),
+       DEFINE_RES_IRQ(252),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
index ce5c1b5aebfaf81d3aacc83dbf734c3feccf22ec..00edbdabcaa15c07ca29f6a9442ce85b7276bedc 100644 (file)
@@ -226,152 +226,216 @@ static DECLARE_INTC_DESC(intc_desc, "sh7264", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xfffe8000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 233, 234, 235, 232 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xfffe8000, 0x100),
+       DEFINE_RES_IRQ(233),
+       DEFINE_RES_IRQ(234),
+       DEFINE_RES_IRQ(235),
+       DEFINE_RES_IRQ(232),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xfffe8800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 237, 238, 239, 236 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xfffe8800, 0x100),
+       DEFINE_RES_IRQ(237),
+       DEFINE_RES_IRQ(238),
+       DEFINE_RES_IRQ(239),
+       DEFINE_RES_IRQ(236),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xfffe9000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 241, 242, 243, 240 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xfffe9000, 0x100),
+       DEFINE_RES_IRQ(241),
+       DEFINE_RES_IRQ(242),
+       DEFINE_RES_IRQ(243),
+       DEFINE_RES_IRQ(240),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xfffe9800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 245, 246, 247, 244 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xfffe9800, 0x100),
+       DEFINE_RES_IRQ(245),
+       DEFINE_RES_IRQ(246),
+       DEFINE_RES_IRQ(247),
+       DEFINE_RES_IRQ(244),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xfffea000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 249, 250, 251, 248 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xfffea000, 0x100),
+       DEFINE_RES_IRQ(249),
+       DEFINE_RES_IRQ(250),
+       DEFINE_RES_IRQ(251),
+       DEFINE_RES_IRQ(248),
+};
+
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xfffea800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 253, 254, 255, 252 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xfffea800, 0x100),
+       DEFINE_RES_IRQ(253),
+       DEFINE_RES_IRQ(254),
+       DEFINE_RES_IRQ(255),
+       DEFINE_RES_IRQ(252),
+};
+
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
 };
 
 static struct plat_sci_port scif6_platform_data = {
-       .mapbase        = 0xfffeb000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 257, 258, 259, 256 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif6_resources[] = {
+       DEFINE_RES_MEM(0xfffeb000, 0x100),
+       DEFINE_RES_IRQ(257),
+       DEFINE_RES_IRQ(258),
+       DEFINE_RES_IRQ(259),
+       DEFINE_RES_IRQ(256),
+};
+
 static struct platform_device scif6_device = {
        .name           = "sh-sci",
        .id             = 6,
+       .resource       = scif6_resources,
+       .num_resources  = ARRAY_SIZE(scif6_resources),
        .dev            = {
                .platform_data  = &scif6_platform_data,
        },
 };
 
 static struct plat_sci_port scif7_platform_data = {
-       .mapbase        = 0xfffeb800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 261, 262, 263, 260 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif7_resources[] = {
+       DEFINE_RES_MEM(0xfffeb800, 0x100),
+       DEFINE_RES_IRQ(261),
+       DEFINE_RES_IRQ(262),
+       DEFINE_RES_IRQ(263),
+       DEFINE_RES_IRQ(260),
+};
+
 static struct platform_device scif7_device = {
        .name           = "sh-sci",
        .id             = 7,
+       .resource       = scif7_resources,
+       .num_resources  = ARRAY_SIZE(scif7_resources),
        .dev            = {
                .platform_data  = &scif7_platform_data,
        },
index e82ae9d8d3bcb2d5a850a3b7375e76e5321db475..5cdbaac322a038740d44c93c6161d7c47e863820 100644 (file)
@@ -248,152 +248,216 @@ static DECLARE_INTC_DESC(intc_desc, "sh7269", vectors, groups,
                         mask_registers, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xe8007000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 259, 260, 261, 258 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xe8007000, 0x100),
+       DEFINE_RES_IRQ(259),
+       DEFINE_RES_IRQ(260),
+       DEFINE_RES_IRQ(261),
+       DEFINE_RES_IRQ(258),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xe8007800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 263, 264, 265, 262 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xe8007800, 0x100),
+       DEFINE_RES_IRQ(263),
+       DEFINE_RES_IRQ(264),
+       DEFINE_RES_IRQ(265),
+       DEFINE_RES_IRQ(262),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xe8008000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 267, 268, 269, 266 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xe8008000, 0x100),
+       DEFINE_RES_IRQ(267),
+       DEFINE_RES_IRQ(268),
+       DEFINE_RES_IRQ(269),
+       DEFINE_RES_IRQ(266),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xe8008800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 271, 272, 273, 270 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xe8008800, 0x100),
+       DEFINE_RES_IRQ(271),
+       DEFINE_RES_IRQ(272),
+       DEFINE_RES_IRQ(273),
+       DEFINE_RES_IRQ(270),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xe8009000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 275, 276, 277, 274 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xe8009000, 0x100),
+       DEFINE_RES_IRQ(275),
+       DEFINE_RES_IRQ(276),
+       DEFINE_RES_IRQ(277),
+       DEFINE_RES_IRQ(274),
+};
+
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xe8009800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 279, 280, 281, 278 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xe8009800, 0x100),
+       DEFINE_RES_IRQ(279),
+       DEFINE_RES_IRQ(280),
+       DEFINE_RES_IRQ(281),
+       DEFINE_RES_IRQ(278),
+};
+
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
 };
 
 static struct plat_sci_port scif6_platform_data = {
-       .mapbase        = 0xe800a000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 283, 284, 285, 282 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif6_resources[] = {
+       DEFINE_RES_MEM(0xe800a000, 0x100),
+       DEFINE_RES_IRQ(283),
+       DEFINE_RES_IRQ(284),
+       DEFINE_RES_IRQ(285),
+       DEFINE_RES_IRQ(282),
+};
+
 static struct platform_device scif6_device = {
        .name           = "sh-sci",
        .id             = 6,
+       .resource       = scif6_resources,
+       .num_resources  = ARRAY_SIZE(scif6_resources),
        .dev            = {
                .platform_data  = &scif6_platform_data,
        },
 };
 
 static struct plat_sci_port scif7_platform_data = {
-       .mapbase        = 0xe800a800,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE |
                          SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           =  { 287, 288, 289, 286 },
        .regtype        = SCIx_SH2_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif7_resources[] = {
+       DEFINE_RES_MEM(0xe800a800, 0x100),
+       DEFINE_RES_IRQ(287),
+       DEFINE_RES_IRQ(288),
+       DEFINE_RES_IRQ(289),
+       DEFINE_RES_IRQ(286),
+};
+
 static struct platform_device scif7_device = {
        .name           = "sh-sci",
        .id             = 7,
+       .resource       = scif7_resources,
+       .num_resources  = ARRAY_SIZE(scif7_resources),
        .dev            = {
                .platform_data  = &scif7_platform_data,
        },
index 03e4c96f2b11d64ee86af9ab47e6343c22a384d4..10dd0a01d5f8a52e84bdbd53bb389435826e382e 100644 (file)
@@ -70,39 +70,49 @@ static DECLARE_INTC_DESC(intc_desc, "sh7705", vectors, NULL,
                         NULL, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xa4410000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TIE | SCSCR_RIE  | SCSCR_TE |
                          SCSCR_RE  | SCSCR_CKE1 | SCSCR_CKE0,
        .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
        .ops            = &sh770x_sci_port_ops,
        .regtype        = SCIx_SH7705_SCIF_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xa4410000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x900)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xa4400000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TIE | SCSCR_RIE | SCSCR_TE | SCSCR_RE,
        .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x880)),
        .ops            = &sh770x_sci_port_ops,
        .regtype        = SCIx_SH7705_SCIF_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xa4400000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x880)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
index ba26cd9ce69b7b581d0fea85965a16f0a6dedb4b..d5541b0a6dc522407b20fc063489de23c96cc02b 100644 (file)
@@ -109,20 +109,25 @@ static struct platform_device rtc_device = {
 };
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xfffffe80,
        .port_reg       = 0xa4000136,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCI,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x4e0)),
        .ops            = &sh770x_sci_port_ops,
        .regshift       = 1,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xfffffe80, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x4e0)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
@@ -131,19 +136,24 @@ static struct platform_device scif0_device = {
     defined(CONFIG_CPU_SUBTYPE_SH7707) || \
     defined(CONFIG_CPU_SUBTYPE_SH7709)
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xa4000150,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
        .ops            = &sh770x_sci_port_ops,
        .regtype        = SCIx_SH3_SCIF_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xa4000150, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x900)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
@@ -152,20 +162,25 @@ static struct platform_device scif1_device = {
 #if defined(CONFIG_CPU_SUBTYPE_SH7707) || \
     defined(CONFIG_CPU_SUBTYPE_SH7709)
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xa4000140,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_IRDA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x880)),
        .ops            = &sh770x_sci_port_ops,
        .regshift       = 1,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xa4000140, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x880)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
index 93c9c5e24a7abbe7e7c5b832b0497c54be6adb03..de229f5c6b1e0cafd635fa3eb594293a91bc1db2 100644 (file)
@@ -98,36 +98,46 @@ static struct platform_device rtc_device = {
 };
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xa4400000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE | SCSCR_REIE |
                          SCSCR_CKE1 | SCSCR_CKE0,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x880)),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xa4400000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x880)),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xa4410000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE | SCSCR_REIE |
                          SCSCR_CKE1 | SCSCR_CKE0,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xa4410000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x900)),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
index 42d991f632b1f4b013b55af71df2a81f143b6090..ca835819357b356db8d3d704be4f8159ca28627d 100644 (file)
@@ -52,38 +52,48 @@ static struct platform_device rtc_device = {
 };
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xa4430000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE,
        .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
        .ops            = &sh7720_sci_port_ops,
        .regtype        = SCIx_SH7705_SCIF_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xa4430000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xa4438000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE,
        .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc20)),
        .ops            = &sh7720_sci_port_ops,
        .regtype        = SCIx_SH7705_SCIF_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xa4438000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc20)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
index 2a5320aa73bbbf8e3df126559bb0cf8514cd3a0b..0fc6a105144a6eafae234a2f1ad80ee6759beffb 100644 (file)
 #include <linux/io.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe80000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0x700),
-                           evt2irq(0x720),
-                           evt2irq(0x760),
-                           evt2irq(0x740) },
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe80000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
+       DEFINE_RES_IRQ(evt2irq(0x720)),
+       DEFINE_RES_IRQ(evt2irq(0x760)),
+       DEFINE_RES_IRQ(evt2irq(0x740)),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
index 04a45512596f310fb50367c04424610ec8e83459..5613c15d8163d9ffc3abbbbb924a4c98504d93bc 100644 (file)
@@ -38,36 +38,46 @@ static struct platform_device rtc_device = {
 };
 
 static struct plat_sci_port sci_platform_data = {
-       .mapbase        = 0xffe00000,
        .port_reg       = 0xffe0001C,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCI,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x4e0)),
        .regshift       = 2,
 };
 
+static struct resource sci_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x4e0)),
+};
+
 static struct platform_device sci_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = sci_resources,
+       .num_resources  = ARRAY_SIZE(sci_resources),
        .dev            = {
                .platform_data  = &sci_platform_data,
        },
 };
 
 static struct plat_sci_port scif_platform_data = {
-       .mapbase        = 0xffe80000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_TE | SCSCR_RE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x700)),
+};
+
+static struct resource scif_resources[] = {
+       DEFINE_RES_MEM(0xffe80000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
 };
 
 static struct platform_device scif_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif_resources,
+       .num_resources  = ARRAY_SIZE(scif_resources),
        .dev            = {
                .platform_data  = &scif_platform_data,
        },
index 98e075ada44eee248b8f44d52ccddab7bbd53432..a83e6f5a42d0e768d8bc46981eefba2330ffe4c7 100644 (file)
@@ -128,83 +128,103 @@ static DECLARE_INTC_DESC(intc_desc_irq, "sh7760-irq", vectors_irq, groups,
                         mask_registers, prio_registers, NULL);
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xfe600000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0x880),
-                           evt2irq(0x8a0),
-                           evt2irq(0x8e0),
-                           evt2irq(0x8c0) },
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xfe600000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x880)),
+       DEFINE_RES_IRQ(evt2irq(0x8a0)),
+       DEFINE_RES_IRQ(evt2irq(0x8e0)),
+       DEFINE_RES_IRQ(evt2irq(0x8c0)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xfe610000,
        .flags          = UPF_BOOT_AUTOCONF,
        .type           = PORT_SCIF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
-       .irqs           = { evt2irq(0xb00),
-                           evt2irq(0xb20),
-                           evt2irq(0xb60),
-                           evt2irq(0xb40) },
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xfe610000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xb00)),
+       DEFINE_RES_IRQ(evt2irq(0xb20)),
+       DEFINE_RES_IRQ(evt2irq(0xb60)),
+       DEFINE_RES_IRQ(evt2irq(0xb40)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xfe620000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0xb80),
-                           evt2irq(0xba0),
-                           evt2irq(0xbe0),
-                           evt2irq(0xbc0) },
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xfe620000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xb80)),
+       DEFINE_RES_IRQ(evt2irq(0xba0)),
+       DEFINE_RES_IRQ(evt2irq(0xbe0)),
+       DEFINE_RES_IRQ(evt2irq(0xbc0)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xfe480000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCI,
-       .irqs           = { evt2irq(0xc00),
-                           evt2irq(0xc20),
-                           evt2irq(0xc40), },
        .regshift       = 2,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xfe480000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
+       DEFINE_RES_IRQ(evt2irq(0xc20)),
+       DEFINE_RES_IRQ(evt2irq(0xc40)),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
index b91ea8300a3e8f9383cccfc758bf174c8d0a2f97..8b45f672448d80f9b119039f341746320c135c81 100644 (file)
 
 /* Serial */
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc20)),
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe10000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc20)),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffe20000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc40)),
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffe20000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc40)),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xffe30000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc60)),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xffe30000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc60)),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
index 0bd09d51419fefebc683e8c0edf476e232694298..317f710a5b2bd59f759678566239e2fdcecce02b 100644 (file)
 #include <asm/clock.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .port_reg       = 0xa405013e,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
index 6a868b091c2da39c5c1d1bf9d3f9c1b6f7c6b6e7..6aeebb5299f6eaafca0cbbc449bf5cef0164401d 100644 (file)
@@ -179,57 +179,72 @@ struct platform_device dma_device = {
 
 /* Serial */
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
        .ops            = &sh7722_sci_port_ops,
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc20)),
        .ops            = &sh7722_sci_port_ops,
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe10000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc20)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffe20000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc40)),
        .ops            = &sh7722_sci_port_ops,
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffe20000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc40)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
index 28d6fd835fe001a5b7a7692da577c26e9ba50e4a..521a09ef4ffee0297613af099d3e791ca5b822c6 100644 (file)
 
 /* Serial */
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .port_reg       = 0xa4050160,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffe10000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc20)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe10000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc20)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffe20000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc40)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffe20000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc40)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xa4e30000,
        .flags          = UPF_BOOT_AUTOCONF,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xa4e30000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x900)),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xa4e40000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xd00)),
+};
+
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xa4e40000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xd00)),
 };
 
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xa4e50000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xfa0)),
+};
+
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xa4e50000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xfa0)),
 };
 
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
index 26b74c2f94968de7f56ead9227fe46751c6b67b6..fb0a237491477a949f9a9ec8a600c8ca497040c3 100644 (file)
@@ -290,111 +290,141 @@ static struct platform_device dma1_device = {
 
 /* Serial */
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc00)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc00)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffe10000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc20)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe10000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc20)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffe20000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xc40)),
        .regtype        = SCIx_SH4_SCIF_NO_SCSPTR_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffe20000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xc40)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xa4e30000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xa4e30000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x900)),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xa4e40000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xd00)),
+};
+
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xa4e40000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xd00)),
 };
 
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xa4e50000,
        .port_reg       = SCIx_NOT_SUPPORTED,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE,
        .scbrr_algo_id  = SCBRR_ALGO_3,
        .type           = PORT_SCIFA,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xfa0)),
+};
+
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xa4e50000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xfa0)),
 };
 
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
index f799971d453cbafe55d36964e761160be8cafa8f..bedf8fb5be6f39bdf17c72d734696e1046793fda 100644 (file)
 
 /* SCIF */
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xFFE40000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x8C0)),
        .regtype        = SCIx_SH4_SCIF_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe40000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x8c0)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id                     = 0,
+       .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xFFE41000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x8E0)),
        .regtype        = SCIx_SH4_SCIF_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe41000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x8e0)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
-       .id         = 1,
+       .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xFFE42000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x900)),
        .regtype        = SCIx_SH4_SCIF_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffe42000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x900)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
-       .id         = 2,
+       .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xFFE43000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x920)),
        .regtype        = SCIx_SH4_SCIF_REGTYPE,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xffe43000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x920)),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
-       .id             = 3,
+       .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xFFE44000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x940)),
        .regtype        = SCIx_SH4_SCIF_REGTYPE,
 };
 
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xffe44000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x940)),
+};
+
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
-       .id             = 4,
+       .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xFFE43000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x960)),
        .regtype                = SCIx_SH4_SCIF_REGTYPE,
 };
 
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xffe43000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x960)),
+};
+
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
-       .id             = 5,
+       .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
index 9079a0f9ea9be7b48369ffd7bcc2e6e516916326..6b8d0e61704c04d5bb90663812e7ac2b90260f3e 100644 (file)
 #include <cpu/sh7757.h>
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xfe4b0000,           /* SCIF2 */
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x700)),
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xfe4b0000, 0x100),              /* SCIF2 */
+       DEFINE_RES_IRQ(evt2irq(0x700)),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xfe4c0000,           /* SCIF3 */
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xb80)),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xfe4c0000, 0x100),              /* SCIF3 */
+       DEFINE_RES_IRQ(evt2irq(0xb80)),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xfe4d0000,           /* SCIF4 */
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xF00)),
+};
+
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xfe4d0000, 0x100),              /* SCIF4 */
+       DEFINE_RES_IRQ(evt2irq(0xf00)),
 };
 
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
index 1686acaaf45af226a8f6809f937896abee8000c5..940505cec66f4035e6b153badf4835eeaeb04cde 100644 (file)
 #include <linux/usb/ohci_pdriver.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x700)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffe08000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xb80)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe08000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xb80)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xf00)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffe10000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xf00)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
index 256ea7a451641bc79071b77da0dc76915d6bdc41..f9c04dee4e82b1d1eceebf652163fe2dca61525f 100644 (file)
 #include <linux/io.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xff923000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x9a0)),
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xff923000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x9a0)),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xff924000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x9c0)),
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xff924000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x9c0)),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xff925000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x9e0)),
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xff925000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x9e0)),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xff926000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xa00)),
+};
+
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xff926000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xa00)),
 };
 
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xff927000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xa20)),
+};
+
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xff927000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xa20)),
 };
 
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xff928000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xa40)),
+};
+
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xff928000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xa40)),
 };
 
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
 };
 
 static struct plat_sci_port scif6_platform_data = {
-       .mapbase        = 0xff929000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xa60)),
+};
+
+static struct resource scif6_resources[] = {
+       DEFINE_RES_MEM(0xff929000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xa60)),
 };
 
 static struct platform_device scif6_device = {
        .name           = "sh-sci",
        .id             = 6,
+       .resource       = scif6_resources,
+       .num_resources  = ARRAY_SIZE(scif6_resources),
        .dev            = {
                .platform_data  = &scif6_platform_data,
        },
 };
 
 static struct plat_sci_port scif7_platform_data = {
-       .mapbase        = 0xff92a000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xa80)),
+};
+
+static struct resource scif7_resources[] = {
+       DEFINE_RES_MEM(0xff92a000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xa80)),
 };
 
 static struct platform_device scif7_device = {
        .name           = "sh-sci",
        .id             = 7,
+       .resource       = scif7_resources,
+       .num_resources  = ARRAY_SIZE(scif7_resources),
        .dev            = {
                .platform_data  = &scif7_platform_data,
        },
 };
 
 static struct plat_sci_port scif8_platform_data = {
-       .mapbase        = 0xff92b000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xaa0)),
+};
+
+static struct resource scif8_resources[] = {
+       DEFINE_RES_MEM(0xff92b000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xaa0)),
 };
 
 static struct platform_device scif8_device = {
        .name           = "sh-sci",
        .id             = 8,
+       .resource       = scif8_resources,
+       .num_resources  = ARRAY_SIZE(scif8_resources),
        .dev            = {
                .platform_data  = &scif8_platform_data,
        },
 };
 
 static struct plat_sci_port scif9_platform_data = {
-       .mapbase        = 0xff92c000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_TOIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xac0)),
+};
+
+static struct resource scif9_resources[] = {
+       DEFINE_RES_MEM(0xff92c000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xac0)),
 };
 
 static struct platform_device scif9_device = {
        .name           = "sh-sci",
        .id             = 9,
+       .resource       = scif9_resources,
+       .num_resources  = ARRAY_SIZE(scif9_resources),
        .dev            = {
                .platform_data  = &scif9_platform_data,
        },
index de45b704687a07b695995a7d357dde59ce30fda9..227f8f4080fa61bc3c1483e61bdbfbf0746cd9b8 100644 (file)
 #include <cpu/dma-register.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffe00000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x700)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffe00000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffe10000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0xb80)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffe10000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0xb80)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
index 0968ecb962e6611fa30198bac2f2609a43093e98..b9f64c1ee8956e58bee196c4e23d17803929ac31 100644 (file)
 #include <cpu/dma-register.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffea0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x700)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffea0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffeb0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x780)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffeb0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x780)),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffec0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x980)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffec0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x980)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xffed0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x9a0)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xffed0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x9a0)),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xffee0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x9c0)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xffee0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x9c0)),
+};
+
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xffef0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x9e0)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xffef0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x9e0)),
+};
+
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
index ab52d4d4484d460bffc3b66ec9be5a60287d92cd..92b95ceabd6e17431084b1bc38c2abeb6b920fad 100644 (file)
 #include <asm/mmzone.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffea0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0x700),
-                           evt2irq(0x720),
-                           evt2irq(0x760),
-                           evt2irq(0x740) },
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffea0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
+       DEFINE_RES_IRQ(evt2irq(0x720)),
+       DEFINE_RES_IRQ(evt2irq(0x760)),
+       DEFINE_RES_IRQ(evt2irq(0x740)),
+};
+
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
@@ -52,90 +57,124 @@ static struct platform_device scif0_device = {
  * The rest of these all have multiplexed IRQs
  */
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffeb0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x780)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffeb0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x780)),
+};
+
+static struct resource scif1_demux_resources[] = {
+       DEFINE_RES_MEM(0xffeb0000, 0x100),
+       /* Placeholders, see sh7786_devices_setup() */
+       DEFINE_RES_IRQ(0),
+       DEFINE_RES_IRQ(0),
+       DEFINE_RES_IRQ(0),
+       DEFINE_RES_IRQ(0),
+};
+
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffec0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x840)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffec0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x840)),
+};
+
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
 };
 
 static struct plat_sci_port scif3_platform_data = {
-       .mapbase        = 0xffed0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x860)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif3_resources[] = {
+       DEFINE_RES_MEM(0xffed0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x860)),
+};
+
 static struct platform_device scif3_device = {
        .name           = "sh-sci",
        .id             = 3,
+       .resource       = scif3_resources,
+       .num_resources  = ARRAY_SIZE(scif3_resources),
        .dev            = {
                .platform_data  = &scif3_platform_data,
        },
 };
 
 static struct plat_sci_port scif4_platform_data = {
-       .mapbase        = 0xffee0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x880)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif4_resources[] = {
+       DEFINE_RES_MEM(0xffee0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x880)),
+};
+
 static struct platform_device scif4_device = {
        .name           = "sh-sci",
        .id             = 4,
+       .resource       = scif4_resources,
+       .num_resources  = ARRAY_SIZE(scif4_resources),
        .dev            = {
                .platform_data  = &scif4_platform_data,
        },
 };
 
 static struct plat_sci_port scif5_platform_data = {
-       .mapbase        = 0xffef0000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE | SCSCR_CKE1,
        .scbrr_algo_id  = SCBRR_ALGO_1,
        .type           = PORT_SCIF,
-       .irqs           = SCIx_IRQ_MUXED(evt2irq(0x8a0)),
        .regtype        = SCIx_SH4_SCIF_FIFODATA_REGTYPE,
 };
 
+static struct resource scif5_resources[] = {
+       DEFINE_RES_MEM(0xffef0000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x8a0)),
+};
+
 static struct platform_device scif5_device = {
        .name           = "sh-sci",
        .id             = 5,
+       .resource       = scif5_resources,
+       .num_resources  = ARRAY_SIZE(scif5_resources),
        .dev            = {
                .platform_data  = &scif5_platform_data,
        },
@@ -1037,13 +1076,16 @@ static int __init sh7786_devices_setup(void)
         */
        irq = intc_irq_lookup(sh7786_intc_desc.name, TXI1);
        if (irq > 0) {
-               scif1_platform_data.irqs[SCIx_TXI_IRQ] = irq;
-               scif1_platform_data.irqs[SCIx_ERI_IRQ] =
+               scif1_demux_resources[1].start =
                        intc_irq_lookup(sh7786_intc_desc.name, ERI1);
-               scif1_platform_data.irqs[SCIx_BRI_IRQ] =
-                       intc_irq_lookup(sh7786_intc_desc.name, BRI1);
-               scif1_platform_data.irqs[SCIx_RXI_IRQ] =
+               scif1_demux_resources[2].start =
                        intc_irq_lookup(sh7786_intc_desc.name, RXI1);
+               scif1_demux_resources[3].start = irq;
+               scif1_demux_resources[4].start =
+                       intc_irq_lookup(sh7786_intc_desc.name, BRI1);
+
+               scif1_device.resource = scif1_demux_resources;
+               scif1_device.num_resources = ARRAY_SIZE(scif1_demux_resources);
        }
 
        ret = platform_add_devices(sh7786_early_devices,
index 688f7ed1bab1e1590b4a1674f26598d9d58becfe..4d65be9be00143672eba3b39e5041ae4cb12d332 100644 (file)
  * all rather than adding infrastructure to hack around it.
  */
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = 0xffc30000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0x700),
-                           evt2irq(0x720),
-                           evt2irq(0x760),
-                           evt2irq(0x740) },
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(0xffc30000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x700)),
+       DEFINE_RES_IRQ(evt2irq(0x720)),
+       DEFINE_RES_IRQ(evt2irq(0x760)),
+       DEFINE_RES_IRQ(evt2irq(0x740)),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },
 };
 
 static struct plat_sci_port scif1_platform_data = {
-       .mapbase        = 0xffc40000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0x780),
-                           evt2irq(0x7a0),
-                           evt2irq(0x7e0),
-                           evt2irq(0x7c0) },
+};
+
+static struct resource scif1_resources[] = {
+       DEFINE_RES_MEM(0xffc40000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x780)),
+       DEFINE_RES_IRQ(evt2irq(0x7a0)),
+       DEFINE_RES_IRQ(evt2irq(0x7e0)),
+       DEFINE_RES_IRQ(evt2irq(0x7c0)),
 };
 
 static struct platform_device scif1_device = {
        .name           = "sh-sci",
        .id             = 1,
+       .resource       = scif1_resources,
+       .num_resources  = ARRAY_SIZE(scif1_resources),
        .dev            = {
                .platform_data  = &scif1_platform_data,
        },
 };
 
 static struct plat_sci_port scif2_platform_data = {
-       .mapbase        = 0xffc60000,
        .flags          = UPF_BOOT_AUTOCONF,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { evt2irq(0x880),
-                           evt2irq(0x8a0),
-                           evt2irq(0x8e0),
-                           evt2irq(0x8c0) },
+};
+
+static struct resource scif2_resources[] = {
+       DEFINE_RES_MEM(0xffc60000, 0x100),
+       DEFINE_RES_IRQ(evt2irq(0x880)),
+       DEFINE_RES_IRQ(evt2irq(0x8a0)),
+       DEFINE_RES_IRQ(evt2irq(0x8e0)),
+       DEFINE_RES_IRQ(evt2irq(0x8c0)),
 };
 
 static struct platform_device scif2_device = {
        .name           = "sh-sci",
        .id             = 2,
+       .resource       = scif2_resources,
+       .num_resources  = ARRAY_SIZE(scif2_resources),
        .dev            = {
                .platform_data  = &scif2_platform_data,
        },
index 18419f1de9637550733cf55b58efdbf2c37004fa..64b098162c98a2acf2aefb8f00c429f0a82299ee 100644 (file)
 #include <asm/addrspace.h>
 
 static struct plat_sci_port scif0_platform_data = {
-       .mapbase        = PHYS_PERIPHERAL_BLOCK + 0x01030000,
        .flags          = UPF_BOOT_AUTOCONF | UPF_IOREMAP,
        .scscr          = SCSCR_RE | SCSCR_TE | SCSCR_REIE,
        .scbrr_algo_id  = SCBRR_ALGO_2,
        .type           = PORT_SCIF,
-       .irqs           = { 39, 40, 42, 0 },
+};
+
+static struct resource scif0_resources[] = {
+       DEFINE_RES_MEM(PHYS_PERIPHERAL_BLOCK + 0x01030000, 0x100),
+       DEFINE_RES_IRQ(39),
+       DEFINE_RES_IRQ(40),
+       DEFINE_RES_IRQ(42),
 };
 
 static struct platform_device scif0_device = {
        .name           = "sh-sci",
        .id             = 0,
+       .resource       = scif0_resources,
+       .num_resources  = ARRAY_SIZE(scif0_resources),
        .dev            = {
                .platform_data  = &scif0_platform_data,
        },