aboutsummaryrefslogtreecommitdiffstats
path: root/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-16 15:36:13 +0900
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 15:36:13 +0900
commit6a3395beb99d7ae882ddf701c6fa6005ad7edebf (patch)
treea892e23174978236e101b49dedae554b931a03a0 /arch/sh/kernel/cpu/sh4a/setup-sh7724.c
parentsh: sh7724: Add VEU support. (diff)
downloadlinux-dev-6a3395beb99d7ae882ddf701c6fa6005ad7edebf.tar.xz
linux-dev-6a3395beb99d7ae882ddf701c6fa6005ad7edebf.zip
sh: sh7724: Add CMT clockevents support.
This enables support for the CMT clockevents driver on SH7724. Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/sh/kernel/cpu/sh4a/setup-sh7724.c')
-rw-r--r--arch/sh/kernel/cpu/sh4a/setup-sh7724.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
index 65570ed69e6c..8b87ba8f26bb 100644
--- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
@@ -230,7 +230,40 @@ static struct platform_device veu1_device = {
.num_resources = ARRAY_SIZE(veu1_resources),
};
+static struct sh_cmt_config cmt_platform_data = {
+ .name = "CMT",
+ .channel_offset = 0x60,
+ .timer_bit = 5,
+ .clk = "cmt0",
+ .clockevent_rating = 125,
+ .clocksource_rating = 200,
+};
+
+static struct resource cmt_resources[] = {
+ [0] = {
+ .name = "CMT",
+ .start = 0x044a0060,
+ .end = 0x044a006b,
+ .flags = IORESOURCE_MEM,
+ },
+ [1] = {
+ .start = 104,
+ .flags = IORESOURCE_IRQ,
+ },
+};
+
+static struct platform_device cmt_device = {
+ .name = "sh_cmt",
+ .id = 0,
+ .dev = {
+ .platform_data = &cmt_platform_data,
+ },
+ .resource = cmt_resources,
+ .num_resources = ARRAY_SIZE(cmt_resources),
+};
+
static struct platform_device *sh7724_devices[] __initdata = {
+ &cmt_device,
&sci_device,
&rtc_device,
&iic0_device,