diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-tegra/timer.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/timer.c b/arch/arm/mach-tegra/timer.c index 9057d6fd1d31..b49f2f5025f2 100644 --- a/arch/arm/mach-tegra/timer.c +++ b/arch/arm/mach-tegra/timer.c | |||
@@ -91,7 +91,7 @@ static void tegra_timer_set_mode(enum clock_event_mode mode, | |||
91 | 91 | ||
92 | static cycle_t tegra_clocksource_read(struct clocksource *cs) | 92 | static cycle_t tegra_clocksource_read(struct clocksource *cs) |
93 | { | 93 | { |
94 | return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US)); | 94 | return timer_readl(TIMERUS_CNTR_1US); |
95 | } | 95 | } |
96 | 96 | ||
97 | static struct clock_event_device tegra_clockevent = { | 97 | static struct clock_event_device tegra_clockevent = { |
@@ -106,14 +106,13 @@ static struct clocksource tegra_clocksource = { | |||
106 | .name = "timer_us", | 106 | .name = "timer_us", |
107 | .rating = 300, | 107 | .rating = 300, |
108 | .read = tegra_clocksource_read, | 108 | .read = tegra_clocksource_read, |
109 | .mask = 0x7FFFFFFFFFFFFFFFULL, | 109 | .mask = CLOCKSOURCE_MASK(32), |
110 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, | 110 | .flags = CLOCK_SOURCE_IS_CONTINUOUS, |
111 | }; | 111 | }; |
112 | 112 | ||
113 | unsigned long long sched_clock(void) | 113 | unsigned long long sched_clock(void) |
114 | { | 114 | { |
115 | return clocksource_cyc2ns(tegra_clocksource.read(&tegra_clocksource), | 115 | return cnt32_to_63(timer_readl(TIMERUS_CNTR_1US)) * 1000; |
116 | tegra_clocksource.mult, tegra_clocksource.shift); | ||
117 | } | 116 | } |
118 | 117 | ||
119 | static irqreturn_t tegra_timer_interrupt(int irq, void *dev_id) | 118 | static irqreturn_t tegra_timer_interrupt(int irq, void *dev_id) |