drivers/pc80/pc/i8254.c: Drop CAR_GLOBAL_MIGRATION support
Change-Id: Ibe9b353ce050b4718e07bccb958dbe3d2312e741 Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37045 Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
parent
c2a9c42670
commit
22be29e23b
|
@ -11,7 +11,6 @@
|
||||||
* GNU General Public License for more details.
|
* GNU General Public License for more details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <arch/early_variables.h>
|
|
||||||
#include <arch/io.h>
|
#include <arch/io.h>
|
||||||
#include <commonlib/helpers.h>
|
#include <commonlib/helpers.h>
|
||||||
#include <cpu/x86/tsc.h>
|
#include <cpu/x86/tsc.h>
|
||||||
|
@ -107,23 +106,19 @@ bad_ctc:
|
||||||
}
|
}
|
||||||
|
|
||||||
#if CONFIG(UNKNOWN_TSC_RATE)
|
#if CONFIG(UNKNOWN_TSC_RATE)
|
||||||
static u32 g_timer_tsc CAR_GLOBAL;
|
static u32 g_timer_tsc;
|
||||||
|
|
||||||
unsigned long tsc_freq_mhz(void)
|
unsigned long tsc_freq_mhz(void)
|
||||||
{
|
{
|
||||||
u32 tsc;
|
if (g_timer_tsc > 0)
|
||||||
|
return g_timer_tsc;
|
||||||
|
|
||||||
tsc = car_get_var(g_timer_tsc);
|
g_timer_tsc = calibrate_tsc_with_pit();
|
||||||
if (tsc > 0)
|
|
||||||
return tsc;
|
|
||||||
|
|
||||||
tsc = calibrate_tsc_with_pit();
|
|
||||||
|
|
||||||
/* Set some semi-ridiculous rate if approximation fails. */
|
/* Set some semi-ridiculous rate if approximation fails. */
|
||||||
if (tsc == 0)
|
if (g_timer_tsc == 0)
|
||||||
tsc = 5000;
|
g_timer_tsc = 5000;
|
||||||
|
|
||||||
car_set_var(g_timer_tsc, tsc);
|
return g_timer_tsc;
|
||||||
return tsc;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue