aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorPaul Mundt <lethal@linux-sh.org>2009-04-16 02:36:13 -0400
committerPaul Mundt <lethal@linux-sh.org>2009-04-16 02:36:13 -0400
commit6a3395beb99d7ae882ddf701c6fa6005ad7edebf (patch)
treea892e23174978236e101b49dedae554b931a03a0 /arch
parentad95b78c9f735da11ff9ec760e9b038cd82aead6 (diff)
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')
-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 = {
230 .num_resources = ARRAY_SIZE(veu1_resources), 230 .num_resources = ARRAY_SIZE(veu1_resources),
231}; 231};
232 232
233static struct sh_cmt_config cmt_platform_data = {
234 .name = "CMT",
235 .channel_offset = 0x60,
236 .timer_bit = 5,
237 .clk = "cmt0",
238 .clockevent_rating = 125,
239 .clocksource_rating = 200,
240};
241
242static struct resource cmt_resources[] = {
243 [0] = {
244 .name = "CMT",
245 .start = 0x044a0060,
246 .end = 0x044a006b,
247 .flags = IORESOURCE_MEM,
248 },
249 [1] = {
250 .start = 104,
251 .flags = IORESOURCE_IRQ,
252 },
253};
254
255static struct platform_device cmt_device = {
256 .name = "sh_cmt",
257 .id = 0,
258 .dev = {
259 .platform_data = &cmt_platform_data,
260 },
261 .resource = cmt_resources,
262 .num_resources = ARRAY_SIZE(cmt_resources),
263};
264
233static struct platform_device *sh7724_devices[] __initdata = { 265static struct platform_device *sh7724_devices[] __initdata = {
266 &cmt_device,
234 &sci_device, 267 &sci_device,
235 &rtc_device, 268 &rtc_device,
236 &iic0_device, 269 &iic0_device,