summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Walter <christian.walter@9elements.com>2019-12-09 13:27:10 +0100
committerPatrick Rudolph <siro@das-labor.org>2019-12-12 12:46:35 +0000
commit199f98bc433f36fd0f91edd2495ecc3fd23afdbf (patch)
tree2e5fdddb42c87d3540430d74dfda9342b442d2a7 /src
parent3c73dadd6fa4226e616a4d93b241ccda7a98cbe9 (diff)
downloadcoreboot-199f98bc433f36fd0f91edd2495ecc3fd23afdbf.tar.xz
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 <christian.walter@9elements.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37607 Reviewed-by: Patrick Rudolph <siro@das-labor.org> Reviewed-by: Nico Huber <nico.h@gmx.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/superio/common/generic.c9
1 files changed, 4 insertions, 5 deletions
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 = {