]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - arch/arm/mach-shmobile/setup-sh7372.c
Merge tag 'boards-for-3.16' of git://git.kernel.org/pub/scm/linux/kernel/git/arm...
[linux.git] / arch / arm / mach-shmobile / setup-sh7372.c
index f8176b051be485b4c242b29f2c281ac1275a8571..2a8b9f2a2f549e1737aa8040e9ce5e4e90ac7b80 100644 (file)
@@ -119,28 +119,16 @@ SH7372_SCIF(PORT_SCIFB, 6, 0xe6c30000, evt2irq(0x0d60));
 
 /* CMT */
 static struct sh_timer_config cmt2_platform_data = {
-       .name = "CMT2",
-       .channel_offset = 0x40,
-       .timer_bit = 5,
-       .clockevent_rating = 125,
-       .clocksource_rating = 125,
+       .channels_mask = 0x20,
 };
 
 static struct resource cmt2_resources[] = {
-       [0] = {
-               .name   = "CMT2",
-               .start  = 0xe6130040,
-               .end    = 0xe613004b,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = evt2irq(0x0b80), /* CMT2 */
-               .flags  = IORESOURCE_IRQ,
-       },
+       DEFINE_RES_MEM(0xe6130000, 0x50),
+       DEFINE_RES_IRQ(evt2irq(0x0b80)),
 };
 
 static struct platform_device cmt2_device = {
-       .name           = "sh_cmt",
+       .name           = "sh-cmt-32-fast",
        .id             = 2,
        .dev = {
                .platform_data  = &cmt2_platform_data,
@@ -150,64 +138,25 @@ static struct platform_device cmt2_device = {
 };
 
 /* TMU */
-static struct sh_timer_config tmu00_platform_data = {
-       .name = "TMU00",
-       .channel_offset = 0x4,
-       .timer_bit = 0,
-       .clockevent_rating = 200,
+static struct sh_timer_config tmu0_platform_data = {
+       .channels_mask = 7,
 };
 
-static struct resource tmu00_resources[] = {
-       [0] = {
-               .name   = "TMU00",
-               .start  = 0xfff60008,
-               .end    = 0xfff60013,
-               .flags  = IORESOURCE_MEM,
-       },
-       [1] = {
-               .start  = intcs_evt2irq(0xe80), /* TMU_TUNI0 */
-               .flags  = IORESOURCE_IRQ,
-       },
+static struct resource tmu0_resources[] = {
+       DEFINE_RES_MEM(0xfff60000, 0x2c),
+       DEFINE_RES_IRQ(intcs_evt2irq(0xe80)),
+       DEFINE_RES_IRQ(intcs_evt2irq(0xea0)),
+       DEFINE_RES_IRQ(intcs_evt2irq(0xec0)),
 };
 
-static struct platform_device tmu00_device = {
-       .name           = "sh_tmu",
+static struct platform_device tmu0_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(0xea0), /* TMU_TUNI1 */
-               .flags  = IORESOURCE_IRQ,
-       },
-};
-
-static struct platform_device tmu01_device = {
-       .name           = "sh_tmu",
-       .id             = 1,
-       .dev = {
-               .platform_data  = &tmu01_platform_data,
+               .platform_data  = &tmu0_platform_data,
        },
-       .resource       = tmu01_resources,
-       .num_resources  = ARRAY_SIZE(tmu01_resources),
+       .resource       = tmu0_resources,
+       .num_resources  = ARRAY_SIZE(tmu0_resources),
 };
 
 /* I2C */
@@ -952,8 +901,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
        &scif5_device,
        &scif6_device,
        &cmt2_device,
-       &tmu00_device,
-       &tmu01_device,
+       &tmu0_device,
        &ipmmu_device,
 };
 
@@ -1000,8 +948,7 @@ void __init sh7372_add_standard_devices(void)
                { "A4R", &veu2_device, },
                { "A4R", &veu3_device, },
                { "A4R", &jpu_device, },
-               { "A4R", &tmu00_device, },
-               { "A4R", &tmu01_device, },
+               { "A4R", &tmu0_device, },
        };
 
        sh7372_init_pm_domains();