|
@@ -8,6 +8,7 @@
|
|
#include <common.h>
|
|
#include <common.h>
|
|
#include <asm/io.h>
|
|
#include <asm/io.h>
|
|
#include <div64.h>
|
|
#include <div64.h>
|
|
|
|
+#include <bootstage.h>
|
|
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
|
@@ -17,7 +18,6 @@ int timer_init(void)
|
|
gd->arch.tbu = 0;
|
|
gd->arch.tbu = 0;
|
|
|
|
|
|
gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ;
|
|
gd->arch.timer_rate_hz = CONFIG_SYS_HZ_CLOCK / CONFIG_SYS_HZ;
|
|
-
|
|
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -39,6 +39,11 @@ ulong get_timer(ulong base)
|
|
return lldiv(get_ticks(), gd->arch.timer_rate_hz) - 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)
|
|
void __udelay(unsigned long usec)
|
|
{
|
|
{
|
|
unsigned long long endtime;
|
|
unsigned long long endtime;
|