arm: Move lastinc to arch_global_data
[oweals/u-boot.git] / arch / arm / cpu / arm926ejs / versatile / timer.c
index 81d67490db87cadb9bba2d7bd63d9bcb91048ea7..b36d6d93a57a865e36fbb301a859c59c03d93eff 100644 (file)
 /* macro to read the 32 bit timer */
 #define READ_TIMER (*(volatile ulong *)(CONFIG_SYS_TIMERBASE+4))
 
-static ulong timestamp;
-static ulong lastdec;
+DECLARE_GLOBAL_DATA_PTR;
+
+#define timestamp gd->arch.tbl
+#define lastdec gd->arch.lastinc
 
 #define TIMER_ENABLE   (1 << 7)
 #define TIMER_MODE_MSK (1 << 6)
@@ -92,22 +94,11 @@ int timer_init (void)
 /*
  * timer without interrupts
  */
-
-void reset_timer (void)
-{
-       reset_timer_masked ();
-}
-
 ulong get_timer (ulong base)
 {
        return get_timer_masked () - base;
 }
 
-void set_timer (ulong t)
-{
-       timestamp = t;
-}
-
 /* delay x useconds AND preserve advance timestamp value */
 void __udelay (unsigned long usec)
 {