From b4b4d6c730711880f29d3c0467d99c18ad7ccc8e Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sun, 25 Jan 2026 21:07:41 -0600 Subject: [PATCH] soc/intel: Use chipset.cb for SDXC device ops linking Move SDXC device operations linking from PCI Device ID matching to chipset.cb files for all Intel SoCs that have them, matching the approach used by Skylake. Remove corresponding DIDs from sd.c for these SoCs; keep DID matching only for SoCs without chipset.cb files. This standardizes the approach across Intel SoCs and makes the SDXC controller configuration explicit in devicetree, and prevents the endless proliferation of DIDs in the common driver code. Change-Id: Ifee16988d0e5625a7b3c2be51ab70d2c8471747a Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/90923 Tested-by: build bot (Jenkins) Reviewed-by: Jakub "Kuba" Czapiga --- src/soc/intel/apollolake/chipset_apl.cb | 2 +- src/soc/intel/cannonlake/chipset.cb | 2 +- src/soc/intel/cannonlake/chipset_pch_h.cb | 2 +- src/soc/intel/common/block/scs/sd.c | 6 ------ src/soc/intel/jasperlake/chipset.cb | 2 +- 5 files changed, 4 insertions(+), 10 deletions(-) diff --git a/src/soc/intel/apollolake/chipset_apl.cb b/src/soc/intel/apollolake/chipset_apl.cb index f8bb1b0fd5..fc2ec2822d 100644 --- a/src/soc/intel/apollolake/chipset_apl.cb +++ b/src/soc/intel/apollolake/chipset_apl.cb @@ -40,7 +40,7 @@ chip soc/intel/apollolake device pci 19.1 alias spi1 off ops spi_dev_ops end # SPI1 device pci 19.2 alias spi2 off ops spi_dev_ops end # SPI3 device pci 1a.0 alias pwm off end # PWM - device pci 1b.0 alias sdcard off end # SD Card + device pci 1b.0 alias sdcard off ops sd_ops end # SD Card device pci 1c.0 alias emmc off end # eMMC device pci 1e.0 alias sdio off end # SDIO device pci 1f.0 alias lpc_espi on end # LPC diff --git a/src/soc/intel/cannonlake/chipset.cb b/src/soc/intel/cannonlake/chipset.cb index fafb02bf50..ff68963c3e 100644 --- a/src/soc/intel/cannonlake/chipset.cb +++ b/src/soc/intel/cannonlake/chipset.cb @@ -81,7 +81,7 @@ chip soc/intel/cannonlake device pci 14.1 alias xdci off ops usb_xdci_ops end # USB xDCI (OTG) device pci 14.2 alias shared_sram off end # Shared SRAM device pci 14.3 alias cnvi_wifi off ops cnvi_wifi_ops end # CNVi Wifi - device pci 14.5 alias sdxc off end # SDCard + device pci 14.5 alias sdxc off ops sd_ops end # SDCard device pci 15.0 alias i2c0 off ops i2c_dev_ops end # I2C #0 device pci 15.1 alias i2c1 off ops i2c_dev_ops end # I2C #1 device pci 15.2 alias i2c2 off ops i2c_dev_ops end # I2C #2 diff --git a/src/soc/intel/cannonlake/chipset_pch_h.cb b/src/soc/intel/cannonlake/chipset_pch_h.cb index 2ce5269274..de36773c50 100644 --- a/src/soc/intel/cannonlake/chipset_pch_h.cb +++ b/src/soc/intel/cannonlake/chipset_pch_h.cb @@ -105,7 +105,7 @@ chip soc/intel/cannonlake device pci 14.1 alias xdci off ops usb_xdci_ops end # USB xDCI (OTG) device pci 14.2 alias shared_sram off end # Shared SRAM device pci 14.3 alias cnvi_wifi off ops cnvi_wifi_ops end # CNVi Wifi - device pci 14.5 alias sdxc off end # SDCard + device pci 14.5 alias sdxc off ops sd_ops end # SDCard device pci 15.0 alias i2c0 off ops i2c_dev_ops end # I2C #0 device pci 15.1 alias i2c1 off ops i2c_dev_ops end # I2C #1 device pci 15.2 alias i2c2 off ops i2c_dev_ops end # I2C #2 diff --git a/src/soc/intel/common/block/scs/sd.c b/src/soc/intel/common/block/scs/sd.c index eee02009f1..84eac7ef75 100644 --- a/src/soc/intel/common/block/scs/sd.c +++ b/src/soc/intel/common/block/scs/sd.c @@ -49,14 +49,8 @@ struct device_operations sd_ops = { }; static const unsigned short pci_device_ids[] = { - PCI_DID_INTEL_APL_SD, - PCI_DID_INTEL_CNL_SD, PCI_DID_INTEL_GLK_SD, - PCI_DID_INTEL_CNP_H_SD, - PCI_DID_INTEL_CMP_SD, - PCI_DID_INTEL_CMP_H_SD, PCI_DID_INTEL_MCC_SD, - PCI_DID_INTEL_JSP_SD, 0 }; diff --git a/src/soc/intel/jasperlake/chipset.cb b/src/soc/intel/jasperlake/chipset.cb index 278ba50050..cbd5d2efc9 100644 --- a/src/soc/intel/jasperlake/chipset.cb +++ b/src/soc/intel/jasperlake/chipset.cb @@ -64,7 +64,7 @@ chip soc/intel/jasperlake device pci 14.1 alias south_xdci off ops usb_xdci_ops end device pci 14.2 alias shared_ram off end device pci 14.3 alias cnvi_wifi off ops cnvi_wifi_ops end - device pci 14.5 alias sdxc off end + device pci 14.5 alias sdxc off ops sd_ops end device pci 15.0 alias i2c0 off ops i2c_dev_ops end device pci 15.1 alias i2c1 off ops i2c_dev_ops end device pci 15.2 alias i2c2 off ops i2c_dev_ops end