summaryrefslogtreecommitdiffstats
path: root/src/southbridge/intel/i82801gx
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-03-20 17:55:27 +0200
committerPatrick Georgi <pgeorgi@google.com>2019-03-25 10:59:11 +0000
commitdbd313280abce8ff365b248f57129758f2909ea7 (patch)
tree695a3ceff3df81e51451d83b268362ae6138e096 /src/southbridge/intel/i82801gx
parent4074ce0cc716d4fc5447868ce0981c92e84f31b5 (diff)
downloadcoreboot-dbd313280abce8ff365b248f57129758f2909ea7.tar.gz
coreboot-dbd313280abce8ff365b248f57129758f2909ea7.tar.bz2
coreboot-dbd313280abce8ff365b248f57129758f2909ea7.zip
sb/intel/{i82801g/i/j,bd82x6x}: Make use of generic set_subsystem()
Change-Id: Ia7a3eb2e29eb245c0e70abc23c2139aebc07cbfe Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31987 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'src/southbridge/intel/i82801gx')
-rw-r--r--src/southbridge/intel/i82801gx/pci.c26
1 files changed, 1 insertions, 25 deletions
diff --git a/src/southbridge/intel/i82801gx/pci.c b/src/southbridge/intel/i82801gx/pci.c
index 514db3cd6454..c54769fff3dd 100644
--- a/src/southbridge/intel/i82801gx/pci.c
+++ b/src/southbridge/intel/i82801gx/pci.c
@@ -61,19 +61,8 @@ static void pci_init(struct device *dev)
static void ich_pci_dev_enable_resources(struct device *dev)
{
- const struct pci_operations *ops;
uint16_t command;
- /* Set the subsystem vendor and device id for mainboard devices */
- ops = ops_pci(dev);
- if (dev->on_mainboard && ops && ops->set_subsystem) {
- printk(BIOS_DEBUG, "%s subsystem <- %04x/%04x\n",
- dev_path(dev), dev->subsystem_vendor,
- dev->subsystem_device);
- ops->set_subsystem(dev, dev->subsystem_vendor,
- dev->subsystem_device);
- }
-
command = pci_read_config16(dev, PCI_COMMAND);
command |= dev->command;
printk(BIOS_DEBUG, "%s cmd <- %02x\n", dev_path(dev), command);
@@ -98,21 +87,8 @@ static void ich_pci_bus_enable_resources(struct device *dev)
ich_pci_dev_enable_resources(dev);
}
-static void set_subsystem(struct device *dev, unsigned int vendor,
- unsigned int device)
-{
- /* NOTE: This is not the default position! */
- if (!vendor || !device) {
- pci_write_config32(dev, 0x54,
- pci_read_config32(dev, PCI_VENDOR_ID));
- } else {
- pci_write_config32(dev, 0x54,
- ((device & 0xffff) << 16) | (vendor & 0xffff));
- }
-}
-
static struct pci_operations pci_ops = {
- .set_subsystem = set_subsystem,
+ .set_subsystem = pci_dev_set_subsystem,
};
static struct device_operations device_ops = {