]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - arch/arm/cpu/arm926ejs/at91/timer.c
arm: Move tbl to arch_global_data
[people/ms/u-boot.git] / arch / arm / cpu / arm926ejs / at91 / timer.c
index f691518c741469897f321fc9b615d1b6efb648ea..4443fefb6472f984a9072002d88239bc8b66602a 100644 (file)
@@ -80,7 +80,7 @@ int timer_init(void)
        writel(TIMER_LOAD_VAL | AT91_PIT_MR_EN , &pit->mr);
 
        gd->arch.timer_rate_hz = gd->arch.mck_rate_hz / 16;
-       gd->arch.tbu = gd->tbl = 0;
+       gd->arch.tbu = gd->arch.tbl = 0;
 
        return 0;
 }
@@ -95,10 +95,10 @@ unsigned long long get_ticks(void)
        ulong now = readl(&pit->piir);
 
        /* increment tbu if tbl has rolled over */
-       if (now < gd->tbl)
+       if (now < gd->arch.tbl)
                gd->arch.tbu++;
-       gd->tbl = now;
-       return (((unsigned long long)gd->arch.tbu) << 32) | gd->tbl;
+       gd->arch.tbl = now;
+       return (((unsigned long long)gd->arch.tbu) << 32) | gd->arch.tbl;
 }
 
 void __udelay(unsigned long usec)