From aaec8095b92e315a0502a027879352517f72f329 Mon Sep 17 00:00:00 2001 From: Wonkyu Kim Date: Wed, 15 Sep 2021 15:52:51 -0700 Subject: soc/intel: Update api name for getting spi destination id Update api name and comments to be more generic as spi destination id is not DMI specific. Update api name as soc_get_spi_psf_destination_id and comments. And move PSF definition from pcr_ids.h as it's not pcr id. Signed-off-by: Wonkyu Kim Change-Id: Ie338d05649d23bddae5355dc6ce8440dfb183073 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58433 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak Reviewed-by: Jamie Ryu --- src/soc/intel/tigerlake/include/soc/pcr_ids.h | 9 --------- src/soc/intel/tigerlake/spi.c | 10 +++++++--- 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'src/soc/intel/tigerlake') diff --git a/src/soc/intel/tigerlake/include/soc/pcr_ids.h b/src/soc/intel/tigerlake/include/soc/pcr_ids.h index be5f1fb26b..22f08d73d1 100644 --- a/src/soc/intel/tigerlake/include/soc/pcr_ids.h +++ b/src/soc/intel/tigerlake/include/soc/pcr_ids.h @@ -39,13 +39,4 @@ #define PID_CPU_GPIOCOM4 0xb9 #define PID_CPU_GPIOCOM5 0xba -/* - * SPI - DMI Destination ID - */ -#if CONFIG(SOC_INTEL_TIGERLAKE_PCH_H) -#define SPI_DMI_DESTINATION_ID 0x23b0 -#else -#define SPI_DMI_DESTINATION_ID 0x23a8 -#endif - #endif diff --git a/src/soc/intel/tigerlake/spi.c b/src/soc/intel/tigerlake/spi.c index ef86feafbf..697128aaf2 100644 --- a/src/soc/intel/tigerlake/spi.c +++ b/src/soc/intel/tigerlake/spi.c @@ -9,7 +9,9 @@ #include #include #include -#include + +#define PSF_SPI_DESTINATION_ID_H 0x23b0 +#define PSF_SPI_DESTINATION_ID 0x23a8 int spi_soc_devfn_to_bus(unsigned int devfn) { @@ -26,7 +28,9 @@ int spi_soc_devfn_to_bus(unsigned int devfn) return -1; } -uint32_t soc_get_spi_dmi_destination_id(void) +uint32_t soc_get_spi_psf_destination_id(void) { - return SPI_DMI_DESTINATION_ID; + if (CONFIG(SOC_INTEL_TIGERLAKE_PCH_H)) + return PSF_SPI_DESTINATION_ID_H; + return PSF_SPI_DESTINATION_ID; } -- cgit v1.2.3