aboutsummaryrefslogtreecommitdiff
path: root/src/device/root_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/root_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/root_device.c')
-rw-r--r--src/device/root_device.c24
1 files changed, 6 insertions, 18 deletions
diff --git a/src/device/root_device.c b/src/device/root_device.c
index 4eae12ac44..01852758a2 100644
--- a/src/device/root_device.c
+++ b/src/device/root_device.c
@@ -45,11 +45,9 @@ const char mainboard_name[] = CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_
* file under some static bus in order to be enumerated at run time.
*
* @param bus Pointer to the device to which the static buses are attached to.
- * @param max Maximum bus number currently used before scanning.
- * @return The largest bus number used.
*/
-static unsigned int scan_static_bus(device_t bus, unsigned int passthru)
+static void scan_static_bus(device_t bus)
{
device_t child;
struct bus *link;
@@ -67,22 +65,18 @@ static unsigned int scan_static_bus(device_t bus, unsigned int passthru)
child->enabled ? "enabled" : "disabled");
}
}
-
- return passthru;
}
-unsigned int scan_lpc_bus(device_t bus, unsigned int passthru)
+void scan_lpc_bus(device_t bus)
{
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
- scan_static_bus(bus, 0);
+ scan_static_bus(bus);
printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
-
- return passthru;
}
-unsigned int scan_smbus(device_t bus, unsigned int passthru)
+void scan_smbus(device_t bus)
{
device_t child;
struct bus *link;
@@ -111,8 +105,6 @@ unsigned int scan_smbus(device_t bus, unsigned int passthru)
}
printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
-
- return passthru;
}
/**
@@ -121,23 +113,19 @@ unsigned int scan_smbus(device_t bus, unsigned int passthru)
* This function is the default scan_bus() method of the root device.
*
* @param root The root device structure.
- * @param max The current bus number scanned so far, usually 0x00.
- * @return The largest bus number used.
*/
-static unsigned int root_dev_scan_bus(device_t bus, unsigned int passthru)
+static void root_dev_scan_bus(device_t bus)
{
struct bus *link;
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
- scan_static_bus(bus, 0);
+ scan_static_bus(bus);
for (link = bus->link_list; link; link = link->next)
scan_bridges(link);
printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
-
- return passthru;
}
static void root_dev_reset(struct bus *bus)