Tim Wawrzynczak has submitted this change. ( https://review.coreboot.org/c/coreboot/+/58433 )
Change subject: soc/intel: Update api name for getting spi destination id ......................................................................
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 wonkyu.kim@intel.com Change-Id: Ie338d05649d23bddae5355dc6ce8440dfb183073 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58433 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Tim Wawrzynczak twawrzynczak@chromium.org Reviewed-by: Jamie Ryu jamie.m.ryu@intel.com --- M src/soc/intel/alderlake/include/soc/pcr_ids.h M src/soc/intel/alderlake/spi.c M src/soc/intel/common/block/fast_spi/fast_spi.c M src/soc/intel/common/block/include/intelblocks/fast_spi.h M src/soc/intel/tigerlake/include/soc/pcr_ids.h M src/soc/intel/tigerlake/spi.c 6 files changed, 15 insertions(+), 24 deletions(-)
Approvals: build bot (Jenkins): Verified Tim Wawrzynczak: Looks good to me, approved Jamie Ryu: Looks good to me, but someone else must approve
diff --git a/src/soc/intel/alderlake/include/soc/pcr_ids.h b/src/soc/intel/alderlake/include/soc/pcr_ids.h index 9ea075a..f125ee2 100644 --- a/src/soc/intel/alderlake/include/soc/pcr_ids.h +++ b/src/soc/intel/alderlake/include/soc/pcr_ids.h @@ -40,9 +40,4 @@ #define PID_CPU_GPIOCOM4 0xb9 #define PID_CPU_GPIOCOM5 0xba
-/* - * SPI - DMI Destination ID - */ -#define SPI_DMI_DESTINATION_ID 0x23a8 - #endif diff --git a/src/soc/intel/alderlake/spi.c b/src/soc/intel/alderlake/spi.c index b02f2a2..d1ef6cd 100644 --- a/src/soc/intel/alderlake/spi.c +++ b/src/soc/intel/alderlake/spi.c @@ -9,7 +9,8 @@ #include <intelblocks/fast_spi.h> #include <intelblocks/spi.h> #include <soc/pci_devs.h> -#include <soc/pcr_ids.h> + +#define PSF_SPI_DESTINATION_ID 0x23a8
int spi_soc_devfn_to_bus(unsigned int devfn) { @@ -28,7 +29,7 @@ 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; + return PSF_SPI_DESTINATION_ID; } diff --git a/src/soc/intel/common/block/fast_spi/fast_spi.c b/src/soc/intel/common/block/fast_spi/fast_spi.c index 93de2ec..0e01231 100644 --- a/src/soc/intel/common/block/fast_spi/fast_spi.c +++ b/src/soc/intel/common/block/fast_spi/fast_spi.c @@ -325,9 +325,9 @@ "Only 32MiB windows are supported for extended BIOS!"); #endif
- /* Configure DMI Source decode for Extended BIOS Region */ + /* Configure Source decode for Extended BIOS Region */ if (dmi_enable_gpmr(CONFIG_EXT_BIOS_WIN_BASE, CONFIG_EXT_BIOS_WIN_SIZE, - soc_get_spi_dmi_destination_id()) == CB_ERR) + soc_get_spi_psf_destination_id()) == CB_ERR) return;
/* Program EXT_BIOS_BAR1 with obtained ext_bios_base */ diff --git a/src/soc/intel/common/block/include/intelblocks/fast_spi.h b/src/soc/intel/common/block/include/intelblocks/fast_spi.h index d5d3cd5..a903ea83 100644 --- a/src/soc/intel/common/block/include/intelblocks/fast_spi.h +++ b/src/soc/intel/common/block/include/intelblocks/fast_spi.h @@ -87,9 +87,9 @@ */ void fast_spi_get_ext_bios_window(uintptr_t *base, size_t *size); /* - * SOC function to get SPI-DMI Destination Id + * SOC function to get SPI PSF Destination Id */ -uint32_t soc_get_spi_dmi_destination_id(void); +uint32_t soc_get_spi_psf_destination_id(void); /* * Add MTRR for extended BIOS region(when supported) to postcar frame */ diff --git a/src/soc/intel/tigerlake/include/soc/pcr_ids.h b/src/soc/intel/tigerlake/include/soc/pcr_ids.h index be5f1fb..22f08d7 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 ef86fea..697128a 100644 --- a/src/soc/intel/tigerlake/spi.c +++ b/src/soc/intel/tigerlake/spi.c @@ -9,7 +9,9 @@ #include <intelblocks/spi.h> #include <intelblocks/fast_spi.h> #include <soc/pci_devs.h> -#include <soc/pcr_ids.h> + +#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 @@ 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; }
7 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one.