soc/intel/meteorlake: Use common SPI device function driver

Switch to the common SPI device function driver implementation. This
eliminates platform-specific SPI code by leveraging the common driver
with platform-specific Kconfig and macros.

This commit:
- Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN and
  SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF in Kconfig
- Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=3
- Adds CONFIG_SOC_INTEL_SPI_PSF_DESTINATION_ID=0x5140
- Removes src/soc/intel/meteorlake/spi.c
- Updates Makefile.mk to remove spi.c compilation

The common code uses SOC_GSPI_DEVFN(n) macro directly.

Change-Id: I6ac7bdf4c9eeaab2d0d0ecbe8cd2ea2bf7f9ea19
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91327
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
This commit is contained in:
Jeremy Compostella 2026-02-25 11:00:08 -08:00 committed by Matt DeVillier
commit 4bdeb73635
3 changed files with 10 additions and 26 deletions

View file

@ -88,6 +88,8 @@ config SOC_INTEL_METEORLAKE
select SOC_INTEL_COMMON_BLOCK_XHCI_ELOG
select SOC_INTEL_COMMON_FEATURE
select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN
select SOC_INTEL_COMMON_FEATURE_SPI_DEVFN
select SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF
select SOC_INTEL_COMMON_FEATURE_I2C_DEVFN
select SOC_INTEL_COMMON_FEATURE_UART_DEVICES
select SOC_INTEL_COMMON_BASECODE
@ -478,4 +480,12 @@ config SKIP_SEND_CONNECT_TOPOLOGY_CMD
config TME_KEY_REGENERATION_ON_WARM_BOOT
default y if INTEL_TME
config SOC_INTEL_SPI_DEV_MAX
int
default 3
config SOC_INTEL_SPI_PSF_DESTINATION_ID
hex
default 0x5140
endif

View file

@ -7,7 +7,6 @@ subdirs-y += ../../../cpu/intel/turbo
# all (bootblock, verstage, romstage, postcar, ramstage)
all-y += pmutil.c
all-y += spi.c
all-y += gpio.c
bootblock-y += bootblock/bootblock.c

View file

@ -1,25 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <intelblocks/fast_spi.h>
#include <intelblocks/spi.h>
#include <soc/pci_devs.h>
#define PSF_SPI_DESTINATION_ID 0x5140
int spi_soc_devfn_to_bus(unsigned int devfn)
{
switch (devfn) {
case PCI_DEVFN_GSPI0:
return 1;
case PCI_DEVFN_GSPI1:
return 2;
case PCI_DEVFN_GSPI2:
return 3;
}
return -1;
}
uint32_t soc_get_spi_psf_destination_id(void)
{
return PSF_SPI_DESTINATION_ID;
}