]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/cpu/armv7/u8500/timer.c
arm: Move tbl to arch_global_data
[karo-tx-uboot.git] / arch / arm / cpu / armv7 / u8500 / timer.c
index 8e96eaa771b74176a45e36340397580635563472..a20897b76a96e970355c89764bec7f900f2722a5 100644 (file)
@@ -100,12 +100,14 @@ ulong get_timer_masked(void)
        /* current tick value */
        ulong now = TICKS_TO_HZ(READ_TIMER());
 
-       if (now >= gd->lastinc) /* normal (non rollover) */
-               gd->tbl += (now - gd->lastinc);
-       else                    /* rollover */
-               gd->tbl += (TICKS_TO_HZ(TIMER_LOAD_VAL) - gd->lastinc) + now;
+       if (now >= gd->lastinc) {       /* normal (non rollover) */
+               gd->arch.tbl += (now - gd->lastinc);
+       } else {                        /* rollover */
+               gd->arch.tbl += (TICKS_TO_HZ(TIMER_LOAD_VAL) - gd->lastinc)
+                               + now;
+       }
        gd->lastinc = now;
-       return gd->tbl;
+       return gd->arch.tbl;
 }
 
 /* Delay x useconds */
@@ -129,15 +131,10 @@ ulong get_timer(ulong base)
        return get_timer_masked() - base;
 }
 
-void set_timer(ulong t)
-{
-       gd->tbl = t;
-}
-
 /*
  * Emulation of Power architecture long long timebase.
  *
- * TODO: Support gd->tbu for real long long timebase.
+ * TODO: Support gd->arch.tbu for real long long timebase.
  */
 unsigned long long get_ticks(void)
 {