diff options
Diffstat (limited to 'arch/arm/plat-omap/common.c')
-rw-r--r-- | arch/arm/plat-omap/common.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/arch/arm/plat-omap/common.c b/arch/arm/plat-omap/common.c index 0843b8882f93..6825fbb5a056 100644 --- a/arch/arm/plat-omap/common.c +++ b/arch/arm/plat-omap/common.c | |||
@@ -200,20 +200,16 @@ static struct clocksource clocksource_32k = { | |||
200 | }; | 200 | }; |
201 | 201 | ||
202 | /* | 202 | /* |
203 | * Rounds down to nearest nsec. | ||
204 | */ | ||
205 | unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k) | ||
206 | { | ||
207 | return cyc2ns(&clocksource_32k, ticks_32k); | ||
208 | } | ||
209 | |||
210 | /* | ||
211 | * Returns current time from boot in nsecs. It's OK for this to wrap | 203 | * Returns current time from boot in nsecs. It's OK for this to wrap |
212 | * around for now, as it's just a relative time stamp. | 204 | * around for now, as it's just a relative time stamp. |
213 | */ | 205 | */ |
214 | unsigned long long sched_clock(void) | 206 | unsigned long long sched_clock(void) |
215 | { | 207 | { |
216 | return omap_32k_ticks_to_nsecs(omap_32k_read()); | 208 | unsigned long long ret; |
209 | |||
210 | ret = (unsigned long long)omap_32k_read(); | ||
211 | ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift; | ||
212 | return ret; | ||
217 | } | 213 | } |
218 | 214 | ||
219 | static int __init omap_init_clocksource_32k(void) | 215 | static int __init omap_init_clocksource_32k(void) |