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/family10 | |
parent | b39714e5ee07deb36165d4c4f85b4b1effbd30c6 (diff) |
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/family10')
-rw-r--r-- | src/northbridge/amd/agesa/family10/northbridge.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/northbridge/amd/agesa/family10/northbridge.c b/src/northbridge/amd/agesa/family10/northbridge.c index 6d0b1b7b18..9f2555f78e 100644 --- a/src/northbridge/amd/agesa/family10/northbridge.c +++ b/src/northbridge/amd/agesa/family10/northbridge.c @@ -554,13 +554,14 @@ static void mcf0_control_init(struct device *dev) { } -static unsigned amdfam10_scan_chains(device_t dev, unsigned max) +static unsigned amdfam10_scan_chains(device_t dev, unsigned unused) { unsigned nodeid; struct bus *link; unsigned sblink = sysconf.sblk; device_t io_hub = NULL; u32 next_unitid = 0xff; + unsigned int max = dev->bus->subordinate; nodeid = amdfam10_nodeid(dev); if (nodeid == 0) { @@ -576,7 +577,9 @@ static unsigned amdfam10_scan_chains(device_t dev, unsigned max) } } - return max; + dev->bus->subordinate = max; + + return unused; } static struct device_operations northbridge_operations = { @@ -913,7 +916,9 @@ static u32 amdfam10_domain_scan_bus(device_t dev, u32 max) } for (link = dev->link_list; link; link = link->next) { - max = pci_scan_bus(link, PCI_DEVFN(CONFIG_CDB, 0), 0xff, max); + link->secondary = dev->bus->subordinate; + link->subordinate = pci_scan_bus(link, PCI_DEVFN(CONFIG_CDB, 0), 0xff, link->secondary); + dev->bus->subordinate = link->subordinate; } /* Tune the hypertransport transaction for best performance. |