]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/plat-omap/common.c
Merge branch 'master' of git://git.marvell.com/orion into devel
[linux-2.6-omap-h63xx.git] / arch / arm / plat-omap / common.c
index 187239c054c9ac698dff423192bb03f332b5e7fe..d1797147732f217ce4906f5388e55956b7f4f62c 100644 (file)
@@ -199,21 +199,17 @@ static struct clocksource clocksource_32k = {
        .flags          = CLOCK_SOURCE_IS_CONTINUOUS,
 };
 
-/*
- * Rounds down to nearest nsec.
- */
-unsigned long long omap_32k_ticks_to_nsecs(unsigned long ticks_32k)
-{
-       return cyc2ns(&clocksource_32k, ticks_32k);
-}
-
 /*
  * Returns current time from boot in nsecs. It's OK for this to wrap
  * around for now, as it's just a relative time stamp.
  */
 unsigned long long sched_clock(void)
 {
-       return omap_32k_ticks_to_nsecs(omap_32k_read());
+       unsigned long long ret;
+
+       ret = (unsigned long long)omap_32k_read();
+       ret = (ret * clocksource_32k.mult_orig) >> clocksource_32k.shift;
+       return ret;
 }
 
 static int __init omap_init_clocksource_32k(void)