From fd45ca2506fbd2afce6439a19701594c447e2d8b Mon Sep 17 00:00:00 2001 From: Jonas Aaberg Date: Tue, 6 Jul 2010 14:52:41 +0200 Subject: Enabled boottime measurements for u8500 Change-Id: I30b857fc0cf38f7e81647f1d0f9866d7d6a34612 Signed-off-by: Jonas Aaberg Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/2500 Reviewed-by: Michael BRANDT --- cpu/arm_cortexa9/stw8500/timer.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'cpu') 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 #include #include +#include /* * 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); } -- cgit v1.2.3