summaryrefslogtreecommitdiff
path: root/src/superio/winbond
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-03-29 17:29:48 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-03-31 10:33:10 +0000
commitcfaf4c7ac88c08165ce4f95a0a20186ea6be7522 (patch)
treef3d361812e2f769ebe1a61e88509597bb574ae85 /src/superio/winbond
parent8602fb7f653ba127a3f6e3f277fc44143174feda (diff)
superio/winbond/{w83627hf,w83977tf}: Use macro
Change-Id: I3ac8dd2ba089970a18b460769dfc3fabf9395709 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39907 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/superio/winbond')
-rw-r--r--src/superio/winbond/w83627hf/acpi/superio.asl272
-rw-r--r--src/superio/winbond/w83977tf/acpi/superio.asl2
2 files changed, 138 insertions, 136 deletions
diff --git a/src/superio/winbond/w83627hf/acpi/superio.asl b/src/superio/winbond/w83627hf/acpi/superio.asl
index d5c5ec9026..8f1861259a 100644
--- a/src/superio/winbond/w83627hf/acpi/superio.asl
+++ b/src/superio/winbond/w83627hf/acpi/superio.asl
@@ -43,6 +43,8 @@
* http://www.itox.com/pages/support/wdt/W83627HF.pdf
*/
+#include <superio/acpi/pnp.asl>
+
Device(SIO) {
Name (_HID, EisaId("PNP0A05"))
Name (_STR, Unicode("Winbond W83627HF SuperIO"))
@@ -52,7 +54,7 @@ Device(SIO) {
Mutex(CRMX, 1)
/* SuperIO configuration ports */
- OperationRegion (CREG, SystemIO, 0x2E, 0x02)
+ OperationRegion (CREG, SystemIO, SUPERIO_PNP_BASE, 0x02)
Field (CREG, ByteAcc, NoLock, Preserve)
{
PNP_ADDR_REG, 8,
@@ -137,8 +139,8 @@ Device(SIO) {
Method (_CRS)
{
Return (ResourceTemplate () {
- IO (Decode16, 0x002E, 0x002E, 0x02, 0x01) /* Announce the used I/O ports to the OS */
- IO (Decode16, 0x004E, 0x004E, 0x01, 0x01) /* this port is used in some configurations, so announce it to be sure */
+ /* Announce the used I/O ports to the OS */
+ IO (Decode16, SUPERIO_PNP_BASE, SUPERIO_PNP_BASE, 0x02, 0x01)
})
}
@@ -147,7 +149,7 @@ Device(SIO) {
Parameter is the LDN which should be accessed. Values >= 0xFF mean
no LDN switch should be done.
*/
- Method (ENCM, 1)
+ Method (ENTER_CONFIG_MODE, 1)
{
Acquire (CRMX, 0xFFFF)
Store (0x87, ADDR)
@@ -160,7 +162,7 @@ Device(SIO) {
/* Exit configuration mode (and release mutex)
Method must be run after accessing the configuration region.
*/
- Method (EXCM)
+ Method (EXIT_CONFIG_MODE)
{
Store (0xAA, ADDR)
Release (CRMX)
@@ -168,25 +170,25 @@ Device(SIO) {
/* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */
Method (_PSC) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (IPD, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
/* PM: Switch to D0 by setting IPD low */
Method (_PS0) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, IPD)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
/* PM: Switch to D3 by setting IPD high */
Method (_PS3) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, IPD)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
#ifndef NO_W83627HF_FDC
@@ -199,7 +201,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (0)
+ ENTER_CONFIG_MODE (0)
If (ACTR) {
Store (0x0F, Local0)
}
@@ -207,7 +209,7 @@ Device(SIO) {
{
Store (0x0D, Local0)
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
@@ -217,30 +219,30 @@ Device(SIO) {
Method (_PSC) {
Store(^^_PSC (), Local0)
If (Local0) { Return (Local0) }
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (FDPW, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
/* Disable power saving mode */
Method (_PS0) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, FDPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
/* Enable power saving mode */
Method (_PS3) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, FDPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_DIS)
{
- ENCM (0)
+ ENTER_CONFIG_MODE (0)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS)
@@ -252,10 +254,10 @@ Device(SIO) {
})
/* Get IO port info */
- ENCM (0)
+ ENTER_CONFIG_MODE (0)
Store(IO1L, Local0)
Store(IO1H, Local1)
- EXCM ()
+ EXIT_CONFIG_MODE ()
/* Calculate full IO port address */
Or(ShiftLeft(Local1, 8), Local0, Local0)
@@ -298,11 +300,11 @@ Device(SIO) {
CreateByteField (FDE, 12, FD4)
// Get resources from logical device
- ENCM (0)
+ ENTER_CONFIG_MODE (0)
Store (ACTR, Local0)
Store (IO1H, Local1)
Store (IO1L, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
ShiftLeft(Local1, 8, Local1)
Or(Local1, Local2, Local1)
If (LNot(Local0)) {
@@ -380,11 +382,11 @@ Device(SIO) {
Divide(IOA0, 256, Local0, Local1)
- ENCM (0)
+ ENTER_CONFIG_MODE (0)
Store (Local0, IO1L)
Store (Local1, IO1H)
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -399,10 +401,10 @@ Device(SIO) {
Method (MODE, 1) {
And(Arg0, 0x07, Local0)
- ENCM (1)
+ ENTER_CONFIG_MODE (1)
And(OPT1, 0x3, Local1)
Or(Local1, Local0, OPT1)
- EXCM()
+ EXIT_CONFIG_MODE()
}
Method (_INI)
@@ -410,15 +412,15 @@ Device(SIO) {
/* Deactivate DMA, even if set by BIOS. We don't announce it
through _CRS and it's only useful in ECP mode which we
don't support at the moment. */
- ENCM (1)
+ ENTER_CONFIG_MODE (1)
Store (0x04, DMA0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_STA)
{
Store (0x00, Local0)
- ENCM (1)
+ ENTER_CONFIG_MODE (1)
And(OPT1, 0x3, Local1)
If (ACTR) {
If (LNotEqual(Local1, 2)) {
@@ -431,34 +433,34 @@ Device(SIO) {
{
Store (0x0D, Local0)
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_PSC) {
Store(^^_PSC (), Local0)
If (Local0) { Return (Local0) }
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (PRPW, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
Method (_PS0) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, PRPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_PS3) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, PRPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_DIS) {
- ENCM (1)
+ ENTER_CONFIG_MODE (1)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS)
@@ -475,12 +477,12 @@ Device(SIO) {
CreateWordField (CRS, IRQX._INT, IRQW)
/* Get device settings */
- ENCM (1)
+ ENTER_CONFIG_MODE (1)
Store (IO1L, Local0)
Store (IO1H, Local1)
Store (OPT1, Local2)
Store (IRQ0, Local5)
- EXCM ()
+ EXIT_CONFIG_MODE ()
/* Calculate IO port and modify template */
Or(ShiftLeft(Local1, 8), Local0, Local0)
Store(Local1, IOP0)
@@ -571,7 +573,7 @@ Device(SIO) {
Divide(IOA0, 256, Local0, Local1)
- ENCM (1)
+ ENTER_CONFIG_MODE (1)
/* IO port */
Store (Local0, IO1L)
Store (Local1, IO1H)
@@ -585,7 +587,7 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, IRQ0)
/* Activate */
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -600,7 +602,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (2)
+ ENTER_CONFIG_MODE (2)
If (ACTR) {
Store (0x0F, Local0)
}
@@ -608,35 +610,35 @@ Device(SIO) {
{
Store (0x0D, Local0)
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_PSC) {
Store(^^_PSC (), Local0)
If (Local0) { Return (Local0) }
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (UAPW, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
Method (_PS0) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, UAPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_PS3) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, UAPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_DIS)
{
- ENCM (2)
+ ENTER_CONFIG_MODE (2)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS, 0, Serialized)
@@ -645,11 +647,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
IRQNoFlags (IRQX) {6}
})
- ENCM (2)
+ ENTER_CONFIG_MODE (2)
Store(IO1L, Local0)
Store(IO1H, Local1)
Store(IRQ0, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN)
@@ -702,12 +704,12 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, Local3)
- ENCM (2)
+ ENTER_CONFIG_MODE (2)
Store (Local0, IO1L)
Store (Local1, IO1H)
Store (Local3, IRQ0)
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -722,7 +724,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
If (LNot(And(OPT2, 0x30)))
{
If (ACTR) {
@@ -733,35 +735,35 @@ Device(SIO) {
Store (0x0D, Local0)
}
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_PSC) {
Store(^^_PSC (), Local0)
If (Local0) { Return (Local0) }
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (UBPW, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
Method (_PS0) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, UBPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_PS3) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, UBPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_DIS)
{
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS)
@@ -770,11 +772,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
IRQNoFlags (IRQX) {6}
})
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
Store(IO1L, Local0)
Store(IO1H, Local1)
Store(IRQ0, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN)
@@ -827,12 +829,12 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, Local3)
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
Store (Local0, IO1L)
Store (Local1, IO1H)
Store (Local3, IRQ0)
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -847,7 +849,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
If (And(OPT2, 0x30))
{
If (ACTR) {
@@ -858,35 +860,35 @@ Device(SIO) {
Store (0x0D, Local0)
}
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_PSC) {
Store(^^_PSC (), Local0)
If (Local0) { Return (Local0) }
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (UBPW, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
Method (_PS0) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, UBPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_PS3) {
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, UBPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_DIS)
{
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS)
@@ -895,11 +897,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
IRQNoFlags (IRQX) {6}
})
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
Store(IO1H, Local1)
Store(IO1L, Local0)
Store(IRQ0, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN)
@@ -952,12 +954,12 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, Local3)
- ENCM (3)
+ ENTER_CONFIG_MODE (3)
Store (Local0, IO1L)
Store (Local1, IO1H)
Store (Local3, IRQ0)
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -973,7 +975,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (6)
+ ENTER_CONFIG_MODE (6)
If (ACTR) {
Store (0x0F, Local0)
}
@@ -981,15 +983,15 @@ Device(SIO) {
{
Store (0x0D, Local0)
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_DIS)
{
- ENCM (6)
+ ENTER_CONFIG_MODE (6)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS)
@@ -998,11 +1000,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x08, IO0)
IRQNoFlags (IRQX) {6}
})
- ENCM (6)
+ ENTER_CONFIG_MODE (6)
Store(IO1L, Local0)
Store(IO1H, Local1)
Store(IRQ0, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN)
@@ -1039,12 +1041,12 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, Local3)
- ENCM (6)
+ ENTER_CONFIG_MODE (6)
Store (Local0, IO1L)
Store (Local1, IO1H)
Store (Local3, IRQ0)
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -1059,7 +1061,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
If (ACTR) {
Store (0x0F, Local0)
}
@@ -1071,15 +1073,15 @@ Device(SIO) {
Store (0x0D, Local0)
#endif
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_DIS)
{
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
Store (Zero, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Notify(PS2M, 1)
}
@@ -1090,13 +1092,13 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1)
})
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
Store(IO1L, Local0)
Store(IO1H, Local1)
Store(IO2L, Local2)
Store(IO2H, Local3)
Store(IRQ0, Local4)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
Or(ShiftLeft(Local3, 8), Local2, Local2)
@@ -1144,14 +1146,14 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, Local4)
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
Store (Local0, IO1L)
Store (Local1, IO1H)
Store (Local2, IO2L)
Store (Local3, IO2H)
Store (Local4, IRQ0)
Store (One, ACTR)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Notify(PS2M, 1)
}
}
@@ -1164,7 +1166,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
If (LAnd(ACTR, IRQ1) ) {
Store (0x0F, Local0)
}
@@ -1176,15 +1178,15 @@ Device(SIO) {
Store (0x0D, Local0)
#endif
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
Method (_DIS)
{
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
Store (Zero, IRQ1)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS, 0, Serialized)
@@ -1192,9 +1194,9 @@ Device(SIO) {
Name (CRS, ResourceTemplate () {
IRQNoFlags (IRQX) {}
})
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
Store(IRQ1, Local4)
- EXCM ()
+ EXIT_CONFIG_MODE ()
CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local5)
@@ -1223,10 +1225,10 @@ Device(SIO) {
Subtract(FindSetLeftBit (IRQL), 1, Local0)
- ENCM (5)
+ ENTER_CONFIG_MODE (5)
Store (Local0, IRQ1)
/* Only activates if KBD is active */
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
}
#endif
@@ -1242,7 +1244,7 @@ Device(SIO) {
Method (_STA) {
Store(0, Local0)
- ENCM (7)
+ ENTER_CONFIG_MODE (7)
If (LOr(IO1L, IO1H)) {
If (LOr(ACTR, ACT1)) {
Store (0x0F, Local0)
@@ -1251,7 +1253,7 @@ Device(SIO) {
Store (0x0D, Local0)
}
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
@@ -1261,11 +1263,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO0)
IRQNoFlags (IRQX) {}
})
- ENCM (7)
+ ENTER_CONFIG_MODE (7)
Store(IO1L, Local0)
Store(IO1H, Local1)
Store(IRQ0, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
@@ -1297,7 +1299,7 @@ Device(SIO) {
Method (_STA)
{
Store(0, Local0)
- ENCM (7)
+ ENTER_CONFIG_MODE (7)
If (LOr(IO2L, IO2H)) {
If (LOr(ACTR, ACT2)) {
Store (0x0F, Local0)
@@ -1306,7 +1308,7 @@ Device(SIO) {
Store (0x0D, Local0)
}
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
@@ -1316,11 +1318,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x02, 0x02, IO0)
IRQNoFlags (IRQX) {}
})
- ENCM (7)
+ ENTER_CONFIG_MODE (7)
Store(IO2L, Local0)
Store(IO2H, Local1)
Store(IRQ1, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
@@ -1344,21 +1346,21 @@ Device(SIO) {
/* ==== Suspend LED control if it is connected to the SuperIO ==== */
Method (SLED, 1)
{
- ENCM (9)
+ ENTER_CONFIG_MODE (9)
Store(OPT4, Local0)
And(Local0, 63, Local0)
Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
/* ===== Power LED control if it is connected to the SuperIO ===== */
Method (PLED, 1)
{
- ENCM (8)
+ ENTER_CONFIG_MODE (8)
Store(OPT4, Local0)
And(Local0, 63, Local0)
Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
#ifndef NO_W83627HF_HWMON
@@ -1372,7 +1374,7 @@ Device(SIO) {
Method (_STA)
{
Store (0x00, Local0)
- ENCM (11)
+ ENTER_CONFIG_MODE (11)
If (ACTR) {
Store (0x0F, Local0)
}
@@ -1380,7 +1382,7 @@ Device(SIO) {
{
Store (0x0D, Local0)
}
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
@@ -1388,25 +1390,25 @@ Device(SIO) {
{
Store(^^_PSC (), Local0)
If (Local0) { Return (Local0) }
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (HWPW, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }
Else { Return (0) }
}
Method (_PS0)
{
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, HWPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_PS3)
{
- ENCM (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, HWPW)
- EXCM ()
+ EXIT_CONFIG_MODE ()
}
Method (_CRS, 0, Serialized)
@@ -1415,11 +1417,11 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x08, 0x02, IO0)
IRQNoFlags (IRQX) {}
})
- ENCM (11)
+ ENTER_CONFIG_MODE (11)
Store(IO1L, Local0)
Store(IO1H, Local1)
Store(IRQ1, Local2)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0)
@@ -1449,9 +1451,9 @@ Device(SIO) {
*/
Method (WAKS)
{
- ENCM (10)
+ ENTER_CONFIG_MODE (10)
Store (CRE3, Local0)
- EXCM ()
+ EXIT_CONFIG_MODE ()
Return (Local0)
}
}
diff --git a/src/superio/winbond/w83977tf/acpi/superio.asl b/src/superio/winbond/w83977tf/acpi/superio.asl
index c7a62cddd1..0a37ac9908 100644
--- a/src/superio/winbond/w83977tf/acpi/superio.asl
+++ b/src/superio/winbond/w83977tf/acpi/superio.asl
@@ -74,7 +74,7 @@ IndexField (PNP_ADDR_REG, PNP_DATA_REG, ByteAcc, NoLock, Preserve)
/* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */
Method (_PSC) {
- ENTER_CONFIG_MODE (0xFF)
+ ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (IPD, Local0)
EXIT_CONFIG_MODE ()
If (Local0) { Return (3) }