summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile/setup-sh73a0.c
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2010-12-21 08:40:59 +0000
committerPaul Mundt <lethal@linux-sh.org>2010-12-22 13:46:15 +0900
commit5010f3db952b19cd353d1e90838818922d995697 (patch)
tree98180c6380ed5c8f9bde0d046b1ae7a220c89882 /arch/arm/mach-shmobile/setup-sh73a0.c
parent5f53a56af50c002cdb091914aa98df80b1b28ec8 (diff)
downloadblackbird-op-linux-5010f3db952b19cd353d1e90838818922d995697.tar.gz
blackbird-op-linux-5010f3db952b19cd353d1e90838818922d995697.zip
ARM: mach-shmobile: sh73a0 TMU support
Add support for 2 TMU timer channels on sh73a0. One timer channel is used for clocksource and the other is used for clockevents. All channels in the same TMU block share MSTP bit as usual. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile/setup-sh73a0.c')
-rw-r--r--arch/arm/mach-shmobile/setup-sh73a0.c63
1 files changed, 63 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
index 53f1ea66efbc..f1eff8b37bd6 100644
--- a/arch/arm/mach-shmobile/setup-sh73a0.c
+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
@@ -208,6 +208,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 +385,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 = {
OpenPOWER on IntegriCloud