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

@ -44,51 +44,69 @@ const char mainboard_name[] = CONFIG_MAINBOARD_VENDOR " " CONFIG_MAINBOARD_PART_
* debug device. Those virtual devices have to be listed in the config * debug device. Those virtual devices have to be listed in the config
* file under some static bus in order to be enumerated at run time. * file under some static bus in order to be enumerated at run time.
* *
* This function is the default scan_bus() method for the root device and
* LPC bridges.
*
* @param bus Pointer to the device to which the static buses are attached to. * @param bus Pointer to the device to which the static buses are attached to.
* @param max Maximum bus number currently used before scanning. * @param max Maximum bus number currently used before scanning.
* @return The largest bus number used. * @return The largest bus number used.
*/ */
static int smbus_max = 0;
unsigned int scan_static_bus(device_t bus, unsigned int max) static unsigned int scan_static_bus(device_t bus, unsigned int max)
{ {
device_t child; device_t child;
struct bus *link; struct bus *link;
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
for (link = bus->link_list; link; link = link->next) { for (link = bus->link_list; link; link = link->next) {
/* For SMBus bus enumerate. */
child = link->children;
if (child && child->path.type == DEVICE_PATH_I2C)
link->secondary = ++smbus_max;
for (child = link->children; child; child = child->sibling) { for (child = link->children; child; child = child->sibling) {
if (child->chip_ops && child->chip_ops->enable_dev) if (child->chip_ops && child->chip_ops->enable_dev)
child->chip_ops->enable_dev(child); child->chip_ops->enable_dev(child);
if (child->ops && child->ops->enable) if (child->ops && child->ops->enable)
child->ops->enable(child); child->ops->enable(child);
if (child->path.type == DEVICE_PATH_I2C) {
printk(BIOS_DEBUG, "smbus: %s[%d]->",
dev_path(child->bus->dev),
child->bus->link_num);
}
printk(BIOS_DEBUG, "%s %s\n", dev_path(child), printk(BIOS_DEBUG, "%s %s\n", dev_path(child),
child->enabled ? "enabled" : "disabled"); child->enabled ? "enabled" : "disabled");
} }
} }
return max;
}
unsigned int scan_lpc_bus(device_t bus, unsigned int max)
{
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
max = scan_static_bus(bus, max);
printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
return max;
}
unsigned int scan_smbus(device_t bus, unsigned int max)
{
device_t child;
struct bus *link;
static int smbus_max = 0;
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
for (link = bus->link_list; link; link = link->next) { for (link = bus->link_list; link; link = link->next) {
link->secondary = ++smbus_max;
for (child = link->children; child; child = child->sibling) { for (child = link->children; child; child = child->sibling) {
if (!child->ops || !child->ops->scan_bus)
continue; if (child->chip_ops && child->chip_ops->enable_dev)
printk(BIOS_SPEW, "%s scanning...\n", dev_path(child)); child->chip_ops->enable_dev(child);
max = scan_bus(child, max);
if (child->ops && child->ops->enable)
child->ops->enable(child);
printk(BIOS_DEBUG, "smbus: %s[%d]->", dev_path(child->bus->dev),
child->bus->link_num);
printk(BIOS_DEBUG, "%s %s\n", dev_path(child),
child->enabled ? "enabled" : "disabled");
} }
} }
@ -106,9 +124,27 @@ unsigned int scan_static_bus(device_t bus, unsigned int max)
* @param max The current bus number scanned so far, usually 0x00. * @param max The current bus number scanned so far, usually 0x00.
* @return The largest bus number used. * @return The largest bus number used.
*/ */
static unsigned int root_dev_scan_bus(device_t root, unsigned int max) static unsigned int root_dev_scan_bus(device_t bus, unsigned int max)
{ {
return scan_static_bus(root, max); device_t child;
struct bus *link;
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
max = scan_static_bus(bus, max);
for (link = bus->link_list; link; link = link->next) {
for (child = link->children; child; child = child->sibling) {
if (!child->ops || !child->ops->scan_bus)
continue;
printk(BIOS_SPEW, "%s scanning...\n", dev_path(child));
max = scan_bus(child, max);
}
}
printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
return max;
} }
static void root_dev_reset(struct bus *bus) static void root_dev_reset(struct bus *bus)

View File

@ -1,10 +1,5 @@
#include <console/console.h>
#include <device/device.h> #include <device/device.h>
#include <device/smbus.h> #include <device/smbus.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <cpu/x86/msr.h>
static void i2cmux_set_link(struct device *dev, unsigned int link) static void i2cmux_set_link(struct device *dev, unsigned int link)
{ {
@ -21,7 +16,7 @@ static struct device_operations i2cmux_operations = {
.set_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP,
.init = DEVICE_NOOP, .init = DEVICE_NOOP,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.set_link = i2cmux_set_link, .set_link = i2cmux_set_link,
}; };

View File

@ -1,10 +1,5 @@
#include <console/console.h>
#include <device/device.h> #include <device/device.h>
#include <device/smbus.h> #include <device/smbus.h>
#include <device/pci.h>
#include <device/pci_ids.h>
#include <device/pci_ops.h>
#include <cpu/x86/msr.h>
static void i2cmux2_set_link(struct device *dev, unsigned int link) static void i2cmux2_set_link(struct device *dev, unsigned int link)
{ {
@ -20,7 +15,7 @@ static struct device_operations i2cmux2_operations = {
.set_resources = DEVICE_NOOP, .set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP, .enable_resources = DEVICE_NOOP,
.init = DEVICE_NOOP, .init = DEVICE_NOOP,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.set_link = i2cmux2_set_link, .set_link = i2cmux2_set_link,
}; };

View File

@ -224,11 +224,12 @@ void show_all_devs_resources(int debug_level, const char* msg);
extern struct device_operations default_dev_ops_root; extern struct device_operations default_dev_ops_root;
void pci_domain_read_resources(struct device *dev); void pci_domain_read_resources(struct device *dev);
unsigned int pci_domain_scan_bus(struct device *dev, unsigned int _max); unsigned int pci_domain_scan_bus(struct device *dev, unsigned int _max);
unsigned int scan_static_bus(device_t bus, unsigned int _max);
void fixed_mem_resource(device_t dev, unsigned long index, void fixed_mem_resource(device_t dev, unsigned long index,
unsigned long basek, unsigned long sizek, unsigned long type); unsigned long basek, unsigned long sizek, unsigned long type);
unsigned int scan_smbus(device_t bus, unsigned int _max);
unsigned int scan_lpc_bus(device_t bus, unsigned int _max);
/* It is the caller's responsibility to adjust regions such that ram_resource() /* It is the caller's responsibility to adjust regions such that ram_resource()
* and mmio_resource() do not overlap. * and mmio_resource() do not overlap.

View File

@ -6,10 +6,10 @@ chip northbridge/amd/gx2
end end
device domain 0 on device domain 0 on
device pci 0.0 on end device pci 0.0 on
chip southbridge/amd/cs5535 chip southbridge/amd/cs5535
register "setupflash" = "0" register "setupflash" = "0"
device pci 12.0 on device pci 12.0 on end
device pci 12.1 off end # SMI device pci 12.1 off end # SMI
device pci 12.2 on end # IDE device pci 12.2 on end # IDE
device pci 12.3 off end # Audio device pci 12.3 off end # Audio

View File

@ -297,7 +297,7 @@ static struct device_operations cx700_lpc_ops = {
.set_resources = cx700_set_resources, .set_resources = cx700_set_resources,
.enable_resources = cx700_enable_resources, .enable_resources = cx700_enable_resources,
.init = cx700_lpc_init, .init = cx700_lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -362,7 +362,7 @@ static struct device_operations vx800_lpc_ops = {
.set_resources = vx800_set_resources, .set_resources = vx800_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = southbridge_init, .init = southbridge_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -192,7 +192,7 @@ static struct device_operations vx900_lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = vx900_lpc_init, .init = vx900_lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -134,8 +134,9 @@ static struct device_operations traf_ctrl_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = vx900_traf_ctr_init, .init = vx900_traf_ctr_init,
/* Need this here, or the IOAPIC driver won't be called */ /* Need this here, or the IOAPIC driver won't be called.
.scan_bus = scan_static_bus, * FIXME: Technically not a LPC bus. */
.scan_bus = scan_lpc_bus,
}; };
static const struct pci_driver traf_ctrl_driver __pci_driver = { static const struct pci_driver traf_ctrl_driver __pci_driver = {

View File

@ -546,7 +546,7 @@ static struct device_operations device_ops = {
.enable_resources = NULL, .enable_resources = NULL,
.init = sc_init, .init = sc_init,
.enable = southcluster_enable_dev, .enable = southcluster_enable_dev,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &soc_pci_ops, .ops_pci = &soc_pci_ops,
}; };

View File

@ -643,7 +643,7 @@ static struct device_operations device_ops = {
.acpi_inject_dsdt_generator = southcluster_inject_dsdt, .acpi_inject_dsdt_generator = southcluster_inject_dsdt,
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.init = &lpc_init, .init = &lpc_init,
.scan_bus = &scan_static_bus, .scan_bus = &scan_lpc_bus,
.ops_pci = &broadwell_pci_ops, .ops_pci = &broadwell_pci_ops,
}; };

View File

@ -94,7 +94,7 @@ static struct device_operations smbus_ops = {
.read_resources = &smbus_read_resources, .read_resources = &smbus_read_resources,
.set_resources = &pci_dev_set_resources, .set_resources = &pci_dev_set_resources,
.enable_resources = &pci_dev_enable_resources, .enable_resources = &pci_dev_enable_resources,
.scan_bus = &scan_static_bus, .scan_bus = &scan_smbus,
.init = &pch_smbus_init, .init = &pch_smbus_init,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &broadwell_pci_ops, .ops_pci = &broadwell_pci_ops,

View File

@ -607,7 +607,7 @@ static struct device_operations device_ops = {
.enable_resources = NULL, .enable_resources = NULL,
.init = sc_init, .init = sc_init,
.enable = southcluster_enable_dev, .enable = southcluster_enable_dev,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &soc_pci_ops, .ops_pci = &soc_pci_ops,
}; };

View File

@ -333,7 +333,7 @@ static struct device_operations lpc_ops = {
#endif #endif
.enable_resources = hudson_lpc_enable_resources, .enable_resources = hudson_lpc_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -163,7 +163,7 @@ static struct device_operations smbus_ops = {
.set_resources = hudson_sm_set_resources, .set_resources = hudson_sm_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = sm_init, .init = sm_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -226,7 +226,7 @@ static struct device_operations acpi_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = acpi_enable_resources, .enable_resources = acpi_enable_resources,
.init = acpi_init, .init = acpi_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
/* We don't need amd8111_enable, chip ops takes care of it. /* We don't need amd8111_enable, chip ops takes care of it.
* It could be useful if these devices were not * It could be useful if these devices were not
* enabled by default. * enabled by default.

View File

@ -151,7 +151,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator, .acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator,
#endif #endif
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = amd8111_enable, .enable = amd8111_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -28,7 +28,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = amd8111_enable, .enable = amd8111_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -25,8 +25,6 @@ static struct device_operations usb_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus,
// .enable = amd8111_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -111,7 +111,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -161,7 +161,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -132,7 +132,7 @@ static struct device_operations lpc_ops = {
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) #if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -94,7 +94,6 @@ static struct device_operations southbridge_ops = {
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = southbridge_init, .init = southbridge_init,
.enable = southbridge_enable, .enable = southbridge_enable,
.scan_bus = scan_static_bus,
}; };
static const struct pci_driver cs5535_pci_driver __pci_driver = { static const struct pci_driver cs5535_pci_driver __pci_driver = {

View File

@ -688,13 +688,18 @@ static struct smbus_bus_operations lops_smbus_bus = {
.read_byte = lsmbus_read_byte, .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 = { static struct device_operations southbridge_ops = {
.read_resources = cs5536_read_resources, .read_resources = cs5536_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = southbridge_init, .init = southbridge_init,
// .enable = southbridge_enable, .scan_bus = scan_lpc_smbus,
.scan_bus = scan_static_bus,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -340,7 +340,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -163,7 +163,7 @@ static struct device_operations smbus_ops = {
.set_resources = hudson_sm_set_resources, .set_resources = hudson_sm_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = sm_init, .init = sm_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -242,7 +242,7 @@ static struct device_operations lpc_ops = {
.acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator, .acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
/* .enable = sb600_enable, */ /* .enable = sb600_enable, */
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -361,7 +361,7 @@ static struct device_operations smbus_ops = {
.set_resources = sb600_sm_set_resources, .set_resources = sb600_sm_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = sm_init, .init = sm_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
/* .enable = sb600_enable, */ /* .enable = sb600_enable, */
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -287,7 +287,7 @@ static struct device_operations lpc_ops = {
.acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator, .acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -452,7 +452,7 @@ static struct device_operations smbus_ops = {
.set_resources = sb700_sm_set_resources, .set_resources = sb700_sm_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = sm_init, .init = sm_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -254,7 +254,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
static const struct pci_driver lpc_driver __pci_driver = { static const struct pci_driver lpc_driver __pci_driver = {

View File

@ -343,7 +343,7 @@ static struct device_operations smbus_ops = {
.set_resources = sb800_sm_set_resources, .set_resources = sb800_sm_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = sm_init, .init = sm_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -135,7 +135,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = bcm5785_lpc_enable_resources, .enable_resources = bcm5785_lpc_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
// .enable = bcm5785_enable, // .enable = bcm5785_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -154,7 +154,7 @@ static struct device_operations sb_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = sb_init, .init = sb_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
// .enable = bcm5785_enable, // .enable = bcm5785_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -619,7 +619,7 @@ static struct device_operations vortex_sb_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = &southbridge_init, .init = &southbridge_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = 0, .enable = 0,
.ops_pci = 0, .ops_pci = 0,
}; };

View File

@ -827,7 +827,7 @@ static struct device_operations device_ops = {
.init = lpc_init, .init = lpc_init,
.final = lpc_final, .final = lpc_final,
.enable = pch_lpc_enable, .enable = pch_lpc_enable,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -760,7 +760,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = intel_me_init, .init = intel_me_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -763,7 +763,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = intel_me_init, .init = intel_me_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -151,7 +151,7 @@ static struct device_operations smbus_ops = {
.read_resources = smbus_read_resources, .read_resources = smbus_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.init = pch_smbus_init, .init = pch_smbus_init,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,

View File

@ -362,7 +362,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = esb6300_lpc_enable_resources, .enable_resources = esb6300_lpc_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = esb6300_enable, .enable = esb6300_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -35,7 +35,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = esb6300_enable, .enable = esb6300_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -761,7 +761,7 @@ static struct device_operations device_ops = {
.acpi_inject_dsdt_generator = southbridge_inject_dsdt, .acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.init = lpc_init, .init = lpc_init,
.enable = pch_lpc_enable, .enable = pch_lpc_enable,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -759,7 +759,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = intel_me_init, .init = intel_me_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -762,7 +762,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = intel_me_init, .init = intel_me_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -463,7 +463,7 @@ static struct device_operations device_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.acpi_inject_dsdt_generator = southbridge_inject_dsdt, .acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.enable = soc_lpc_enable, .enable = soc_lpc_enable,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -87,7 +87,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,
}; };

View File

@ -457,7 +457,7 @@ static struct device_operations lpc_ops = {
#if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES) #if IS_ENABLED(CONFIG_HAVE_ACPI_TABLES)
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = i3100_enable, .enable = i3100_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -74,7 +74,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = i3100_enable, .enable = i3100_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -145,7 +145,7 @@ static const struct device_operations isa_ops = {
.acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator, .acpi_fill_ssdt_generator = southbridge_acpi_fill_ssdt_generator,
#endif #endif
.init = isa_init, .init = isa_init,
.scan_bus = scan_static_bus, /* TODO: Needed? */ .scan_bus = scan_lpc_bus, /* TODO: Needed? */
.enable = 0, .enable = 0,
.ops_pci = 0, /* No subsystem IDs on 82371EB! */ .ops_pci = 0, /* No subsystem IDs on 82371EB! */
}; };

View File

@ -121,7 +121,7 @@ static const struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = pwrmgt_enable, .enable = pwrmgt_enable,
.ops_pci = 0, /* No subsystem IDs on 82371EB! */ .ops_pci = 0, /* No subsystem IDs on 82371EB! */
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -286,7 +286,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = i82801ax_enable, .enable = i82801ax_enable,
}; };

View File

@ -48,7 +48,7 @@ static const struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = i82801ax_enable, .enable = i82801ax_enable,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -304,7 +304,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = i82801bx_enable, .enable = i82801bx_enable,
}; };

View File

@ -48,7 +48,7 @@ static const struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = i82801bx_enable, .enable = i82801bx_enable,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -230,7 +230,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = 0, .enable = 0,
}; };

View File

@ -336,7 +336,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = i82801dx_enable, .enable = i82801dx_enable,
}; };

View File

@ -369,7 +369,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = i82801ex_lpc_enable_resources, .enable_resources = i82801ex_lpc_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = i82801ex_enable, .enable = i82801ex_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -35,7 +35,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = i82801ex_enable, .enable = i82801ex_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -667,7 +667,7 @@ static struct device_operations device_ops = {
.acpi_inject_dsdt_generator = southbridge_inject_dsdt, .acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.enable = i82801gx_enable, .enable = i82801gx_enable,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -258,7 +258,7 @@ static struct device_operations smbus_ops = {
.read_resources = smbus_read_resources, .read_resources = smbus_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.enable = i82801gx_enable, .enable = i82801gx_enable,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,

View File

@ -582,7 +582,7 @@ static struct device_operations device_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.acpi_fill_ssdt_generator = southbridge_fill_ssdt, .acpi_fill_ssdt_generator = southbridge_fill_ssdt,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -101,7 +101,7 @@ static struct device_operations smbus_ops = {
.read_resources = smbus_read_resources, .read_resources = smbus_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.init = pch_smbus_init, .init = pch_smbus_init,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,

View File

@ -805,7 +805,7 @@ static struct device_operations device_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.init = lpc_init, .init = lpc_init,
.enable = pch_lpc_enable, .enable = pch_lpc_enable,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -634,7 +634,6 @@ static struct device_operations device_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = intel_me_init, .init = intel_me_init,
.scan_bus = scan_static_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -108,7 +108,7 @@ static struct device_operations smbus_ops = {
.read_resources = smbus_read_resources, .read_resources = smbus_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.init = pch_smbus_init, .init = pch_smbus_init,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,

View File

@ -834,7 +834,7 @@ static struct device_operations device_ops = {
.write_acpi_tables = southbridge_write_acpi_tables, .write_acpi_tables = southbridge_write_acpi_tables,
.init = lpc_init, .init = lpc_init,
.enable = pch_lpc_enable, .enable = pch_lpc_enable,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -155,7 +155,7 @@ static struct device_operations smbus_ops = {
.read_resources = smbus_read_resources, .read_resources = smbus_read_resources,
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.init = pch_smbus_init, .init = pch_smbus_init,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,

View File

@ -222,7 +222,7 @@ static struct device_operations device_ops = {
.acpi_inject_dsdt_generator = southbridge_inject_dsdt, .acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &pci_ops, .ops_pci = &pci_ops,
}; };

View File

@ -65,7 +65,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pci = &smbus_pci_ops, .ops_pci = &smbus_pci_ops,
}; };

View File

@ -329,7 +329,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet, .write_acpi_tables = acpi_write_hpet,
#endif #endif
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &ck804_pci_ops, .ops_pci = &ck804_pci_ops,
}; };

View File

@ -96,7 +96,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = 0, .init = 0,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
.ops_pci = &ck804_pci_ops, .ops_pci = &ck804_pci_ops,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
}; };

View File

@ -261,7 +261,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = mcp55_lpc_enable_resources, .enable_resources = mcp55_lpc_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
// .enable = mcp55_enable, // .enable = mcp55_enable,
.ops_pci = &mcp55_pci_ops, .ops_pci = &mcp55_pci_ops,
}; };

View File

@ -127,7 +127,7 @@ static struct device_operations smbus_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = mcp55_sm_init, .init = mcp55_sm_init,
.scan_bus = scan_static_bus, .scan_bus = scan_smbus,
// .enable = mcp55_enable, // .enable = mcp55_enable,
.ops_pci = &mcp55_pci_ops, .ops_pci = &mcp55_pci_ops,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,

View File

@ -105,7 +105,6 @@ static struct device_operations r8610_sb_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = &southbridge_init, .init = &southbridge_init,
.scan_bus = scan_static_bus,
.enable = 0, .enable = 0,
.ops_pci = 0, .ops_pci = 0,
}; };

View File

@ -259,7 +259,7 @@ static struct device_operations lpc_ops = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = sis966_lpc_enable_resources, .enable_resources = sis966_lpc_enable_resources,
.init = lpc_init, .init = lpc_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
// .enable = sis966_enable, // .enable = sis966_enable,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -657,7 +657,7 @@ static const struct device_operations vt8237r_lpc_ops_s = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = vt8237s_init, .init = vt8237s_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
@ -666,7 +666,7 @@ static const struct device_operations vt8237r_lpc_ops_r = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = vt8237r_init, .init = vt8237r_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };
@ -675,7 +675,7 @@ static const struct device_operations vt8237r_lpc_ops_a = {
.set_resources = pci_dev_set_resources, .set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources, .enable_resources = pci_dev_enable_resources,
.init = vt8237a_init, .init = vt8237a_init,
.scan_bus = scan_static_bus, .scan_bus = scan_lpc_bus,
.ops_pci = &lops_pci, .ops_pci = &lops_pci,
}; };

View File

@ -134,7 +134,6 @@ static struct device_operations ops_hwm = {
.enable_resources = lpc47b397_pnp_enable_resources, .enable_resources = lpc47b397_pnp_enable_resources,
.enable = pnp_alt_enable, .enable = pnp_alt_enable,
.init = lpc47b397_init, .init = lpc47b397_init,
.scan_bus = scan_static_bus,
.ops_smbus_bus = &lops_smbus_bus, .ops_smbus_bus = &lops_smbus_bus,
.ops_pnp_mode = &pnp_conf_mode_55_aa, .ops_pnp_mode = &pnp_conf_mode_55_aa,
}; };