soc/intel/skylake: 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

Change-Id: Ib7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91321
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 10:44:18 -08:00 committed by Matt DeVillier
commit 0668959a92
4 changed files with 2 additions and 19 deletions

View file

@ -59,6 +59,7 @@ config SOC_INTEL_COMMON_SKYLAKE_BASE
select SOC_INTEL_COMMON_BLOCK_UART
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

View file

@ -11,19 +11,16 @@ bootblock-y += bootblock/bootblock.c
bootblock-y += bootblock/pch.c
bootblock-y += bootblock/report_platform.c
bootblock-y += gpio.c
bootblock-y += gspi.c
bootblock-y += p2sb.c
bootblock-y += pmutil.c
bootblock-y += spi.c
bootblock-y += lpc.c
verstage-y += gpio.c
verstage-y += gspi.c
verstage-y += pmutil.c
verstage-y += spi.c
romstage-y += gpio.c
romstage-y += gspi.c
romstage-y += me.c
romstage-y += pcie_rp.c
romstage-y += pmutil.c
@ -37,7 +34,6 @@ ramstage-y += elog.c
ramstage-y += fadt.c
ramstage-y += finalize.c
ramstage-y += gpio.c
ramstage-y += gspi.c
ramstage-y += graphics.c
ramstage-y += irq.c
ramstage-y += lockdown.c
@ -61,7 +57,6 @@ smm-y += pmutil.c
smm-y += smihandler.c
smm-y += xhci.c
postcar-y += gspi.c
postcar-y += spi.c
ifeq ($(CONFIG_SKYLAKE_SOC_PCH_H),y)

View file

@ -1,14 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <intelblocks/gspi.h>
#include <soc/pci_devs.h>
int gspi_soc_bus_to_devfn(unsigned int gspi_bus)
{
switch (gspi_bus) {
case 0:
return PCH_DEVFN_GSPI0;
case 1:
return PCH_DEVFN_GSPI1;
}
return -1;
}

View file

@ -191,6 +191,7 @@
#define PCI_DEVFN_UART0 PCH_DEVFN_UART0
#define PCI_DEVFN_UART1 PCH_DEVFN_UART1
#define PCI_DEVFN_UART2 PCH_DEVFN_UART2
#define SOC_GSPI_DEVFN(n) PCH_DEVFN_GSPI##n
#endif