]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arm/mach-shmobile/setup-r8a7740.c
Merge tag 'soc' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[karo-tx-linux.git] / arch / arm / mach-shmobile / setup-r8a7740.c
index b580979923eb7efc3a5444638a4341fd9a3856f4..30ac79c7c68737ad340e595c862eb29629a84819 100644 (file)
@@ -27,7 +27,6 @@
 #include <linux/serial_sci.h>
 #include <linux/sh_dma.h>
 #include <linux/sh_timer.h>
-#include <linux/dma-mapping.h>
 #include <mach/dma-register.h>
 #include <mach/r8a7740.h>
 #include <mach/pm-rmobile.h>
@@ -288,6 +287,97 @@ 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  = 0xfff80008,
+               .end    = 0xfff80014 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = intcs_evt2irq(0xe80),
+               .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  = 0xfff80014,
+               .end    = 0xfff80020 - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = intcs_evt2irq(0xea0),
+               .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 sh_timer_config tmu02_platform_data = {
+       .name = "TMU02",
+       .channel_offset = 0x1C,
+       .timer_bit = 2,
+       .clocksource_rating = 200,
+};
+
+static struct resource tmu02_resources[] = {
+       [0] = {
+               .name   = "TMU02",
+               .start  = 0xfff80020,
+               .end    = 0xfff8002C - 1,
+               .flags  = IORESOURCE_MEM,
+       },
+       [1] = {
+               .start  = intcs_evt2irq(0xec0),
+               .flags  = IORESOURCE_IRQ,
+       },
+};
+
+static struct platform_device tmu02_device = {
+       .name           = "sh_tmu",
+       .id             = 2,
+       .dev = {
+               .platform_data  = &tmu02_platform_data,
+       },
+       .resource       = tmu02_resources,
+       .num_resources  = ARRAY_SIZE(tmu02_resources),
+};
+
 static struct platform_device *r8a7740_early_devices[] __initdata = {
        &scif0_device,
        &scif1_device,
@@ -299,6 +389,9 @@ static struct platform_device *r8a7740_early_devices[] __initdata = {
        &scif7_device,
        &scifb_device,
        &cmt10_device,
+       &tmu00_device,
+       &tmu01_device,
+       &tmu02_device,
 };
 
 /* DMA */