soc/intel/apollolake: Add config for cpu base clock frequency
Add config for cpu base clock frequency(Mhz), use and clean up code. Change-Id: I724c48c11796aa942295d4f19cc629d4c13647e1 Signed-off-by: Aamir Bohra <aamir.bohra@intel.com> Reviewed-on: https://review.coreboot.org/20017 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
1041d399cb
commit
22b2c793e3
|
@ -322,4 +322,8 @@ config IFD_CHIPSET
|
|||
string
|
||||
default "aplk"
|
||||
|
||||
config CPU_BCLK_MHZ
|
||||
int
|
||||
default 100
|
||||
|
||||
endif
|
||||
|
|
|
@ -32,8 +32,6 @@ void enable_untrusted_mode(void);
|
|||
#define CPUID_APOLLOLAKE_A0 0x506c8
|
||||
#define CPUID_APOLLOLAKE_B0 0x506c9
|
||||
|
||||
#define BASE_CLOCK_MHZ 100
|
||||
|
||||
/* Common Timer Copy (CTC) frequency - 19.2MHz. */
|
||||
#define CTC_FREQ 19200000
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@
|
|||
unsigned long tsc_freq_mhz(void)
|
||||
{
|
||||
msr_t msr = rdmsr(MSR_PLATFORM_INFO);
|
||||
return (BASE_CLOCK_MHZ * ((msr.lo >> 8) & 0xff));
|
||||
return (CONFIG_CPU_BCLK_MHZ * ((msr.lo >> 8) & 0xff));
|
||||
}
|
||||
|
||||
void set_max_freq(void)
|
||||
|
|
Loading…
Reference in New Issue