From 199f98bc433f36fd0f91edd2495ecc3fd23afdbf Mon Sep 17 00:00:00 2001 From: Christian Walter Date: Mon, 9 Dec 2019 13:27:10 +0100 Subject: superio/common/generic: Assign resources behind device If multiple devices are behind a dev, we would only recognise port 0. We need to scan the complete 'bus'. Tested on ASpeed AST2500 Change-Id: Id80a2ae6e82c151b8d8adc9c5f35f38362d538fa Signed-off-by: Christian Walter Reviewed-on: https://review.coreboot.org/c/coreboot/+/37607 Reviewed-by: Patrick Rudolph Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/superio/common/generic.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/superio/common') diff --git a/src/superio/common/generic.c b/src/superio/common/generic.c index 429ee51319..7ac1f8374e 100644 --- a/src/superio/common/generic.c +++ b/src/superio/common/generic.c @@ -21,6 +21,9 @@ static void generic_set_resources(struct device *dev) { struct resource *res; + if (dev->link_list) + assign_resources(dev->link_list); + for (res = dev->resource_list; res; res = res->next) { if (!(res->flags & IORESOURCE_ASSIGNED)) continue; @@ -167,6 +170,7 @@ static struct device_operations ops = { .read_resources = generic_read_resources, .set_resources = generic_set_resources, .enable_resources = DEVICE_NOOP, + .scan_bus = scan_static_bus, #if CONFIG(HAVE_ACPI_TABLES) .acpi_fill_ssdt_generator = generic_ssdt, .acpi_name = generic_acpi_name, @@ -182,11 +186,6 @@ static void enable_dev(struct device *dev) else dev->ops = &ops; - /* - * Need to call enable_dev() on the devices "behind" the Generic Super I/O. - * coreboot's generic allocator doesn't expect them behind PnP devices. - */ - enable_static_devices(dev); } struct chip_operations superio_common_ops = { -- cgit v1.2.3