diff options
author | Patrick Rudolph <patrick.rudolph@9elements.com> | 2024-10-23 18:52:35 +0200 |
---|---|---|
committer | Lean Sheng Tan <sheng.tan@9elements.com> | 2024-11-16 20:19:34 +0000 |
commit | 5004c78ef71ce94f53c9c7ddc18f073348f4b324 (patch) | |
tree | b554607b0d0e3154e6ac89293281a3df0e62e6d8 /src/soc | |
parent | 69a65752a71c44e750638b49c8e067a74c84f8f9 (diff) |
soc/intel/xeon_sp/skx: Use Kconfig symbol
Use Kconfig symbol CPU_BCLK_MHZ as done on CPX.
Reduced code differences between SKX and CPX and will allow to
merge the codebase into one.
Change-Id: I8a0a51d4280e4370e0e8695f8b9d8f2ed943d9e4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Diffstat (limited to 'src/soc')
-rw-r--r-- | src/soc/intel/xeon_sp/skx/Kconfig | 4 | ||||
-rw-r--r-- | src/soc/intel/xeon_sp/skx/cpu.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/soc/intel/xeon_sp/skx/Kconfig b/src/soc/intel/xeon_sp/skx/Kconfig index 25e35bda35..1783c66b6f 100644 --- a/src/soc/intel/xeon_sp/skx/Kconfig +++ b/src/soc/intel/xeon_sp/skx/Kconfig @@ -25,6 +25,10 @@ config MAX_CPUS int default 80 +config CPU_BCLK_MHZ + int + default 100 + config PCR_BASE_ADDRESS hex default 0xfd000000 diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c index 113c6301c3..119041605e 100644 --- a/src/soc/intel/xeon_sp/skx/cpu.c +++ b/src/soc/intel/xeon_sp/skx/cpu.c @@ -165,8 +165,6 @@ static const struct cpu_driver driver __cpu_driver = { .id_table = cpu_table, }; -#define CPU_BCLK 100 - static void set_max_turbo_freq(void) { msr_t msr, perf_ctl; @@ -190,7 +188,7 @@ static void set_max_turbo_freq(void) wrmsr(IA32_PERF_CTL, perf_ctl); printk(BIOS_DEBUG, "cpu: frequency set to %d\n", - ((perf_ctl.lo >> 8) & 0xff) * CPU_BCLK); + ((perf_ctl.lo >> 8) & 0xff) * CONFIG_CPU_BCLK_MHZ); FUNC_EXIT(); } |