summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Reinauer <reinauer@chromium.org>2013-10-31 15:58:50 -0700
committerIsaac Christensen <isaac.christensen@se-eng.com>2014-09-11 23:14:55 +0200
commit08ba7d0c27f359919e707b563169e9d54decb1aa (patch)
treee5bbf8438e4629cb7a284e79d962e77303590b50
parentd40be1107c27417cb4e08d25ddcca54049d4f7a0 (diff)
pnp: Allow setting of misc register 0xfa in device tree
Change-Id: I45885905f0adaa8f0ad9137d7034e6f7a0dc43de Signed-off-by: Stefan Reinauer <reinauer@google.com> Reviewed-on: https://chromium-review.googlesource.com/175356 Reviewed-by: Stefan Reinauer <reinauer@chromium.org> Commit-Queue: Stefan Reinauer <reinauer@chromium.org> Tested-by: Stefan Reinauer <reinauer@chromium.org> (cherry picked from commit 7fe642543a8de249e13c3d63c3302a20910c247d) Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com> Reviewed-on: http://review.coreboot.org/6859 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/device/pnp_device.c5
-rw-r--r--src/include/device/pnp.h1
-rw-r--r--src/include/device/pnp_def.h1
-rw-r--r--src/superio/ite/it8772f/superio.c2
4 files changed, 8 insertions, 1 deletions
diff --git a/src/device/pnp_device.c b/src/device/pnp_device.c
index 987a253932..0aaadaac0a 100644
--- a/src/device/pnp_device.c
+++ b/src/device/pnp_device.c
@@ -300,6 +300,11 @@ static void get_resources(device_t dev, struct pnp_info *info)
resource->size = 1;
resource->flags |= IORESOURCE_IRQ;
}
+ if (info->flags & PNP_MSC10) {
+ resource = new_resource(dev, PNP_IDX_MSC10);
+ resource->size = 1;
+ resource->flags |= IORESOURCE_IRQ;
+ }
}
void pnp_enable_devices(device_t base_dev, struct device_operations *ops,
diff --git a/src/include/device/pnp.h b/src/include/device/pnp.h
index 43f457baff..aed0439000 100644
--- a/src/include/device/pnp.h
+++ b/src/include/device/pnp.h
@@ -48,6 +48,7 @@ struct pnp_info {
#define PNP_EN 0x100
#define PNP_MSC0 0x200
#define PNP_MSC1 0x400
+#define PNP_MSC10 0x800
struct io_info io0, io1, io2, io3;
};
struct resource *pnp_get_resource(device_t dev, unsigned index);
diff --git a/src/include/device/pnp_def.h b/src/include/device/pnp_def.h
index 91ec8f2e61..3258354f5d 100644
--- a/src/include/device/pnp_def.h
+++ b/src/include/device/pnp_def.h
@@ -12,5 +12,6 @@
#define PNP_IDX_DRQ1 0x75
#define PNP_IDX_MSC0 0xf0
#define PNP_IDX_MSC1 0xf1
+#define PNP_IDX_MSC10 0xfa
#endif /* DEVICE_PNP_DEF_H */
diff --git a/src/superio/ite/it8772f/superio.c b/src/superio/ite/it8772f/superio.c
index 721e7f9422..44bf33dcb4 100644
--- a/src/superio/ite/it8772f/superio.c
+++ b/src/superio/ite/it8772f/superio.c
@@ -207,7 +207,7 @@ static struct pnp_info pnp_dev_info[] = {
/* Serial Port 1 */
{ &ops, IT8772F_SP1, PNP_IO0 | PNP_IRQ0, {0x0ff8, 0}, },
/* Environmental Controller */
- { &ops, IT8772F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0,
+ { &ops, IT8772F_EC, PNP_IO0 | PNP_IO1 | PNP_IRQ0 | PNP_MSC10,
{0x0ff8, 0}, {0x0ffc, 4}, },
/* KBC Keyboard */
{ &ops, IT8772F_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0,