aboutsummaryrefslogtreecommitdiff
path: root/src/device/pci_device.c
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2015-03-19 21:04:23 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2015-06-04 11:22:53 +0200
commit580e7223bb617cfa14bf24e48bb39bac47c4e8e0 (patch)
tree13d7034347e8497dcbf7699746830727b33084bd /src/device/pci_device.c
parent2d2367cd95dc6ab2dd51b1005675e42bab417769 (diff)
devicetree: Change scan_bus() prototype in device ops
The input/output value max is no longer used for tracking the bus enumeration sequence, everything is handled in the context of devicetree bus objects. Change-Id: I545088bd8eaf205b1436d8c52d3bc7faf4cfb0f9 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/8541 Tested-by: build bot (Jenkins) Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com> Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Diffstat (limited to 'src/device/pci_device.c')
-rw-r--r--src/device/pci_device.c17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/device/pci_device.c b/src/device/pci_device.c
index 07b1993b0a..6332209a12 100644
--- a/src/device/pci_device.c
+++ b/src/device/pci_device.c
@@ -1215,11 +1215,9 @@ static void pci_bridge_route(struct bus *link, scan_state state)
* This function is the default scan_bus() method for PCI bridge devices.
*
* @param dev Pointer to the bridge device.
- * @param max The highest bus number assigned up to now.
* @param do_scan_bus TODO
- * @return The maximum bus number found, after scanning all subordinate buses.
*/
-unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max,
+void do_pci_scan_bridge(struct device *dev,
void (*do_scan_bus) (struct bus * bus,
unsigned min_devfn,
unsigned max_devfn))
@@ -1245,8 +1243,6 @@ unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max,
do_scan_bus(bus, 0x00, 0xff);
pci_bridge_route(bus, PCI_ROUTE_FINAL);
-
- return bus->subordinate;
}
/**
@@ -1258,12 +1254,10 @@ unsigned int do_pci_scan_bridge(struct device *dev, unsigned int max,
* This function is the default scan_bus() method for PCI bridge devices.
*
* @param dev Pointer to the bridge device.
- * @param max The highest bus number assigned up to now.
- * @return The maximum bus number found, after scanning all subordinate buses.
*/
-unsigned int pci_scan_bridge(struct device *dev, unsigned int max)
+void pci_scan_bridge(struct device *dev)
{
- return do_pci_scan_bridge(dev, max, pci_scan_bus);
+ do_pci_scan_bridge(dev, pci_scan_bus);
}
/**
@@ -1272,14 +1266,11 @@ unsigned int pci_scan_bridge(struct device *dev, unsigned int max)
* This function is the default scan_bus() method for PCI domains.
*
* @param dev Pointer to the domain.
- * @param max The highest bus number assigned up to now.
- * @return The maximum bus number found, after scanning all subordinate busses.
*/
-unsigned int pci_domain_scan_bus(device_t dev, unsigned int unused)
+void pci_domain_scan_bus(device_t dev)
{
struct bus *link = dev->link_list;
pci_scan_bus(link, PCI_DEVFN(0, 0), 0xff);
- return unused;
}
/**