diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-03-12 05:56:22 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-06-04 11:18:04 +0200 |
commit | 6ccf119932661eaf63af0ee3a276a6d2f2f27b89 (patch) | |
tree | 8e2eeea6b26e096ad11f10bcb1780fd6a54776f8 /src/northbridge/amd/agesa/family15 | |
parent | b39714e5ee07deb36165d4c4f85b4b1effbd30c6 (diff) | |
download | coreboot-6ccf119932661eaf63af0ee3a276a6d2f2f27b89.tar.xz |
HyperTransport: Use subordinate property to track chain enumeration
For amdfam10, (ht_c_index > 3) never evaluates true as the code
already has a return for this case above.
Change-Id: Ie90941671e1b2b4f42e2b1b0641ca59334fcf0f1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8688
Tested-by: build bot (Jenkins)
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/northbridge/amd/agesa/family15')
-rw-r--r-- | src/northbridge/amd/agesa/family15/northbridge.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/northbridge/amd/agesa/family15/northbridge.c b/src/northbridge/amd/agesa/family15/northbridge.c index b2d8abd86c..a4f78f1e8b 100644 --- a/src/northbridge/amd/agesa/family15/northbridge.c +++ b/src/northbridge/amd/agesa/family15/northbridge.c @@ -459,12 +459,14 @@ static void nb_set_resources(device_t dev) } } -static unsigned scan_chains(device_t dev, unsigned max) +static unsigned scan_chains(device_t dev, unsigned unused) { unsigned nodeid; struct bus *link; device_t io_hub = NULL; u32 next_unitid = 0x18; + unsigned int max = dev->bus->subordinate; + nodeid = amdfam15_nodeid(dev); if (nodeid == 0) { for (link = dev->link_list; link; link = link->next) { @@ -479,7 +481,10 @@ static unsigned scan_chains(device_t dev, unsigned max) } } } - return max; + + dev->bus->subordinate = max; + + return unused; } @@ -948,8 +953,9 @@ static void domain_set_resources(device_t dev) /* all family15's pci devices are under 0x18.0, so we search from dev 0x18 fun 0 */ static unsigned int f15_pci_domain_scan_bus(device_t dev, unsigned int max) { - max = pci_scan_bus(dev->link_list, PCI_DEVFN(0x18, 0), 0xff, max); - return max; + struct bus *link = dev->link_list; + link->subordinate = pci_scan_bus(link, PCI_DEVFN(0x18, 0), 0xff, link->secondary); + return link->subordinate; } static struct device_operations pci_domain_ops = { |