pnp_device: don't treat missing PNP_MSC devicetree entry as error
Change-Id: I8da01cd462225b633bf2043ab33b35aeddc8d55a Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/27668 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
This commit is contained in:
		| @@ -118,6 +118,18 @@ void pnp_read_resources(struct device *dev) | |||||||
| static void pnp_set_resource(struct device *dev, struct resource *resource) | static void pnp_set_resource(struct device *dev, struct resource *resource) | ||||||
| { | { | ||||||
| 	if (!(resource->flags & IORESOURCE_ASSIGNED)) { | 	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, "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 " | 			printk(BIOS_ERR, "ERROR: %s %02lx %s size: 0x%010llx " | ||||||
| 			       "not assigned\n", dev_path(dev), resource->index, | 			       "not assigned\n", dev_path(dev), resource->index, | ||||||
| 			       resource_type(resource), resource->size); | 			       resource_type(resource), resource->size); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user