Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249917
b: refs/heads/master
c: 5c61ddc
h: refs/heads/master
i:
  249915: 74735a6
v: v3
  • Loading branch information
Russell King committed May 23, 2011
1 parent 3ecf052 commit 324d02d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d6e15d78537d2483bff05f0ee5b5cec6c4678fd5
refs/heads/master: 5c61ddcfaf98fae4a0ac8077b06a07fb2ba6864a
1 change: 1 addition & 0 deletions trunk/arch/arm/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ config ARCH_MXS
select GENERIC_CLOCKEVENTS
select ARCH_REQUIRE_GPIOLIB
select CLKDEV_LOOKUP
select CLKSRC_MMIO
help
Support for Freescale MXS-based family of processors

Expand Down
20 changes: 7 additions & 13 deletions trunk/arch/arm/mach-mxs/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,6 @@ static cycle_t timrotv1_get_cycles(struct clocksource *cs)
& 0xffff0000) >> 16);
}

static cycle_t timrotv2_get_cycles(struct clocksource *cs)
{
return ~__raw_readl(mxs_timrot_base + HW_TIMROT_RUNNING_COUNTn(1));
}

static int timrotv1_set_next_event(unsigned long evt,
struct clock_event_device *dev)
{
Expand Down Expand Up @@ -230,21 +225,20 @@ static int __init mxs_clockevent_init(struct clk *timer_clk)
static struct clocksource clocksource_mxs = {
.name = "mxs_timer",
.rating = 200,
.read = timrotv2_get_cycles,
.mask = CLOCKSOURCE_MASK(32),
.read = timrotv1_get_cycles,
.mask = CLOCKSOURCE_MASK(16),
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

static int __init mxs_clocksource_init(struct clk *timer_clk)
{
unsigned int c = clk_get_rate(timer_clk);

if (timrot_is_v1()) {
clocksource_mxs.read = timrotv1_get_cycles;
clocksource_mxs.mask = CLOCKSOURCE_MASK(16);
}

clocksource_register_hz(&clocksource_mxs, c);
if (timrot_is_v1())
clocksource_register_hz(&clocksource_mxs, c);
else
clocksource_mmio_init(mxs_timrot_base + HW_TIMROT_RUNNING_COUNTn(1),
"mxs_timer", c, 200, 32, clocksource_mmio_readl_down);

return 0;
}
Expand Down

0 comments on commit 324d02d

Please sign in to comment.