PCI subsystem: Drop parameter max from scan_bus
Change-Id: Ib33d3363c8d42fa54ac07c11a7ab2bc7ee4ae8bf Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8539 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
parent
757c8b485b
commit
de271a8f0a
12 changed files with 47 additions and 54 deletions
|
|
@ -565,6 +565,7 @@ static unsigned amdfam10_scan_chains(device_t dev, unsigned unused)
|
|||
|
||||
nodeid = amdfam10_nodeid(dev);
|
||||
if (nodeid == 0) {
|
||||
ASSERT(dev->bus->secondary == 0);
|
||||
for (link = dev->link_list; link; link = link->next) {
|
||||
if (link->link_num == sblink) { /* devicetree put IO Hub on link_lsit[3] */
|
||||
io_hub = link->children;
|
||||
|
|
@ -572,9 +573,10 @@ static unsigned amdfam10_scan_chains(device_t dev, unsigned unused)
|
|||
die("I can't find the IO Hub, or IO Hub not enabled, please check the device tree.\n");
|
||||
}
|
||||
/* Now that nothing is overlapping it is safe to scan the children. */
|
||||
max = pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7, 0);
|
||||
pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7);
|
||||
}
|
||||
}
|
||||
max = dev->bus->subordinate;
|
||||
}
|
||||
|
||||
dev->bus->subordinate = max;
|
||||
|
|
@ -917,7 +919,7 @@ static u32 amdfam10_domain_scan_bus(device_t dev, u32 unused)
|
|||
|
||||
for (link = dev->link_list; link; link = link->next) {
|
||||
link->secondary = dev->bus->subordinate;
|
||||
link->subordinate = pci_scan_bus(link, PCI_DEVFN(CONFIG_CDB, 0), 0xff, link->secondary);
|
||||
pci_scan_bus(link, PCI_DEVFN(CONFIG_CDB, 0), 0xff);
|
||||
dev->bus->subordinate = link->subordinate;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -469,6 +469,7 @@ static unsigned scan_chains(device_t dev, unsigned unused)
|
|||
|
||||
nodeid = amdfam15_nodeid(dev);
|
||||
if (nodeid == 0) {
|
||||
ASSERT(dev->bus->secondary == 0);
|
||||
for (link = dev->link_list; link; link = link->next) {
|
||||
//if (link->link_num == sblink) { /* devicetree put IO Hub on link_lsit[sblink] */
|
||||
if (link->link_num == 0) { /* devicetree put IO Hub on link_lsit[0] */
|
||||
|
|
@ -477,9 +478,10 @@ static unsigned scan_chains(device_t dev, unsigned unused)
|
|||
die("I can't find the IO Hub, or IO Hub not enabled, please check the device tree.\n");
|
||||
}
|
||||
/* Now that nothing is overlapping it is safe to scan the children. */
|
||||
max = pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7, 0);
|
||||
pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7);
|
||||
}
|
||||
}
|
||||
max = dev->bus->subordinate;
|
||||
}
|
||||
|
||||
dev->bus->subordinate = max;
|
||||
|
|
@ -954,7 +956,7 @@ static void domain_set_resources(device_t dev)
|
|||
static unsigned int f15_pci_domain_scan_bus(device_t dev, unsigned int unused)
|
||||
{
|
||||
struct bus *link = dev->link_list;
|
||||
link->subordinate = pci_scan_bus(link, PCI_DEVFN(0x18, 0), 0xff, link->secondary);
|
||||
pci_scan_bus(link, PCI_DEVFN(0x18, 0), 0xff);
|
||||
return unused;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -263,7 +263,7 @@ static u32 amdfam10_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool
|
|||
next_unitid = hypertransport_scan_chain(link, 0, max_devfn, ht_unitid_base, offset_unit_id(is_sblink));
|
||||
|
||||
/* Now that nothing is overlapping it is safe to scan the children. */
|
||||
link->subordinate = pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7, link->secondary);
|
||||
pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7);
|
||||
|
||||
/* We know the number of busses behind this bridge. Set the
|
||||
* subordinate bus number to it's real value
|
||||
|
|
@ -924,7 +924,7 @@ static u32 amdfam10_domain_scan_bus(device_t dev, u32 unused)
|
|||
|
||||
for(link = dev->link_list; link; link = link->next) {
|
||||
link->secondary = dev->bus->subordinate;
|
||||
link->subordinate = pci_scan_bus(link, PCI_DEVFN(CONFIG_CDB, 0), 0xff, link->secondary);
|
||||
pci_scan_bus(link, PCI_DEVFN(CONFIG_CDB, 0), 0xff);
|
||||
dev->bus->subordinate = link->subordinate;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ static u32 amdk8_scan_chain(device_t dev, u32 nodeid, struct bus *link, bool is_
|
|||
next_unitid = hypertransport_scan_chain(link, 0, max_devfn, ht_unitid_base, offset_unit_id(is_sblink));
|
||||
|
||||
/* Now that nothing is overlapping it is safe to scan the children. */
|
||||
link->subordinate = pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7, link->secondary);
|
||||
pci_scan_bus(link, 0x00, ((next_unitid - 1) << 3) | 7);
|
||||
|
||||
/* We know the number of busses behind this bridge. Set the
|
||||
* subordinate bus number to it's real value
|
||||
|
|
@ -1107,7 +1107,7 @@ static u32 amdk8_domain_scan_bus(device_t dev, u32 unused)
|
|||
}
|
||||
|
||||
link->secondary = dev->bus->subordinate;
|
||||
link->subordinate = pci_scan_bus(link, PCI_DEVFN(0x18, 0), 0xff, link->secondary);
|
||||
pci_scan_bus(link, PCI_DEVFN(0x18, 0), 0xff);
|
||||
dev->bus->subordinate = link->subordinate;
|
||||
|
||||
/* Tune the hypertransport transaction for best performance.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue