Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux...
[pandora-kernel.git] / arch / sh / kernel / cpu / sh3 / setup-sh7720.c
index 48d50a6..365b94a 100644 (file)
@@ -48,31 +48,37 @@ static struct platform_device rtc_device = {
        },
 };
 
-static struct plat_sci_port sci_platform_data[] = {
-       {
-               .mapbase        = 0xa4430000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .scscr          = SCSCR_RE | SCSCR_TE,
-               .scbrr_algo_id  = SCBRR_ALGO_4,
-               .type           = PORT_SCIF,
-               .irqs           = { 80, 80, 80, 80 },
-       }, {
-               .mapbase        = 0xa4438000,
-               .flags          = UPF_BOOT_AUTOCONF,
-               .scscr          = SCSCR_RE | SCSCR_TE,
-               .scbrr_algo_id  = SCBRR_ALGO_4,
-               .type           = PORT_SCIF,
-               .irqs           = { 81, 81, 81, 81 },
-       }, {
-               .flags = 0,
-       }
-};
-
-static struct platform_device sci_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           = { 80, 80, 80, 80 },
+};
+
+static struct platform_device scif0_device = {
        .name           = "sh-sci",
-       .id             = -1,
+       .id             = 0,
+       .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           = { 81, 81, 81, 81 },
+};
+
+static struct platform_device scif1_device = {
+       .name           = "sh-sci",
+       .id             = 1,
        .dev            = {
-               .platform_data  = sci_platform_data,
+               .platform_data  = &scif1_platform_data,
        },
 };
 
@@ -128,17 +134,14 @@ static struct platform_device usbf_device = {
 };
 
 static struct sh_timer_config cmt0_platform_data = {
-       .name = "CMT0",
        .channel_offset = 0x10,
        .timer_bit = 0,
-       .clk = "peripheral_clk",
        .clockevent_rating = 125,
        .clocksource_rating = 125,
 };
 
 static struct resource cmt0_resources[] = {
        [0] = {
-               .name   = "CMT0",
                .start  = 0x044a0010,
                .end    = 0x044a001b,
                .flags  = IORESOURCE_MEM,
@@ -160,15 +163,12 @@ static struct platform_device cmt0_device = {
 };
 
 static struct sh_timer_config cmt1_platform_data = {
-       .name = "CMT1",
        .channel_offset = 0x20,
        .timer_bit = 1,
-       .clk = "peripheral_clk",
 };
 
 static struct resource cmt1_resources[] = {
        [0] = {
-               .name   = "CMT1",
                .start  = 0x044a0020,
                .end    = 0x044a002b,
                .flags  = IORESOURCE_MEM,
@@ -190,15 +190,12 @@ static struct platform_device cmt1_device = {
 };
 
 static struct sh_timer_config cmt2_platform_data = {
-       .name = "CMT2",
        .channel_offset = 0x30,
        .timer_bit = 2,
-       .clk = "peripheral_clk",
 };
 
 static struct resource cmt2_resources[] = {
        [0] = {
-               .name   = "CMT2",
                .start  = 0x044a0030,
                .end    = 0x044a003b,
                .flags  = IORESOURCE_MEM,
@@ -220,15 +217,12 @@ static struct platform_device cmt2_device = {
 };
 
 static struct sh_timer_config cmt3_platform_data = {
-       .name = "CMT3",
        .channel_offset = 0x40,
        .timer_bit = 3,
-       .clk = "peripheral_clk",
 };
 
 static struct resource cmt3_resources[] = {
        [0] = {
-               .name   = "CMT3",
                .start  = 0x044a0040,
                .end    = 0x044a004b,
                .flags  = IORESOURCE_MEM,
@@ -250,15 +244,12 @@ static struct platform_device cmt3_device = {
 };
 
 static struct sh_timer_config cmt4_platform_data = {
-       .name = "CMT4",
        .channel_offset = 0x50,
        .timer_bit = 4,
-       .clk = "peripheral_clk",
 };
 
 static struct resource cmt4_resources[] = {
        [0] = {
-               .name   = "CMT4",
                .start  = 0x044a0050,
                .end    = 0x044a005b,
                .flags  = IORESOURCE_MEM,
@@ -280,16 +271,13 @@ static struct platform_device cmt4_device = {
 };
 
 static struct sh_timer_config tmu0_platform_data = {
-       .name = "TMU0",
        .channel_offset = 0x02,
        .timer_bit = 0,
-       .clk = "peripheral_clk",
        .clockevent_rating = 200,
 };
 
 static struct resource tmu0_resources[] = {
        [0] = {
-               .name   = "TMU0",
                .start  = 0xa412fe94,
                .end    = 0xa412fe9f,
                .flags  = IORESOURCE_MEM,
@@ -311,16 +299,13 @@ static struct platform_device tmu0_device = {
 };
 
 static struct sh_timer_config tmu1_platform_data = {
-       .name = "TMU1",
        .channel_offset = 0xe,
        .timer_bit = 1,
-       .clk = "peripheral_clk",
        .clocksource_rating = 200,
 };
 
 static struct resource tmu1_resources[] = {
        [0] = {
-               .name   = "TMU1",
                .start  = 0xa412fea0,
                .end    = 0xa412feab,
                .flags  = IORESOURCE_MEM,
@@ -342,15 +327,12 @@ static struct platform_device tmu1_device = {
 };
 
 static struct sh_timer_config tmu2_platform_data = {
-       .name = "TMU2",
        .channel_offset = 0x1a,
        .timer_bit = 2,
-       .clk = "peripheral_clk",
 };
 
 static struct resource tmu2_resources[] = {
        [0] = {
-               .name   = "TMU2",
                .start  = 0xa412feac,
                .end    = 0xa412feb5,
                .flags  = IORESOURCE_MEM,
@@ -372,6 +354,8 @@ static struct platform_device tmu2_device = {
 };
 
 static struct platform_device *sh7720_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &cmt0_device,
        &cmt1_device,
        &cmt2_device,
@@ -381,7 +365,6 @@ static struct platform_device *sh7720_devices[] __initdata = {
        &tmu1_device,
        &tmu2_device,
        &rtc_device,
-       &sci_device,
        &usb_ohci_device,
        &usbf_device,
 };
@@ -391,9 +374,11 @@ static int __init sh7720_devices_setup(void)
        return platform_add_devices(sh7720_devices,
                                    ARRAY_SIZE(sh7720_devices));
 }
-__initcall(sh7720_devices_setup);
+arch_initcall(sh7720_devices_setup);
 
 static struct platform_device *sh7720_early_devices[] __initdata = {
+       &scif0_device,
+       &scif1_device,
        &cmt0_device,
        &cmt1_device,
        &cmt2_device,