summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/devices/pci_device.c18
-rw-r--r--src/include/device/pci.h3
-rw-r--r--src/southbridge/intel/i82801gx/pci.c8
3 files changed, 21 insertions, 8 deletions
diff --git a/src/devices/pci_device.c b/src/devices/pci_device.c
index 0b39faa8b2..b6a8078be7 100644
--- a/src/devices/pci_device.c
+++ b/src/devices/pci_device.c
@@ -586,6 +586,16 @@ void pci_dev_set_resources(struct device *dev)
pci_write_config8(dev, PCI_CACHE_LINE_SIZE, 64 >> 2);
}
+unsigned __attribute__((weak)) mainboard_pci_subsystem_vendor_id(__attribute__((unused)) struct device *dev)
+{
+ return CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID;
+}
+
+unsigned __attribute__((weak)) mainboard_pci_subsystem_device_id(__attribute__((unused)) struct device *dev)
+{
+ return CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID;
+}
+
void pci_dev_enable_resources(struct device *dev)
{
const struct pci_operations *ops;
@@ -595,11 +605,11 @@ void pci_dev_enable_resources(struct device *dev)
ops = ops_pci(dev);
if (dev->on_mainboard && ops && ops->set_subsystem) {
printk(BIOS_DEBUG, "%s subsystem <- %02x/%02x\n", dev_path(dev),
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
+ mainboard_pci_subsystem_vendor_id(dev),
+ mainboard_pci_subsystem_device_id(dev));
ops->set_subsystem(dev,
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
+ mainboard_pci_subsystem_vendor_id(dev),
+ mainboard_pci_subsystem_device_id(dev));
}
command = pci_read_config16(dev, PCI_COMMAND);
command |= dev->command;
diff --git a/src/include/device/pci.h b/src/include/device/pci.h
index 6af723d745..d4cfb8558c 100644
--- a/src/include/device/pci.h
+++ b/src/include/device/pci.h
@@ -103,4 +103,7 @@ static inline const struct pci_bus_operations *ops_pci_bus(struct bus *bus)
return bops;
}
+unsigned mainboard_pci_subsystem_vendor_id(struct device *dev);
+unsigned mainboard_pci_subsystem_device_id(struct device *dev);
+
#endif /* PCI_H */
diff --git a/src/southbridge/intel/i82801gx/pci.c b/src/southbridge/intel/i82801gx/pci.c
index 4c44e1e153..a8e8988d57 100644
--- a/src/southbridge/intel/i82801gx/pci.c
+++ b/src/southbridge/intel/i82801gx/pci.c
@@ -73,11 +73,11 @@ static void ich_pci_dev_enable_resources(struct device *dev)
if (dev->on_mainboard && ops && ops->set_subsystem) {
printk(BIOS_DEBUG, "%s subsystem <- %02x/%02x\n",
dev_path(dev),
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
+ mainboard_pci_subsystem_vendor_id(dev),
+ mainboard_pci_subsystem_device_id(dev));
ops->set_subsystem(dev,
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_VENDOR_ID,
- CONFIG_MAINBOARD_PCI_SUBSYSTEM_DEVICE_ID);
+ mainboard_pci_subsystem_vendor_id(dev),
+ mainboard_pci_subsystem_device_id(dev));
}
command = pci_read_config16(dev, PCI_COMMAND);