summaryrefslogtreecommitdiff
path: root/src/superio/acpi
diff options
context:
space:
mode:
Diffstat (limited to 'src/superio/acpi')
-rw-r--r--src/superio/acpi/pnp.asl12
-rw-r--r--src/superio/acpi/pnp_generic.asl8
-rw-r--r--src/superio/acpi/pnp_uart.asl10
3 files changed, 17 insertions, 13 deletions
diff --git a/src/superio/acpi/pnp.asl b/src/superio/acpi/pnp.asl
index ba3882a619..0637c04894 100644
--- a/src/superio/acpi/pnp.asl
+++ b/src/superio/acpi/pnp.asl
@@ -90,25 +90,25 @@
* PM_LDN The logical device number to access the PM_REG
* bit
*/
-#define PNP_GENERIC_PSC(PM_REG, PM_LDN) \
+#define PNP_GENERIC_PSC(PM_REG, PM_VAL, PM_LDN) \
Store(^^_PSC (), Local0)\
If (Local0) { Return (Local0) }\
ENTER_CONFIG_MODE (PM_LDN)\
Store (PM_REG, Local0)\
EXIT_CONFIG_MODE ()\
- If (Local0) { Return (1) }\
+ If (LEqual(Local0, PM_VAL)) { Return (1) }\
Else { Return (0) }\
/* Disable power saving mode */
-#define PNP_GENERIC_PS0(PM_REG, PM_LDN) \
+#define PNP_GENERIC_PS0(PM_REG, PM_VAL, PM_LDN) \
ENTER_CONFIG_MODE (PM_LDN)\
- Store (Zero, PM_REG)\
+ Store (Not(PM_VAL), PM_REG)\
EXIT_CONFIG_MODE ()
/* Enable power saving mode */
-#define PNP_GENERIC_PS1(PM_REG, PM_LDN) \
+#define PNP_GENERIC_PS1(PM_REG, PM_VAL, PM_LDN) \
ENTER_CONFIG_MODE (PM_LDN)\
- Store (One, PM_REG)\
+ Store (PM_VAL, PM_REG)\
EXIT_CONFIG_MODE ()
diff --git a/src/superio/acpi/pnp_generic.asl b/src/superio/acpi/pnp_generic.asl
index f7a9b13099..74fd028bbe 100644
--- a/src/superio/acpi/pnp_generic.asl
+++ b/src/superio/acpi/pnp_generic.asl
@@ -31,6 +31,8 @@
* name (DDN) of this device (e.g. "COM1", optional)
* SUPERIO_PNP_PM_REG Identifier of a 1-bit register to power down
* the logical device (optional)
+ * SUPERIO_PNP_PM_VAL The value for SUPERIO_PNP_PM_REG to power the logical
+ * device down (required if SUPERIO_PNP_PM_REG is defined)
* 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
@@ -73,15 +75,15 @@ Device (SUPERIO_ID(PN, SUPERIO_PNP_LDN)) {
#ifdef SUPERIO_PNP_PM_REG
Method (_PSC) {
- PNP_GENERIC_PSC(SUPERIO_PNP_PM_REG, SUPERIO_PNP_PM_LDN)
+ PNP_GENERIC_PSC(SUPERIO_PNP_PM_REG, SUPERIO_PNP_PM_VAL, SUPERIO_PNP_PM_LDN)
}
Method (_PS0) {
- PNP_GENERIC_PS0(SUPERIO_PNP_PM_REG, SUPERIO_PNP_PM_LDN)
+ PNP_GENERIC_PS0(SUPERIO_PNP_PM_REG, SUPERIO_PNP_PM_VAL, SUPERIO_PNP_PM_LDN)
}
Method (_PS1) {
- PNP_GENERIC_PS1(SUPERIO_PNP_PM_REG, SUPERIO_PNP_PM_LDN)
+ PNP_GENERIC_PS1(SUPERIO_PNP_PM_REG, SUPERIO_PNP_PM_VAL, SUPERIO_PNP_PM_LDN)
}
#else
Method (_PSC) {
diff --git a/src/superio/acpi/pnp_uart.asl b/src/superio/acpi/pnp_uart.asl
index c826106ea8..8ddecbfe61 100644
--- a/src/superio/acpi/pnp_uart.asl
+++ b/src/superio/acpi/pnp_uart.asl
@@ -32,7 +32,9 @@
* name (DDN) of this uart (e.g. "COM1", optional)
* SUPERIO_UART_PM_REG Identifier of a 1-bit register to power down
* the UART (optional)
- * SUPERIO_UART_PM_LDN The logical device number to access the PM_REG
+ * SUPERIO_UART_PM_VAL The value for SUPERIO_UART_PM_REG to power the logical
+ * device down (required if SUPERIO_UART_PM_REG is defined)
+ * SUPERIO_UART_PM_LDN The logical device number to access the PM_REG
* bit (required if SUPERIO_UART_PM_REG is defined)
*/
@@ -65,15 +67,15 @@ Device (SUPERIO_ID(SER, SUPERIO_UART_LDN)) {
#ifdef SUPERIO_UART_PM_REG
Method (_PSC) {
- PNP_GENERIC_PSC(SUPERIO_UART_PM_REG, SUPERIO_UART_PM_LDN)
+ PNP_GENERIC_PSC(SUPERIO_UART_PM_REG, SUPERIO_UART_PM_VAL, SUPERIO_UART_PM_LDN)
}
Method (_PS0) {
- PNP_GENERIC_PS0(SUPERIO_UART_PM_REG, SUPERIO_UART_PM_LDN)
+ PNP_GENERIC_PS0(SUPERIO_UART_PM_REG, SUPERIO_UART_PM_VAL, SUPERIO_UART_PM_LDN)
}
Method (_PS1) {
- PNP_GENERIC_PS1(SUPERIO_UART_PM_REG, SUPERIO_UART_PM_LDN)
+ PNP_GENERIC_PS1(SUPERIO_UART_PM_REG, SUPERIO_UART_PM_VAL, SUPERIO_UART_PM_LDN)
}
#else
Method (_PSC) {