[coreboot-gerrit] Change in coreboot[master]: superio/acpi: extend generic ACPI PnP device
Samuel Holland (Code Review)
gerrit at coreboot.org
Sun Jun 4 00:31:47 CEST 2017
Samuel Holland has uploaded this change for review. ( https://review.coreboot.org/20024
Change subject: superio/acpi: extend generic ACPI PnP device
......................................................................
superio/acpi: extend generic ACPI PnP device
Some Super I/O PnP devices are detected by string matching the HID.
Allow providing a custom HID to override the default generic one.
Some Super I/O logical devices have three I/O port ranges, such as the
GPIO on the IT8720F. Allow specifying a third I/O range. While here, fix
a typo in the I/O range description.
Change-Id: Idad03f3881e0fbf2135562316d177972f931afec
Signed-off-by: Samuel Holland <samuel at sholland.org>
---
M src/superio/acpi/pnp.asl
M src/superio/acpi/pnp_generic.asl
2 files changed, 24 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/24/20024/1
diff --git a/src/superio/acpi/pnp.asl b/src/superio/acpi/pnp.asl
index b00e490..114dfe9 100644
--- a/src/superio/acpi/pnp.asl
+++ b/src/superio/acpi/pnp.asl
@@ -34,6 +34,8 @@
#define PNP_IO0_LOW_BYTE IO0L
#define PNP_IO1_HIGH_BYTE IO1H
#define PNP_IO1_LOW_BYTE IO1L
+#define PNP_IO2_HIGH_BYTE IO2H
+#define PNP_IO2_LOW_BYTE IO2L
#define PNP_IRQ0 IRQ0
#define PNP_IRQ1 IRQ1
#define PNP_DMA0 DMA0
diff --git a/src/superio/acpi/pnp_generic.asl b/src/superio/acpi/pnp_generic.asl
index 8f8d137..c878827 100644
--- a/src/superio/acpi/pnp_generic.asl
+++ b/src/superio/acpi/pnp_generic.asl
@@ -21,6 +21,7 @@
* Controlled by the following preprocessor defines:
*
* SUPERIO_CHIP_NAME The name of the super i/o chip (unique, required)
+ * SUPERIO_PNP_HID The EisaId string that identifies this device (optional)
* SUPERIO_PNP_LDN The logical device number on the super i/o
* chip for this device (required)
* SUPERIO_PNP_DDN A string literal that identifies the dos device
@@ -32,10 +33,13 @@
* SUPERIO_PNP_PM_LDN The logical device number to access the PM_REG
* bit (required if SUPERIO_PNP_PM_REG is defined)
* SUPERIO_PNP_IO0 The alignment and length of the first PnP i/o
- * resource (comma seperated, e.g. `0x02, 0x08`,
+ * resource (comma separated, e.g. `0x02, 0x08`,
* optional)
* SUPERIO_PNP_IO1 The alignment and length of the second PnP i/o
- * resource (comma seperated, e.g. `0x02, 0x08`,
+ * resource (comma separated, e.g. `0x02, 0x08`,
+ * optional)
+ * SUPERIO_PNP_IO2 The alignment and length of the third PnP i/o
+ * resource (comma separated, e.g. `0x02, 0x08`,
* optional)
* SUPERIO_PNP_IRQ0 If defined, the first PnP IRQ register is enabled
* SUPERIO_PNP_IRQ1 If defined, the second PnP IRQ register is enabled
@@ -53,7 +57,11 @@
#endif
Device (SUPERIO_ID(PN, SUPERIO_PNP_LDN)) {
+ #ifdef SUPERIO_PNP_HID
+ Name (_HID, EisaId (SUPERIO_PNP_HID))
+ #else
Name (_HID, EisaId ("PNP0c02")) /* TODO: Better fitting EisaId? */
+ #endif
Name (_UID, SUPERIO_UID(PN, SUPERIO_PNP_LDN))
#ifdef SUPERIO_PNP_DDN
Name (_DDN, SUPERIO_PNP_DDN)
@@ -96,6 +104,9 @@
#ifdef SUPERIO_PNP_IO1
IO (Decode16, 0x0000, 0x0000, SUPERIO_PNP_IO1, IO1)
#endif
+#ifdef SUPERIO_PNP_IO2
+ IO (Decode16, 0x0000, 0x0000, SUPERIO_PNP_IO2, IO2)
+#endif
#ifdef SUPERIO_PNP_IRQ0
IRQNoFlags (IR0) {}
#endif
@@ -112,6 +123,9 @@
#endif
#ifdef SUPERIO_PNP_IO1
PNP_READ_IO(PNP_IO1, CRS, IO1)
+#endif
+#ifdef SUPERIO_PNP_IO2
+ PNP_READ_IO(PNP_IO2, CRS, IO2)
#endif
#ifdef SUPERIO_PNP_IRQ0
PNP_READ_IRQ(PNP_IRQ0, CRS, IR0)
@@ -135,6 +149,9 @@
#ifdef SUPERIO_PNP_IO1
IO (Decode16, 0x0000, 0x0000, SUPERIO_PNP_IO1, IO1)
#endif
+#ifdef SUPERIO_PNP_IO2
+ IO (Decode16, 0x0000, 0x0000, SUPERIO_PNP_IO2, IO2)
+#endif
#ifdef SUPERIO_PNP_IRQ0
IRQNoFlags (IR0) {}
#endif
@@ -152,6 +169,9 @@
#ifdef SUPERIO_PNP_IO1
PNP_WRITE_IO(PNP_IO1, Arg0, IO1)
#endif
+#ifdef SUPERIO_PNP_IO2
+ PNP_WRITE_IO(PNP_IO2, Arg0, IO2)
+#endif
#ifdef SUPERIO_PNP_IRQ0
PNP_WRITE_IRQ(PNP_IRQ0, Arg0, IR0)
#endif
--
To view, visit https://review.coreboot.org/20024
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idad03f3881e0fbf2135562316d177972f931afec
Gerrit-Change-Number: 20024
Gerrit-PatchSet: 1
Gerrit-Owner: Samuel Holland <samuel at sholland.org>
More information about the coreboot-gerrit
mailing list