diff options
author | David Hendricks <dhendrix@chromium.org> | 2013-05-02 16:47:54 -0700 |
---|---|---|
committer | Ronald G. Minnich <rminnich@gmail.com> | 2013-05-03 17:27:28 +0200 |
commit | 2fde9668b47e74d1bfad2f1688a4481e6b966d04 (patch) | |
tree | 33ab1f516226c77aaad5e97659ef58ae30d02a29 /src/cpu | |
parent | 37714f33a6ac922c8e3a8e5761c0c7ac505acad1 (diff) | |
download | coreboot-staging-2fde9668b47e74d1bfad2f1688a4481e6b966d04.zip coreboot-staging-2fde9668b47e74d1bfad2f1688a4481e6b966d04.tar.gz |
exynos5250/snow: deprecate time.h
time.h We Hardly Knew Ye.
This deprecates time.h which is currently only used by Exynos5250 and
Snow. The original idea was to try and unify some of the various timer
interfaces and has been supplanted by the monotonic timer API.
timer_us() is now obsolete. timer_start() is now mct_start() and
is exposed in exynos5250/clk.h.
Signed-off-by: David Hendricks <dhendrix@chromium.org>
Change-Id: I14ebf75649d101491252c9aafea12f73ccf446b5
Reviewed-on: http://review.coreboot.org/3177
Reviewed-by: Aaron Durbin <adurbin@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/cpu')
-rw-r--r-- | src/cpu/samsung/exynos5250/clk.h | 1 | ||||
-rw-r--r-- | src/cpu/samsung/exynos5250/mct.c | 12 | ||||
-rw-r--r-- | src/cpu/samsung/exynos5250/monotonic_timer.c | 1 |
3 files changed, 3 insertions, 11 deletions
diff --git a/src/cpu/samsung/exynos5250/clk.h b/src/cpu/samsung/exynos5250/clk.h index 1894c00..828e7d8 100644 --- a/src/cpu/samsung/exynos5250/clk.h +++ b/src/cpu/samsung/exynos5250/clk.h @@ -585,6 +585,7 @@ int clock_get_mem_selection(enum ddr_mode *mem_type, unsigned *frequency_mhz, unsigned *arm_freq, enum mem_manuf *mem_manuf); +void mct_start(void); uint64_t mct_raw_value(void); #endif diff --git a/src/cpu/samsung/exynos5250/mct.c b/src/cpu/samsung/exynos5250/mct.c index 4216643..db76e9d 100644 --- a/src/cpu/samsung/exynos5250/mct.c +++ b/src/cpu/samsung/exynos5250/mct.c @@ -22,7 +22,7 @@ #include <arch/io.h> #include <stdint.h> -#include <time.h> + #include "clk.h" struct __attribute__((packed)) mct_regs @@ -101,16 +101,8 @@ uint64_t mct_raw_value(void) return (upper << 32) | lower; } -void timer_start(void) +void mct_start(void) { writel(readl(&mct->g_tcon) | (0x1 << 8), &mct->g_tcon); enabled = 1; } - -u32 timer_us(void) -{ - uint64_t raw = mct_raw_value(); - static uint32_t ticks_per_microsecond = MCT_HZ/1000000; - uint32_t usec = raw / ticks_per_microsecond; - return usec; -} diff --git a/src/cpu/samsung/exynos5250/monotonic_timer.c b/src/cpu/samsung/exynos5250/monotonic_timer.c index 85fb208..7c6229b 100644 --- a/src/cpu/samsung/exynos5250/monotonic_timer.c +++ b/src/cpu/samsung/exynos5250/monotonic_timer.c @@ -20,7 +20,6 @@ #include <stdint.h> #include <delay.h> #include <timer.h> -#include <time.h> /* TODO: deprecate in favor of monotonic timer stuff */ #include "clk.h" |