summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7/arch_timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/armv7/arch_timer.c')
-rw-r--r--arch/arm/cpu/armv7/arch_timer.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/arch_timer.c b/arch/arm/cpu/armv7/arch_timer.c
index 0588e2baef..30915d28aa 100644
--- a/arch/arm/cpu/armv7/arch_timer.c
+++ b/arch/arm/cpu/armv7/arch_timer.c
@@ -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;