From 9362b1935ca002c5fae48ea3dd8ec13ba6ac7a6e Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 28 Feb 2024 12:20:41 +0100 Subject: device/pnp_device: fix log levels for unassigned resource messages Commit a662777b6f57 ("pnp_device: don't treat missing PNP_MSC devicetree entry as error") lowered the log level for every resource without the assigned bit set except for the IRQ0 and IRQ1 PNP device resources. Commit df84fff80fed ("device/pnp_device: Demote unassigned resource printk to NOTICE") lowered the log level for the IRQ0 and IRQ1 PNP device resources to a lower log level than for the other warnings that are less likely a problem. Fix this regression by using the BIOS_NOTICE log level for all PNP resources that don't have the IORESOURCE_ASSIGNED bit set. Signed-off-by: Felix Held Change-Id: I232e60ef7ae672e18cc1837b8e6a0427d01c142b Reviewed-on: https://review.coreboot.org/c/coreboot/+/80774 Reviewed-by: Matt DeVillier Reviewed-by: Arthur Heymans Reviewed-by: Nico Huber Tested-by: build bot (Jenkins) --- src/device/pnp_device.c | 18 +++--------------- 1 file changed, 3 insertions(+), 15 deletions(-) (limited to 'src/device/pnp_device.c') diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c index c7c622804d..431e2274ff 100644 --- a/src/device/pnp_device.c +++ b/src/device/pnp_device.c @@ -118,21 +118,9 @@ void pnp_read_resources(struct device *dev) static void pnp_set_resource(struct device *dev, struct resource *resource) { if (!(resource->flags & IORESOURCE_ASSIGNED)) { - /* 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, "%s %02lx %s size: " - "0x%010llx not assigned in devicetree\n", dev_path(dev), - resource->index, resource_type(resource), - resource->size); - else - printk(BIOS_NOTICE, "%s %02lx %s size: 0x%010llx " - "not assigned in devicetree\n", dev_path(dev), resource->index, - resource_type(resource), resource->size); + printk(BIOS_NOTICE, "%s %02lx %s size: 0x%010llx not assigned in devicetree\n", + dev_path(dev), resource->index, resource_type(resource), + resource->size); return; } -- cgit v1.2.3