]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/armv8/generic_timer.c
Merge git://git.denx.de/u-boot-mpc85xx
[u-boot] / arch / arm / cpu / armv8 / generic_timer.c
index 8f47a82043b00519100bb4e600edc23c47ac8d90..cd92b2c7617dcc1f4fb7531a08b9eb19d63ca008 100644 (file)
@@ -9,6 +9,8 @@
 #include <command.h>
 #include <asm/system.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * Generic timer implementation of get_tbclk()
  */
@@ -41,6 +43,15 @@ unsigned long timer_read_counter(void)
        return cntpct;
 }
 
+unsigned long long get_ticks(void)
+{
+       unsigned long ticks = timer_read_counter();
+
+       gd->arch.tbl = ticks;
+
+       return ticks;
+}
+
 unsigned long usec2ticks(unsigned long usec)
 {
        ulong ticks;