Kyösti Mälkki (kyosti.malkki@gmail.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8542
-gerrit
commit 9943a39a54c96a7752d7cc2af2e6675d7a86001a Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Feb 27 17:24:00 2015 +0200
devicetree: Remove dev_find_slot() implementation in romstage
PCI tree has not been enumerated yet in romstage, so all bridge devices found in the static devicetree have their secondary bus number initialized to 0.
Change-Id: Ib797210102c942bad3549b756ab0ebe5870b3ce4 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/device/device_romstage.c | 24 ------------------------ src/include/device/device.h | 2 -- 2 files changed, 26 deletions(-)
diff --git a/src/device/device_romstage.c b/src/device/device_romstage.c index df0df6a..b28dedf 100644 --- a/src/device/device_romstage.c +++ b/src/device/device_romstage.c @@ -31,30 +31,6 @@ ROMSTAGE_CONST struct device * ROMSTAGE_CONST all_devices = &dev_root;
/** - * Given a PCI bus and a devfn number, find the device structure. - * - * @param bus The bus number. - * @param devfn A device/function number. - * @return Pointer to the device structure (if found), 0 otherwise. - */ -ROMSTAGE_CONST struct device *dev_find_slot(unsigned int bus, - unsigned int devfn) -{ - ROMSTAGE_CONST struct device *dev, *result; - - result = 0; - for (dev = all_devices; dev; dev = dev->next) { - if ((dev->path.type == DEVICE_PATH_PCI) && - (dev->bus->secondary == bus) && - (dev->path.pci.devfn == devfn)) { - result = dev; - break; - } - } - return result; -} - -/** * Given a device pointer, find the next PCI device. * * @param previous_dev A pointer to a PCI device structure. diff --git a/src/include/device/device.h b/src/include/device/device.h index a09413f..0ead7e2 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -258,8 +258,6 @@ u32 find_pci_tolm(struct bus *bus);
#else /* vv __SIMPLE_DEVICE__ vv */
-ROMSTAGE_CONST struct device * dev_find_slot (unsigned int bus, - unsigned int devfn); ROMSTAGE_CONST struct device *dev_find_next_pci_device( ROMSTAGE_CONST struct device *previous_dev); ROMSTAGE_CONST struct device * dev_find_slot_on_smbus (unsigned int bus,