diff options
author | Stefan Reinauer <reinauer@chromium.org> | 2013-09-11 15:18:14 -0700 |
---|---|---|
committer | Isaac Christensen <isaac.christensen@se-eng.com> | 2014-08-14 20:02:36 +0200 |
commit | 6ada053709f24675bda1b3598e86426a712d63f9 (patch) | |
tree | 3584b286a18c4613ab0176d2f270bb8b22f6f4b2 /src/cpu/samsung/exynos5420/monotonic_timer.c | |
parent | d29bf2068f27d632fd02db75634b746c594681f8 (diff) | |
download | coreboot-6ada053709f24675bda1b3598e86426a712d63f9.tar.xz |
Exynos: de-duplicate mct timer initialization
timer initialization is the first thing happening in
the Exynos CPU's bootblock code. Hence we don't need
to keep track of it in several places, and we don't
need to do it over and over again (e.g. in each stage)
Change-Id: I7bd9a0b7930fc9c37faabd62e3eecc3e5614a879
Signed-off-by: Stefan Reinauer <reinauer@google.com>
Reviewed-on: https://chromium-review.googlesource.com/168994
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
Commit-Queue: Stefan Reinauer <reinauer@chromium.org>
Tested-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 5a95bc2bcab5a92c5e6c144005861bf731f59de3)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6638
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/cpu/samsung/exynos5420/monotonic_timer.c')
-rw-r--r-- | src/cpu/samsung/exynos5420/monotonic_timer.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cpu/samsung/exynos5420/monotonic_timer.c b/src/cpu/samsung/exynos5420/monotonic_timer.c index 267d9c3aef..89ac416eb1 100644 --- a/src/cpu/samsung/exynos5420/monotonic_timer.c +++ b/src/cpu/samsung/exynos5420/monotonic_timer.c @@ -22,16 +22,13 @@ #include "clk.h" -static int initialized; - static const uint32_t clocks_per_usec = MCT_HZ/1000000; void timer_monotonic_get(struct mono_time *mt) { - if (!initialized) { - mct_start(); - initialized = 1; - } + /* We don't have to call mct_start() here + * because it was already called in the bootblock + */ mono_time_set_usecs(mt, mct_raw_value() / clocks_per_usec); } |