Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux...
[cascardo/linux.git] / arch / arm / mach-shmobile / setup-sh73a0.c
index 53f1ea6..685c40a 100644 (file)
@@ -36,6 +36,8 @@
 static struct plat_sci_port scif0_platform_data = {
        .mapbase        = 0xe6c40000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(72), gic_spi(72),
                            gic_spi(72), gic_spi(72) },
@@ -52,6 +54,8 @@ static struct platform_device scif0_device = {
 static struct plat_sci_port scif1_platform_data = {
        .mapbase        = 0xe6c50000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(73), gic_spi(73),
                            gic_spi(73), gic_spi(73) },
@@ -68,6 +72,8 @@ static struct platform_device scif1_device = {
 static struct plat_sci_port scif2_platform_data = {
        .mapbase        = 0xe6c60000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(74), gic_spi(74),
                            gic_spi(74), gic_spi(74) },
@@ -84,6 +90,8 @@ static struct platform_device scif2_device = {
 static struct plat_sci_port scif3_platform_data = {
        .mapbase        = 0xe6c70000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(75), gic_spi(75),
                            gic_spi(75), gic_spi(75) },
@@ -100,6 +108,8 @@ static struct platform_device scif3_device = {
 static struct plat_sci_port scif4_platform_data = {
        .mapbase        = 0xe6c80000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(78), gic_spi(78),
                            gic_spi(78), gic_spi(78) },
@@ -116,6 +126,8 @@ static struct platform_device scif4_device = {
 static struct plat_sci_port scif5_platform_data = {
        .mapbase        = 0xe6cb0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(79), gic_spi(79),
                            gic_spi(79), gic_spi(79) },
@@ -132,6 +144,8 @@ static struct platform_device scif5_device = {
 static struct plat_sci_port scif6_platform_data = {
        .mapbase        = 0xe6cc0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(156), gic_spi(156),
                            gic_spi(156), gic_spi(156) },
@@ -148,6 +162,8 @@ static struct platform_device scif6_device = {
 static struct plat_sci_port scif7_platform_data = {
        .mapbase        = 0xe6cd0000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFA,
        .irqs           = { gic_spi(143), gic_spi(143),
                            gic_spi(143), gic_spi(143) },
@@ -164,6 +180,8 @@ static struct platform_device scif7_device = {
 static struct plat_sci_port scif8_platform_data = {
        .mapbase        = 0xe6c30000,
        .flags          = UPF_BOOT_AUTOCONF,
+       .scscr          = SCSCR_RE | SCSCR_TE,
+       .scbrr_algo_id  = SCBRR_ALGO_4,
        .type           = PORT_SCIFB,
        .irqs           = { gic_spi(80), gic_spi(80),
                            gic_spi(80), gic_spi(80) },
@@ -208,6 +226,67 @@ static struct platform_device cmt10_device = {
        .num_resources  = ARRAY_SIZE(cmt10_resources),
 };
 
+/* TMU */
+static struct sh_timer_config tmu00_platform_data = {
+       .name = "TMU00",
+       .channel_offset = 0x4,
+       .timer_bit = 0,
+       .clockevent_rating = 200,
+};
+
+static struct resource tmu00_resources[] = {
+       [0] = {
+               .name   = "TMU00",
+               .start  = 0xfff60008,
+               .end    = 0xfff60013,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device tmu00_device = {
+       .name           = "sh_tmu",
+       .id             = 0,
+       .dev = {
+               .platform_data  = &tmu00_platform_data,
+       },
+       .resource       = tmu00_resources,
+       .num_resources  = ARRAY_SIZE(tmu00_resources),
+};
+
+static struct sh_timer_config tmu01_platform_data = {
+       .name = "TMU01",
+       .channel_offset = 0x10,
+       .timer_bit = 1,
+       .clocksource_rating = 200,
+};
+
+static struct resource tmu01_resources[] = {
+       [0] = {
+               .name   = "TMU01",
+               .start  = 0xfff60014,
+               .end    = 0xfff6001f,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device tmu01_device = {
+       .name           = "sh_tmu",
+       .id             = 1,
+       .dev = {
+               .platform_data  = &tmu01_platform_data,
+       },
+       .resource       = tmu01_resources,
+       .num_resources  = ARRAY_SIZE(tmu01_resources),
+};
+
 static struct resource i2c0_resources[] = {
        [0] = {
                .name   = "IIC0",
@@ -324,6 +403,8 @@ static struct platform_device *sh73a0_early_devices[] __initdata = {
        &scif7_device,
        &scif8_device,
        &cmt10_device,
+       &tmu00_device,
+       &tmu01_device,
 };
 
 static struct platform_device *sh73a0_late_devices[] __initdata = {