{northbridge, soc, southbridge}/intel: Make use of generic set_subsystem()
This patch removes all local definitions of sub_system functions and make
use of common generic pci_dev_set_subsystem() from PCI bridge and Cardbus
devices as well.
Change-Id: I5fbed39ed448baf11f0e0786ce0ee94741d57237
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/31950
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
diff --git a/src/northbridge/intel/sandybridge/pcie.c b/src/northbridge/intel/sandybridge/pcie.c
index 16bc314..344cd80 100644
--- a/src/northbridge/intel/sandybridge/pcie.c
+++ b/src/northbridge/intel/sandybridge/pcie.c
@@ -65,20 +65,8 @@
}
#endif
-static void
-pcie_set_subsystem(struct device *dev, unsigned int ven, unsigned int device)
-{
- /* NOTE: This is not the default position! */
- if (!ven || !device)
- pci_write_config32(dev, 0x94,
- pci_read_config32(dev, 0));
- else
- pci_write_config32(dev, 0x94,
- ((device & 0xffff) << 16) | (ven & 0xffff));
-}
-
static struct pci_operations pci_ops = {
- .set_subsystem = pcie_set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations device_ops = {