aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/gm45/northbridge.c
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2016-02-04 18:59:48 +0100
committerMartin Roth <martinroth@google.com>2016-02-09 20:02:36 +0100
commit2dc15e9ea8522959e90def168e459e629ccec12f (patch)
tree575cb8f40c3cc4464f02bdb83c9acee7f0dcbba4 /src/northbridge/intel/gm45/northbridge.c
parentb27c24f69b89aca3203d56522663a546811cbfb8 (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/gm45/northbridge.c')
-rw-r--r--src/northbridge/intel/gm45/northbridge.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c
index 84df62dd32..ce75aea442 100644
--- a/src/northbridge/intel/gm45/northbridge.c
+++ b/src/northbridge/intel/gm45/northbridge.c
@@ -243,17 +243,6 @@ static void enable_dev(device_t dev)
}
}
-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;
-}
-
static void gm45_init(void *const chip_info)
{
int dev, fn, bit_base;
@@ -279,8 +268,7 @@ static void gm45_init(void *const chip_info)
for (; fn >= 0; --fn) {
const struct device *const d =
dev_find_slot(0, PCI_DEVFN(dev, fn));
- if (d && d->enabled && d->link_list && !scan_bus_unused(d->link_list))
- continue;
+ if (!d || d->enabled) continue;
const u32 deven = pci_read_config32(d0f0, D0F0_DEVEN);
pci_write_config32(d0f0, D0F0_DEVEN,
deven & ~(1 << (bit_base + fn)));