device: Use scan_static_bus() over scan_lpc_bus()

Devices behind LPC can expose more buses (e.g. I2C on a super-i/o).
So we should scan buses on LPC devices, too.

Change-Id: I0eb005e41b9168fffc344ee8e666d43b605a30ba
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/29474
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Nico Huber 2019-03-14 16:02:05 +01:00 committed by Nico Huber
parent a89c82e402
commit 51b75ae50a
33 changed files with 31 additions and 41 deletions

View File

@ -56,15 +56,6 @@ void enable_static_devices(struct device *bus)
}
}
void scan_lpc_bus(struct device *bus)
{
printk(BIOS_SPEW, "%s for %s\n", __func__, dev_path(bus));
enable_static_devices(bus);
printk(BIOS_SPEW, "%s for %s done\n", __func__, dev_path(bus));
}
void scan_generic_bus(struct device *bus)
{
struct device *child;

View File

@ -330,7 +330,6 @@ static inline DEVTREE_CONST void *config_of_soc(void)
void enable_static_devices(struct device *bus);
void scan_smbus(struct device *bus);
void scan_generic_bus(struct device *bus);
void scan_lpc_bus(struct device *bus);
void scan_static_bus(struct device *bus);
#endif /* !defined(__ROMCC__) */

View File

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

View File

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

View File

@ -330,7 +330,7 @@ static struct device_operations lpc_ops = {
.acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.write_acpi_tables = southbridge_write_acpi_tables,
.init = lpc_init,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
.ops_pci = &lops_pci,
};

View File

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

View File

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

View File

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

View File

@ -115,7 +115,7 @@ static struct device_operations device_ops = {
.write_acpi_tables = southbridge_write_acpi_tables,
.acpi_inject_dsdt_generator = southbridge_inject_dsdt,
.init = lpc_soc_init,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
.ops_pci = &pci_dev_ops_pci,
};

View File

@ -119,7 +119,7 @@ static struct device_operations device_ops = {
.enable_resources = pci_dev_enable_resources,
.init = pmc_soc_init,
.ops_pci = &pci_dev_ops_pci,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
};
static const unsigned short pci_device_ids[] = {

View File

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

View File

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

View File

@ -294,7 +294,7 @@ static struct device_operations device_ops = {
.write_acpi_tables = southcluster_write_acpi_tables,
.init = sc_init,
.enable = southcluster_enable_dev,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
.ops_pci = &soc_pci_ops,
#if CONFIG(HAVE_ACPI_TABLES)
.acpi_name = lpc_acpi_name,

View File

@ -53,7 +53,7 @@ static struct device_operations device_ops = {
.read_resources = pmc_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
};
static const struct pci_driver pmc __pci_driver = {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -695,7 +695,7 @@ static struct device_operations device_ops = {
.acpi_fill_ssdt_generator = southbridge_fill_ssdt,
.acpi_name = lpc_acpi_name,
.init = lpc_init,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
.enable = i82801gx_enable,
.ops_pci = &pci_ops,
.final = lpc_final,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -247,7 +247,7 @@ static struct device_operations lpc_ops = {
.write_acpi_tables = acpi_write_hpet,
#endif
.init = lpc_init,
.scan_bus = scan_lpc_bus,
.scan_bus = scan_static_bus,
.ops_pci = &mcp55_pci_ops,
};
static const unsigned short lpc_ids[] = {