summaryrefslogtreecommitdiff
path: root/src/superio/acpi/pnp.asl
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2013-07-01 16:29:16 +0200
committerRonald G. Minnich <rminnich@gmail.com>2013-07-03 17:58:20 +0200
commitdd94fa93b403a73cc7d7b282eb6cefeb27512d13 (patch)
tree04177e49f21a1bfb9c2278ccd8fb2374371c0d90 /src/superio/acpi/pnp.asl
parent1c81128dcd3a723f75d554b0a8d87101d7dd3663 (diff)
downloadcoreboot-dd94fa93b403a73cc7d7b282eb6cefeb27512d13.tar.xz
winbond/w83627dhg: Fix logical device power down in ACPI
The W83627DHG has some power managements bits to power down individual logical devices. These are called `* Power Down`. Counterintuitively and in contrast to `Immediate Power Down` (bit to power down the whole chip), these bits are set when the respective logical device is powered. Unfortunately, our ACPI code set them wrong which led to disabled devices after a S3 suspend/resume. Adding an option how to set the PM bits and setting them to zero for the W83627DHG, corrects it. Tested with kontron/ktqm77. Change-Id: I8a472d480d4277721bd17c9f7c2ce44fa84e8ae2 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/3590 Tested-by: build bot (Jenkins) Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Diffstat (limited to 'src/superio/acpi/pnp.asl')
-rw-r--r--src/superio/acpi/pnp.asl12
1 files changed, 6 insertions, 6 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 ()