diff options
author | Jonas Aaberg <jonas.aberg@stericsson.com> | 2010-07-06 14:52:41 +0200 |
---|---|---|
committer | Michael BRANDT <michael.brandt@stericsson.com> | 2010-07-23 14:34:59 +0200 |
commit | fd45ca2506fbd2afce6439a19701594c447e2d8b (patch) | |
tree | 22b5b07bb2501315cbbeb855147b1b75b7958503 /cpu | |
parent | cb1de5258f06a9e9f18ca20e65fc0fd2e21cde21 (diff) |
Enabled boottime measurements for u8500
Change-Id: I30b857fc0cf38f7e81647f1d0f9866d7d6a34612
Signed-off-by: Jonas Aaberg <jonas.aberg@stericsson.com>
Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2500
Reviewed-by: Michael BRANDT <michael.brandt@stericsson.com>
Diffstat (limited to 'cpu')
-rw-r--r-- | cpu/arm_cortexa9/stw8500/timer.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpu/arm_cortexa9/stw8500/timer.c b/cpu/arm_cortexa9/stw8500/timer.c index 3a3f311c8..bc27755b1 100644 --- a/cpu/arm_cortexa9/stw8500/timer.c +++ b/cpu/arm_cortexa9/stw8500/timer.c @@ -23,6 +23,7 @@ #include <common.h> #include <asm/io.h> #include <asm/arch/hardware.h> +#include <boottime.h> /* * The MTU device hosts four different counters, with 4 set of @@ -108,6 +109,11 @@ ulong get_timer(ulong base) return TICKS_TO_HZ(READ_TIMER()) - base; } +u64 get_timer_us(void) +{ + return COUNT_TO_USEC(READ_TIMER()); +} + /* Delay x useconds */ void udelay(unsigned long usec) { @@ -117,4 +123,5 @@ void udelay(unsigned long usec) end = ini + USEC_TO_COUNT(usec); while ((signed)(end - READ_TIMER()) > 0) ; + boottime_idle_add(usec); } |