devicetree: Discriminate device ops scan_bus()

Use of scan_static_bus() and tree traversals is somewhat convoluted.
Start cleaning this up by assigning each path type with separate
static scan_bus() function.

For ME, SMBus and LPC paths a bus cannot expose bridges, as those would
add to the number of encountered PCI buses.

Change-Id: I8bb11450516faad4fa33b8f69bce5b9978ec75e5
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8534
Tested-by: build bot (Jenkins)
Reviewed-by: Timothy Pearson <tpearson@raptorengineeringinc.com>
This commit is contained in:
Kyösti Mälkki
2015-02-26 20:47:47 +02:00
parent 6ccf119932
commit d0e212cdce
77 changed files with 140 additions and 117 deletions

View File

@@ -688,13 +688,18 @@ static struct smbus_bus_operations lops_smbus_bus = {
.read_byte = lsmbus_read_byte,
};
static unsigned int scan_lpc_smbus(device_t dev, unsigned int max)
{
/* FIXME. Do we have mixed LPC/SMBus device node here. */
return scan_smbus(dev, max);
}
static struct device_operations southbridge_ops = {
.read_resources = cs5536_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = southbridge_init,
// .enable = southbridge_enable,
.scan_bus = scan_static_bus,
.scan_bus = scan_lpc_smbus,
.ops_smbus_bus = &lops_smbus_bus,
};