From a662777b6f57271392d9b52b4f7c002240893aa1 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Fri, 27 Jul 2018 16:41:32 +0200 Subject: pnp_device: don't treat missing PNP_MSC devicetree entry as error Change-Id: I8da01cd462225b633bf2043ab33b35aeddc8d55a Signed-off-by: Felix Held Reviewed-on: https://review.coreboot.org/27668 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Rudolph --- src/device/pnp_device.c | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'src/device') diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c index 09a27487b3..e56b00d774 100644 --- a/src/device/pnp_device.c +++ b/src/device/pnp_device.c @@ -118,9 +118,21 @@ void pnp_read_resources(struct device *dev) static void pnp_set_resource(struct device *dev, struct resource *resource) { if (!(resource->flags & IORESOURCE_ASSIGNED)) { - printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx " - "not assigned\n", dev_path(dev), resource->index, - resource_type(resource), resource->size); + /* The PNP_MSC super IO registers have the IRQ flag set. If no + value is assigned in the devicetree, the corresponding + PNP_MSC register doesn't get written, which should be printed + as warning and not as error. */ + if (resource->flags & IORESOURCE_IRQ && + (resource->index != PNP_IDX_IRQ0) && + (resource->index != PNP_IDX_IRQ1)) + printk(BIOS_WARNING, "WARNING: %s %02lx %s size: " + "0x%010llx not assigned\n", dev_path(dev), + resource->index, resource_type(resource), + resource->size); + else + printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx " + "not assigned\n", dev_path(dev), resource->index, + resource_type(resource), resource->size); return; } -- cgit v1.2.3