Skip to content

Commit

Permalink
sh: sh7724: Add CMT clockevents support.
Browse files Browse the repository at this point in the history
This enables support for the CMT clockevents driver on SH7724.

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
  • Loading branch information
Paul Mundt committed Apr 16, 2009
1 parent ad95b78 commit 6a3395b
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions arch/sh/kernel/cpu/sh4a/setup-sh7724.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 6a3395b

Please sign in to comment.