diff options
author | David Hendricks <dhendrix@chromium.org> | 2013-05-02 13:23:08 -0700 |
---|---|---|
committer | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2013-05-03 06:28:54 +0200 |
commit | 5ec69ed884852426e17439263e3678c5dfbc71e7 (patch) | |
tree | 35ad1882b197bd5f484e32eabb3eebbf0e38d0eb /src/cpu/samsung/exynos5250/mct.c | |
parent | 008616247d4f03b47b2eb996029072a21789f3e0 (diff) | |
download | coreboot-5ec69ed884852426e17439263e3678c5dfbc71e7.tar.xz |
exynos5250: monotonic timer implementation (using MCT)
This implements the new monotonic timer API using the global
multi-core timer (MCT).
Change-Id: Id56249ff5d3e0f85808f5754954c83c0bc75f1c1
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Reviewed-on: http://review.coreboot.org/3175
Reviewed-by: Aaron Durbin <adurbin@google.com>
Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/cpu/samsung/exynos5250/mct.c')
-rw-r--r-- | src/cpu/samsung/exynos5250/mct.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cpu/samsung/exynos5250/mct.c b/src/cpu/samsung/exynos5250/mct.c index ddabbf7957..4216643140 100644 --- a/src/cpu/samsung/exynos5250/mct.c +++ b/src/cpu/samsung/exynos5250/mct.c @@ -88,7 +88,7 @@ static int enabled = 0; static struct mct_regs *const mct = (struct mct_regs *)MCT_ADDRESS; -static uint64_t timer_raw_value(void) +uint64_t mct_raw_value(void) { if (!enabled) { writel(readl(&mct->g_tcon) | (0x1 << 8), &mct->g_tcon); @@ -109,9 +109,8 @@ void timer_start(void) u32 timer_us(void) { - uint64_t raw = timer_raw_value(); + uint64_t raw = mct_raw_value(); static uint32_t ticks_per_microsecond = MCT_HZ/1000000; uint32_t usec = raw / ticks_per_microsecond; return usec; } - |