From 22be29e23b278bc0dd344832a8e3cab1eeb07f7a Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Wed, 20 Nov 2019 22:02:33 +0100 Subject: drivers/pc80/pc/i8254.c: Drop CAR_GLOBAL_MIGRATION support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ibe9b353ce050b4718e07bccb958dbe3d2312e741 Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/37045 Reviewed-by: Kyösti Mälkki Reviewed-by: HAOUAS Elyes Tested-by: build bot (Jenkins) --- src/drivers/pc80/pc/i8254.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/drivers/pc80/pc') diff --git a/src/drivers/pc80/pc/i8254.c b/src/drivers/pc80/pc/i8254.c index 5090f0c85b..9d23d4697e 100644 --- a/src/drivers/pc80/pc/i8254.c +++ b/src/drivers/pc80/pc/i8254.c @@ -11,7 +11,6 @@ * GNU General Public License for more details. */ -#include #include #include #include @@ -107,23 +106,19 @@ bad_ctc: } #if CONFIG(UNKNOWN_TSC_RATE) -static u32 g_timer_tsc CAR_GLOBAL; +static u32 g_timer_tsc; unsigned long tsc_freq_mhz(void) { - u32 tsc; + if (g_timer_tsc > 0) + return g_timer_tsc; - tsc = car_get_var(g_timer_tsc); - if (tsc > 0) - return tsc; - - tsc = calibrate_tsc_with_pit(); + g_timer_tsc = calibrate_tsc_with_pit(); /* Set some semi-ridiculous rate if approximation fails. */ - if (tsc == 0) - tsc = 5000; + if (g_timer_tsc == 0) + g_timer_tsc = 5000; - car_set_var(g_timer_tsc, tsc); - return tsc; + return g_timer_tsc; } #endif -- cgit v1.2.3