[coreboot-gerrit] Change in coreboot[master]: pnp_device: don't treat missing PNP_MSC devicetree entry as error

Felix Held (Code Review) gerrit at coreboot.org
Sun Jul 29 17:06:44 CEST 2018


Felix Held has submitted this change and it was merged. ( https://review.coreboot.org/27668 )

Change subject: pnp_device: don't treat missing PNP_MSC devicetree entry as error
......................................................................

pnp_device: don't treat missing PNP_MSC devicetree entry as error

Change-Id: I8da01cd462225b633bf2043ab33b35aeddc8d55a
Signed-off-by: Felix Held <felix-coreboot at felixheld.de>
Reviewed-on: https://review.coreboot.org/27668
Tested-by: build bot (Jenkins) <no-reply at coreboot.org>
Reviewed-by: Patrick Rudolph <siro at das-labor.org>
---
M src/device/pnp_device.c
1 file changed, 15 insertions(+), 3 deletions(-)

Approvals:
  build bot (Jenkins): Verified
  Patrick Rudolph: Looks good to me, approved



diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c
index 09a2748..e56b00d 100644
--- a/src/device/pnp_device.c
+++ b/src/device/pnp_device.c
@@ -118,9 +118,21 @@
 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;
 	}
 

-- 
To view, visit https://review.coreboot.org/27668
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I8da01cd462225b633bf2043ab33b35aeddc8d55a
Gerrit-Change-Number: 27668
Gerrit-PatchSet: 2
Gerrit-Owner: Felix Held <felix-coreboot at felixheld.de>
Gerrit-Reviewer: Felix Held <felix-coreboot at felixheld.de>
Gerrit-Reviewer: Patrick Rudolph <siro at das-labor.org>
Gerrit-Reviewer: build bot (Jenkins) <no-reply at coreboot.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20180729/85a4cc04/attachment.html>


More information about the coreboot-gerrit mailing list