diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-02-25 07:38:01 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-06-04 11:19:30 +0200 |
commit | cd37a2ba4159c62dfbff1bb7397e9e2d4da0c694 (patch) | |
tree | 97afbcd0b6fd3a75808bb1a2ca777f11197afdf8 /src/device | |
parent | d0e212cdce76b42090325f429e7bd78e0b1a9bb5 (diff) |
devicetree: Rename unused parameter to passthru
The actual use of the parameter max is to keep track of PCI bus
number while recursively scanning PCI bridges or PCI-e rootports.
Neither CPU, SMBus, LPC or other static buses are involved in this
enumeration, but the way bridge operations were originally designed
forced to pass this argument thru unrelated functions.
Follow-up removes these once the function prototype gets fixed.
Change-Id: Idbc9c515a362c571a1798bb36972058b309c2774
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8535
Tested-by: build bot (Jenkins)
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
Diffstat (limited to 'src/device')
-rw-r--r-- | src/device/root_device.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/src/device/root_device.c b/src/device/root_device.c index 0575b565c0..d4ad03475f 100644 --- a/src/device/root_device.c +++ b/src/device/root_device.c @@ -49,7 +49,7 @@ const char mainboard_name[] = CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_ * @return The largest bus number used. */ -static unsigned int scan_static_bus(device_t bus, unsigned int max) +static unsigned int scan_static_bus(device_t bus, unsigned int passthru) { device_t child; struct bus *link; @@ -68,21 +68,21 @@ static unsigned int scan_static_bus(device_t bus, unsigned int max) } } - return max; + return passthru; } -unsigned int scan_lpc_bus(device_t bus, unsigned int max) +unsigned int scan_lpc_bus(device_t bus, unsigned int passthru) { printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus)); - max = scan_static_bus(bus, max); + scan_static_bus(bus, 0); printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus)); - return max; + return passthru; } -unsigned int scan_smbus(device_t bus, unsigned int max) +unsigned int scan_smbus(device_t bus, unsigned int passthru) { device_t child; struct bus *link; @@ -112,7 +112,7 @@ unsigned int scan_smbus(device_t bus, unsigned int max) printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus)); - return max; + return passthru; } /** @@ -124,14 +124,15 @@ unsigned int scan_smbus(device_t bus, unsigned int max) * @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 max) +static unsigned int root_dev_scan_bus(device_t bus, unsigned int passthru) { device_t child; struct bus *link; + unsigned int max = 0; printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus)); - max = scan_static_bus(bus, max); + scan_static_bus(bus, 0); for (link = bus->link_list; link; link = link->next) { for (child = link->children; child; child = child->sibling) { @@ -144,7 +145,7 @@ static unsigned int root_dev_scan_bus(device_t bus, unsigned int max) printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus)); - return max; + return passthru; } static void root_dev_reset(struct bus *bus) |