summaryrefslogtreecommitdiff
path: root/src/device/pnp_device.c
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2015-12-28 23:04:47 +1100
committerMartin Roth <martinroth@google.com>2015-12-29 18:17:01 +0100
commit62c0276f94ca7a02f802df2611c8c567fbcfa809 (patch)
treeefb9f27b92574dfb9cb05f8ad37d6f192da35486 /src/device/pnp_device.c
parent43a1f780ff6809f758092136b0b38c6917c27340 (diff)
device/pnp: Ability to set vendor specific logical device config
According to the PNP ISA v1.0a spec, config registers in the range of 0xf0 up to 0xfe are vendor defined and may be used for any purpose. Config register 0xff is reserved and is defined as such. Currently, only vendor specific registers 0xf0, 0xf1, 0xf4, and 0xfa are able to be set using the PNP_MSCx bit flag masks. This patch adds support for all 15 vendor specific config registers, and updates the existing superio pnp_info to use them where appropriate. Change-Id: Id43b85f74e3192b17dbd7e54c4c6136a2e59ad55 Signed-off-by: Damien Zammit <damien@zamaudio.com> Reviewed-on: https://review.coreboot.org/12808 Tested-by: build bot (Jenkins) Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src/device/pnp_device.c')
-rw-r--r--src/device/pnp_device.c59
1 files changed, 57 insertions, 2 deletions
diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c
index 7971aec5ba..a04469b4b8 100644
--- a/src/device/pnp_device.c
+++ b/src/device/pnp_device.c
@@ -296,13 +296,68 @@ static void get_resources(device_t dev, struct pnp_info *info)
resource->size = 1;
resource->flags |= IORESOURCE_IRQ;
}
+ if (info->flags & PNP_MSC2) {
+ resource = new_resource(dev, PNP_IDX_MSC2);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSC3) {
+ resource = new_resource(dev, PNP_IDX_MSC3);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
if (info->flags & PNP_MSC4) {
resource = new_resource(dev, PNP_IDX_MSC4);
resource->size = 1;
resource->flags |= IORESOURCE_IRQ;
}
- if (info->flags & PNP_MSC10) {
- resource = new_resource(dev, PNP_IDX_MSC10);
+ if (info->flags & PNP_MSC5) {
+ resource = new_resource(dev, PNP_IDX_MSC5);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSC6) {
+ resource = new_resource(dev, PNP_IDX_MSC6);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSC7) {
+ resource = new_resource(dev, PNP_IDX_MSC7);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSC8) {
+ resource = new_resource(dev, PNP_IDX_MSC8);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSC9) {
+ resource = new_resource(dev, PNP_IDX_MSC9);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSCA) {
+ resource = new_resource(dev, PNP_IDX_MSCA);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSCB) {
+ resource = new_resource(dev, PNP_IDX_MSCB);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSCC) {
+ resource = new_resource(dev, PNP_IDX_MSCC);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSCD) {
+ resource = new_resource(dev, PNP_IDX_MSCD);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
+ if (info->flags & PNP_MSCE) {
+ resource = new_resource(dev, PNP_IDX_MSCE);
resource->size = 1;
resource->flags |= IORESOURCE_IRQ;
}