summaryrefslogtreecommitdiffstats
path: root/src/include/device
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-07-04 17:17:45 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2013-07-25 11:35:58 +0200
commitaad0747216cab56a8cee5c1401c094543ed8be2d (patch)
tree854c8adaafde2becb7bb441f161fe8c0716397a0 /src/include/device
parent026ff3e436799b54daec8805dc574146793f4903 (diff)
downloadcoreboot-aad0747216cab56a8cee5c1401c094543ed8be2d.tar.gz
coreboot-aad0747216cab56a8cee5c1401c094543ed8be2d.tar.bz2
coreboot-aad0747216cab56a8cee5c1401c094543ed8be2d.zip
Redefine pci_bus_default_ops as function
Taking device_t as a parameter, this allows to alter the PCI config access handlers. This is useful to add tracing of PCI config writes for devices having problems to initialise correctly. On older AMD platform PCI MMIO may not be able to fully configure all PCI devices/nodes, while MMIO_SUPPORT_DEFAULT would be preferred due to its atomic nature. So those can be forced to IO config instead. Change-Id: I2162884185bbfe461b036caf737980b45a51e522 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/3608 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com>
Diffstat (limited to 'src/include/device')
-rw-r--r--src/include/device/device.h2
-rw-r--r--src/include/device/pci.h12
2 files changed, 1 insertions, 13 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 9defb19d8312..1eff4a29c645 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -42,7 +42,7 @@ struct device_operations {
#endif
const struct pci_operations *ops_pci;
const struct smbus_bus_operations *ops_smbus_bus;
- const struct pci_bus_operations *ops_pci_bus;
+ const struct pci_bus_operations * (*ops_pci_bus)(device_t dev);
const struct pnp_mode_ops *ops_pnp_mode;
};
#endif
diff --git a/src/include/device/pci.h b/src/include/device/pci.h
index 1f47dafeca7c..2dea1cf088dd 100644
--- a/src/include/device/pci.h
+++ b/src/include/device/pci.h
@@ -94,17 +94,5 @@ static inline const struct pci_operations *ops_pci(device_t dev)
return pops;
}
-static inline const struct pci_bus_operations *ops_pci_bus(struct bus *bus)
-{
- const struct pci_bus_operations *bops;
- bops = 0;
- if (bus && bus->dev && bus->dev->ops) {
- bops = bus->dev->ops->ops_pci_bus;
- }
- if (!bops)
- bops = pci_config_default();
- return bops;
-}
-
#endif
#endif /* PCI_H */