From 5004c78ef71ce94f53c9c7ddc18f073348f4b324 Mon Sep 17 00:00:00 2001 From: Patrick Rudolph Date: Wed, 23 Oct 2024 18:52:35 +0200 Subject: 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/84847 Tested-by: build bot (Jenkins) Reviewed-by: Shuo Liu --- src/soc/intel/xeon_sp/skx/Kconfig | 4 ++++ src/soc/intel/xeon_sp/skx/cpu.c | 4 +--- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'src/soc') 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(); } -- cgit v1.2.3