From 23a398e001b55950f7759aa7ffa2ec966e2ea917 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Thu, 23 Mar 2023 23:44:03 +0100 Subject: soc/amd: introduce and use get_uvolts_from_vid for SVI2 and SVI3 Instead of implementing the conversion from the raw serial voltage ID value to the voltage in microvolts in every SoC, introduce the SOC_AMD_COMMON_BLOCK_SVI[2,3] Kconfig options for the SoC to select the correct version, implement get_uvolts_from_vid for both cases and only include the selected implementation in the build. Signed-off-by: Felix Held Change-Id: I344641217e6e4654fd281d434b88e346e0482f57 Reviewed-on: https://review.coreboot.org/c/coreboot/+/73995 Reviewed-by: Fred Reitberger Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/soc/amd/common/block/include/amdblocks/cpu.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/soc/amd/common/block/include') diff --git a/src/soc/amd/common/block/include/amdblocks/cpu.h b/src/soc/amd/common/block/include/amdblocks/cpu.h index 3501b22104..cbce028631 100644 --- a/src/soc/amd/common/block/include/amdblocks/cpu.h +++ b/src/soc/amd/common/block/include/amdblocks/cpu.h @@ -16,6 +16,7 @@ void write_resume_eip(void); union pstate_msr; /* proper definition is in soc/msr.h */ +uint32_t get_uvolts_from_vid(uint16_t core_vid); uint32_t get_pstate_core_freq(union pstate_msr pstate_reg); uint32_t get_pstate_core_power(union pstate_msr pstate_reg); const acpi_cstate_t *get_cstate_config_data(size_t *size); -- cgit v1.2.3