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 <felix-coreboot@felixheld.de>
Change-Id: I232e60ef7ae672e18cc1837b8e6a0427d01c142b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80774
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Felix Held 2024-02-28 12:20:41 +01:00
parent 9d08ad5bac
commit 9362b1935c

View File

@ -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;
}