]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/sh/lib/time.c
Merge branch 'master' of git://git.denx.de/u-boot-net
[karo-tx-uboot.git] / arch / sh / lib / time.c
index bc1656f73ce535685e6563433f94ad0aa7d62a38..a01596cace6eb2bb477b9fbb7e224a9f90239ee9 100644 (file)
@@ -108,14 +108,9 @@ int timer_init (void)
 unsigned long long get_ticks (void)
 {
        unsigned long tcnt = 0 - readl(TCNT0);
-       unsigned long ticks;
 
-       if (last_tcnt > tcnt) /* overflow */
+       if (last_tcnt > tcnt) /* overflow */
                overflow_ticks++;
-               ticks = (0xffffffff - last_tcnt) + tcnt;
-       } else {
-               ticks = tcnt;
-       }
        last_tcnt = tcnt;
 
        return (overflow_ticks << 32) | tcnt;
@@ -139,18 +134,6 @@ unsigned long get_timer (unsigned long base)
        return tick_to_time(get_ticks()) - base;
 }
 
-void set_timer (unsigned long t)
-{
-       writel((0 - t), TCNT0);
-}
-
-void reset_timer (void)
-{
-       tmu_timer_stop(0);
-       set_timer (0);
-       tmu_timer_start(0);
-}
-
 unsigned long get_tbclk (void)
 {
        return timer_freq;