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/8544
-gerrit
commit e3fa743a4668ffb9fbb421109163326ab18071d7 Author: Kyösti Mälkki kyosti.malkki@gmail.com Date: Fri Feb 20 20:19:16 2015 +0200
devicetree: Extend scans to all bridge devices
When PCI bridge or PCI-e rootport is disabled in devicetree, it still must be configured if it cannot be hidden.
For purposes of power-management it may be necessary to enable bridge to put devices on secondary side, before disabling the bridge itself.
Change-Id: I710a95fd35543bc4e671c9ac18d7ce22c4df2476 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- src/device/device.c | 3 --- src/device/pci_device.c | 3 +++ src/device/root_device.c | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/src/device/device.c b/src/device/device.c index 832b3a1..42c1080 100644 --- a/src/device/device.c +++ b/src/device/device.c @@ -913,9 +913,6 @@ static void scan_bus(struct device *busdev) { int do_scan_bus;
- if (!busdev->enabled) - return; - printk(BIOS_SPEW, "%s scanning...\n", dev_path(busdev));
post_log_path(busdev); diff --git a/src/device/pci_device.c b/src/device/pci_device.c index c505517..86105e2 100644 --- a/src/device/pci_device.c +++ b/src/device/pci_device.c @@ -1224,6 +1224,9 @@ void do_pci_scan_bridge(struct device *dev, { struct bus *bus;
+ if (!dev->enabled) + return; + printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(dev));
if (dev->link_list == NULL) { diff --git a/src/device/root_device.c b/src/device/root_device.c index a5ecf0e..2620a6c 100644 --- a/src/device/root_device.c +++ b/src/device/root_device.c @@ -69,6 +69,11 @@ static void scan_static_bus(device_t bus)
void int scan_lpc_bus(device_t bus) { + struct bus *link; + + if (!bus->enabled) + return; + printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
scan_static_bus(bus); @@ -81,6 +86,9 @@ void scan_smbus(device_t bus) device_t child; struct bus *link;
+ if (!bus->enabled) + return; + printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
max = scan_static_bus(bus, max);