Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 342228
b: refs/heads/master
c: 67948ad
h: refs/heads/master
v: v3
  • Loading branch information
Stanislav Meduna authored and Shawn Guo committed Nov 12, 2012
1 parent eea2c55 commit 2b2a08f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 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: 24196d5c597272b1e5c57903f2e3c7996e607117
refs/heads/master: 67948adad178a041cd545c3f9b2bd077b1c5d7a1
10 changes: 9 additions & 1 deletion trunk/arch/arm/mach-mxs/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
#include <linux/of_irq.h>

#include <asm/mach/time.h>
#include <asm/sched_clock.h>
#include <mach/mxs.h>
#include <mach/common.h>

Expand Down Expand Up @@ -233,15 +234,22 @@ static struct clocksource clocksource_mxs = {
.flags = CLOCK_SOURCE_IS_CONTINUOUS,
};

static u32 notrace mxs_read_sched_clock_v2(void)
{
return ~readl_relaxed(mxs_timrot_base + HW_TIMROT_RUNNING_COUNTn(1));
}

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

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

return 0;
}
Expand Down

0 comments on commit 2b2a08f

Please sign in to comment.