sandbox: convert to common time functions
authorRob Herring <rob.herring@calxeda.com>
Fri, 8 Nov 2013 14:40:44 +0000 (08:40 -0600)
committerTom Rini <trini@ti.com>
Fri, 8 Nov 2013 20:25:14 +0000 (15:25 -0500)
Convert sandbox to use common time functions.

Signed-off-by: Rob Herring <rob.herring@calxeda.com>
board/sandbox/sandbox/sandbox.c
include/configs/sandbox.h

index f471cb72125648d341d8003c8c1ca4a0cf78c53a..65dcce804bb6adc9d41ada2548152fabf4d0fa03 100644 (file)
@@ -18,19 +18,9 @@ void flush_cache(unsigned long start, unsigned long size)
 {
 }
 
-ulong get_tbclk(void)
+unsigned long timer_read_counter(void)
 {
-       return CONFIG_SYS_HZ;
-}
-
-unsigned long long get_ticks(void)
-{
-       return get_timer(0);
-}
-
-ulong get_timer(ulong base)
-{
-       return (os_get_nsec() / 1000000) - base;
+       return os_get_nsec() / 1000;
 }
 
 int timer_init(void)
index bce4fcf02ccca43a3889d413a80a63ab8575f269..0884ad3a0237046ac2c23747ac671a3950ab2301 100644 (file)
@@ -16,6 +16,8 @@
 
 #endif
 
+#define CONFIG_SYS_TIMER_RATE          1000000
+
 #define CONFIG_BOOTSTAGE
 #define CONFIG_BOOTSTAGE_REPORT