]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/armv7/arch_timer.c
imx: i.mx6q: add the initial support for LogicPD i.MX6Q SOM
[u-boot] / arch / arm / cpu / armv7 / arch_timer.c
index 0588e2baef5ed10b69f7c271f5c19419770c4881..30915d28aa9cc09b86f23d4f4b6679996a458b40 100644 (file)
@@ -8,6 +8,7 @@
 #include <common.h>
 #include <asm/io.h>
 #include <div64.h>
+#include <bootstage.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -17,7 +18,6 @@ int timer_init(void)
        gd->arch.tbu = 0;
 
        gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ;
-
        return 0;
 }
 
@@ -39,6 +39,11 @@ ulong get_timer(ulong base)
        return lldiv(get_ticks(), gd->arch.timer_rate_hz) - base;
 }
 
+ulong timer_get_boot_us(void)
+{
+       return lldiv(get_ticks(), CONFIG_SYS_HZ_CLOCK / (CONFIG_SYS_HZ * 1000));
+}
+
 void __udelay(unsigned long usec)
 {
        unsigned long long endtime;