diff options
author | Nico Huber <nico.huber@secunet.com> | 2016-02-04 18:59:48 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-02-09 20:02:36 +0100 |
commit | 2dc15e9ea8522959e90def168e459e629ccec12f (patch) | |
tree | 575cb8f40c3cc4464f02bdb83c9acee7f0dcbba4 /src/northbridge/intel/sandybridge | |
parent | b27c24f69b89aca3203d56522663a546811cbfb8 (diff) |
Revert "northbridge/intel/peg: Disable unused ports"
This reverts commit 0e06f5bd70b45fd330d8dfb1dc77cce043caf841.
It breaks gm45 and also does some magic without being asked too. It
disables bridge devices permanently if no device was found on the se-
condary bus. In a simple notebook world this might be ok, but it breaks
hot-plugging and late detection (if a secondary bus device comes up too
slow for the firmware to detect and the OS has to enumerate it).
Change-Id: Ia2010640d7c55b0bdd44164b81c75dd4be50410b
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/13609
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Diffstat (limited to 'src/northbridge/intel/sandybridge')
-rw-r--r-- | src/northbridge/intel/sandybridge/northbridge.c | 26 |
1 files changed, 5 insertions, 21 deletions
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c index 3974fe895c..53d93a2501 100644 --- a/src/northbridge/intel/sandybridge/northbridge.c +++ b/src/northbridge/intel/sandybridge/northbridge.c @@ -368,17 +368,6 @@ static void northbridge_dmi_init(struct device *dev) DMIBAR32(0x88) = reg32; } -static u8 scan_bus_unused(struct bus *link) -{ - struct device *dev; - - for (dev = link->children; dev; dev = dev->sibling) { - if (dev->enabled) - return 0; - } - return 1; -} - /* Disable unused PEG devices based on devicetree */ static void disable_peg(void) { @@ -389,32 +378,27 @@ static void disable_peg(void) reg = pci_read_config32(dev, DEVEN); dev = dev_find_slot(0, PCI_DEVFN(1, 2)); - if (!dev || !dev->enabled || - (dev->link_list && scan_bus_unused(dev->link_list))) { + if (!dev || !dev->enabled) { printk(BIOS_DEBUG, "Disabling PEG12.\n"); reg &= ~DEVEN_PEG12; } dev = dev_find_slot(0, PCI_DEVFN(1, 1)); - if (!dev || !dev->enabled || - (dev->link_list && scan_bus_unused(dev->link_list))) { + if (!dev || !dev->enabled) { printk(BIOS_DEBUG, "Disabling PEG11.\n"); reg &= ~DEVEN_PEG11; } dev = dev_find_slot(0, PCI_DEVFN(1, 0)); - if (!dev || !dev->enabled || - (dev->link_list && scan_bus_unused(dev->link_list))) { + if (!dev || !dev->enabled) { printk(BIOS_DEBUG, "Disabling PEG10.\n"); reg &= ~DEVEN_PEG10; } dev = dev_find_slot(0, PCI_DEVFN(2, 0)); - if (!dev || !dev->enabled || - (dev->link_list && scan_bus_unused(dev->link_list))) { + if (!dev || !dev->enabled) { printk(BIOS_DEBUG, "Disabling IGD.\n"); reg &= ~DEVEN_IGD; } dev = dev_find_slot(0, PCI_DEVFN(6, 0)); - if (!dev || !dev->enabled || - (dev->link_list && scan_bus_unused(dev->link_list))) { + if (!dev || !dev->enabled) { printk(BIOS_DEBUG, "Disabling PEG60.\n"); reg &= ~DEVEN_PEG60; } |