sh: Declare SCIF register base and IRQ as resources
[sfrench/cifs-2.6.git] / arch / sh / kernel / cpu / sh2a / setup-sh7206.c
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,
        },