From 3c92c8402acf163379ddd0ec91d4a9bb39d41f9d Mon Sep 17 00:00:00 2001 From: Jeremy Compostella Date: Wed, 25 Feb 2026 10:44:17 -0800 Subject: [PATCH] soc/intel/pantherlake: Use common GSPI devfn mapping Replace platform-specific gspi.c with the common GSPI device function mapping implementation. Changes: - Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig - Define SOC_GSPI_DEVFN(n) macro in pci_devs.h - Remove platform-specific gspi.c file TEST=Panther Lake Fatcat OS boots properly Change-Id: Ic3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2 Signed-off-by: Jeremy Compostella Reviewed-on: https://review.coreboot.org/c/coreboot/+/91316 Reviewed-by: Matt DeVillier Tested-by: build bot (Jenkins) --- src/soc/intel/pantherlake/Kconfig | 1 + src/soc/intel/pantherlake/Makefile.mk | 1 - src/soc/intel/pantherlake/gspi.c | 17 ----------------- .../intel/pantherlake/include/soc/pci_devs.h | 1 + 4 files changed, 2 insertions(+), 18 deletions(-) delete mode 100644 src/soc/intel/pantherlake/gspi.c diff --git a/src/soc/intel/pantherlake/Kconfig b/src/soc/intel/pantherlake/Kconfig index 2e1bc2ef10..133a0b8684 100644 --- a/src/soc/intel/pantherlake/Kconfig +++ b/src/soc/intel/pantherlake/Kconfig @@ -97,6 +97,7 @@ config SOC_INTEL_PANTHERLAKE_BASE select SOC_INTEL_COMMON_BLOCK_XHCI select SOC_INTEL_COMMON_BLOCK_XHCI_ELOG select SOC_INTEL_COMMON_FEATURE + select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN select SOC_INTEL_COMMON_FEATURE_I2C_DEVFN select SOC_INTEL_COMMON_FEATURE_UART_DEVICES select SOC_INTEL_COMMON_FSP_RESET diff --git a/src/soc/intel/pantherlake/Makefile.mk b/src/soc/intel/pantherlake/Makefile.mk index dadba99ccd..5f956db228 100644 --- a/src/soc/intel/pantherlake/Makefile.mk +++ b/src/soc/intel/pantherlake/Makefile.mk @@ -7,7 +7,6 @@ subdirs-y += ../../../cpu/intel/microcode subdirs-y += ../../../cpu/intel/turbo # all (bootblock, verstage, romstage, postcar, ramstage) -all-y += gspi.c all-y += pmutil.c all-y += spi.c all-y += gpio.c diff --git a/src/soc/intel/pantherlake/gspi.c b/src/soc/intel/pantherlake/gspi.c deleted file mode 100644 index 387d3e3949..0000000000 --- a/src/soc/intel/pantherlake/gspi.c +++ /dev/null @@ -1,17 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-or-later */ - -#include -#include - -int gspi_soc_bus_to_devfn(unsigned int gspi_bus) -{ - switch (gspi_bus) { - case 0: - return PCI_DEVFN_GSPI0; - case 1: - return PCI_DEVFN_GSPI1; - case 2: - return PCI_DEVFN_GSPI2; - } - return -1; -} diff --git a/src/soc/intel/pantherlake/include/soc/pci_devs.h b/src/soc/intel/pantherlake/include/soc/pci_devs.h index a1ef4f4c32..3a41280a26 100644 --- a/src/soc/intel/pantherlake/include/soc/pci_devs.h +++ b/src/soc/intel/pantherlake/include/soc/pci_devs.h @@ -257,5 +257,6 @@ #define SA_DEV_IGD PCI_DEV_IGD #define SA_DEVFN_IGD PCI_DEVFN_IGD #define SOC_I2C_DEVFN(n) PCI_DEVFN_I2C##n +#define SOC_GSPI_DEVFN(n) PCI_DEVFN_GSPI##n #endif // _SOC_PANTHERLAKE_PCI_DEVS_H_