HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45994 )
Change subject: superio/winbond/*/acpi: Convert superio.asl to ASL 2.0 syntax ......................................................................
superio/winbond/*/acpi: Convert superio.asl to ASL 2.0 syntax
Change-Id: I67e08a1099e41acb7031469069d9eddb274f7735 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/superio/winbond/w83627dhg/acpi/superio.asl M src/superio/winbond/w83627hf/acpi/superio.asl M src/superio/winbond/w83977tf/acpi/superio.asl 3 files changed, 312 insertions(+), 303 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/94/45994/1
diff --git a/src/superio/winbond/w83627dhg/acpi/superio.asl b/src/superio/winbond/w83627dhg/acpi/superio.asl index 4667b13..298e9a7 100644 --- a/src/superio/winbond/w83627dhg/acpi/superio.asl +++ b/src/superio/winbond/w83627dhg/acpi/superio.asl @@ -111,7 +111,7 @@ /* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */ Method (_PSC) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (IPD, Local0) + Local0 = IPD EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } @@ -120,14 +120,14 @@ /* PM: Switch to D0 by setting IPD low */ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, IPD) + IPD = 0 EXIT_CONFIG_MODE () }
/* PM: Switch to D3 by setting IPD high */ Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, IPD) + IPD = 1 EXIT_CONFIG_MODE () }
@@ -145,10 +145,10 @@ #define SUPERIO_SUSL_LDN 9 Method (SUSL, 1, Serialized) { ENTER_CONFIG_MODE (SUPERIO_SUSL_LDN) - Store (SULM, Local0) - And (Local0, 0x1f, Local0) - Or (Local0, ShiftLeft (Arg0, 5), Local0) - Store (Local0, SULM) + Local0 = SULM + Local0 &= 0x1f + Local0 |= (Arg0 << 5) + SULM = Local0 EXIT_CONFIG_MODE () }
diff --git a/src/superio/winbond/w83627hf/acpi/superio.asl b/src/superio/winbond/w83627hf/acpi/superio.asl index 1f92df9..ccf4c93 100644 --- a/src/superio/winbond/w83627hf/acpi/superio.asl +++ b/src/superio/winbond/w83627hf/acpi/superio.asl @@ -151,10 +151,10 @@ Method (ENTER_CONFIG_MODE, 1) { Acquire (CRMX, 0xFFFF) - Store (0x87, ADDR) - Store (0x87, ADDR) - If (LLess(Arg0, 0xFF)) { - Store(Arg0, LDN) + ADDR = 0x87 + ADDR = 0x87 + If (Arg0 < 0xFF) { + LDN = Arg0 } }
@@ -163,14 +163,14 @@ */ Method (EXIT_CONFIG_MODE) { - Store (0xAA, ADDR) + ADDR = 0xAA Release (CRMX) }
/* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */ Method (_PSC) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (IPD, Local0) + Local0 = IPD EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } @@ -179,14 +179,14 @@ /* PM: Switch to D0 by setting IPD low */ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, IPD) + IPD = 0 EXIT_CONFIG_MODE () }
/* PM: Switch to D3 by setting IPD high */ Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, IPD) + IPD = 1 EXIT_CONFIG_MODE () }
@@ -199,14 +199,14 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (0) If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } EXIT_CONFIG_MODE () Return (Local0) @@ -216,10 +216,10 @@ * 2 if whole chip is powered down), 0 else */ Method (_PSC) { - Store(^^_PSC (), Local0) + Local0 = ^^_PSC () If (Local0) { Return (Local0) } ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (FDPW, Local0) + Local0 = FDPW EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } @@ -227,20 +227,20 @@ /* Disable power saving mode */ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, FDPW) + FDPW = 1 EXIT_CONFIG_MODE () } /* Enable power saving mode */ Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, FDPW) + FDPW = 0 EXIT_CONFIG_MODE () }
Method (_DIS) { ENTER_CONFIG_MODE (0) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () }
@@ -254,18 +254,18 @@
/* Get IO port info */ ENTER_CONFIG_MODE (0) - Store(IO1L, Local0) - Store(IO1H, Local1) + Local0 = IO1L + Local1 = IO1H EXIT_CONFIG_MODE ()
/* Calculate full IO port address */ - Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
/* Modify the resource template and return it */ CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMIN) - Store (Local0, IMAX) + IMIN = Local0 + IMAX = Local0 Return (CRS) }
@@ -300,13 +300,13 @@
// Get resources from logical device ENTER_CONFIG_MODE (0) - Store (ACTR, Local0) - Store (IO1H, Local1) - Store (IO1L, Local2) + Local0 = ACTR + Local1 = IO1H + Local2 = IO1L EXIT_CONFIG_MODE () - ShiftLeft(Local1, 8, Local1) - Or(Local1, Local2, Local1) - If (LNot(Local0)) { + Local1 <<= 8 + Local1 |= Local2 + If (!Local0) { Return (FDE) }
@@ -338,30 +338,30 @@ SIFR, 8 }
- Store(One, ACT1) - Store(0, SELE) + ACT1 = 1 + SELE = 0 Sleep(0x64) - If (SIFR) { Store (One, FD1) } + If (SIFR) { FD1 = 1 }
- Store(Zero, ACT1) - Store(One, ACT2) - Store(1, SELE) + ACT1 = 0 + ACT2 = 1 + SELE = 1 Sleep(0x64) - If (SIFR) { Store (One, FD2) } + If (SIFR) { FD2 = 1 }
- Store(Zero, ACT2) - Store(One, ACT3) - Store(2, SELE) + ACT2 = 0 + ACT3 = 1 + SELE = 2 Sleep(0x64) - If (SIFR) { Store (One, FD3) } + If (SIFR) { FD3 = 1 }
- Store(Zero, ACT3) - Store(One, ACT4) - Store(3, SELE) + ACT3 = 0 + ACT4 = 1 + SELE = 3 Sleep(0x64) - If (SIFR) { Store (One, FD4) } - Store(Zero, ACT4) - Store(Zero, SELE) + If (SIFR) { FD4 = 1 } + ACT4 = 0 + SELE = 0
Return (FDE) } @@ -379,12 +379,13 @@ CreateByteField (Arg0, IRQ0._INT, IRQL) CreateByteField (Arg0, DMA0._DMA, DMCH)
- Divide(IOA0, 256, Local0, Local1) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256
ENTER_CONFIG_MODE (0) - Store (Local0, IO1L) - Store (Local1, IO1H) - Store (One, ACTR) + IO1L = Local0 + IO1H = Local1 + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -399,10 +400,10 @@ Name (_UID, "w83627hf-pport")
Method (MODE, 1) { - And(Arg0, 0x07, Local0) + Local0 = Arg0 & 0x07 ENTER_CONFIG_MODE (1) - And(OPT1, 0x3, Local1) - Or(Local1, Local0, OPT1) + Local1 = OPT1 & 0x3 + OPT1 = Local1 | Local0 EXIT_CONFIG_MODE() }
@@ -412,53 +413,53 @@ through _CRS and it's only useful in ECP mode which we don't support at the moment. */ ENTER_CONFIG_MODE (1) - Store (0x04, DMA0) + DMA0 = 0x04 EXIT_CONFIG_MODE () }
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (1) - And(OPT1, 0x3, Local1) + Local1 = OPT1 & 0x3 If (ACTR) { - If (LNotEqual(Local1, 2)) { - Store (0x0D, Local0) + If (Local1 != 2) { + Local0 = 0x0D } Else { - Store (0x0D, Local0) + Local0 = 0x0D /* FIXME: same branches */ } } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } EXIT_CONFIG_MODE () Return (Local0) }
Method (_PSC) { - Store(^^_PSC (), Local0) + Local0 = ^^_PSC () If (Local0) { Return (Local0) } ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (PRPW, Local0) + Local0 = PRPW EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, PRPW) + PRPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, PRPW) + PRPW = 0 EXIT_CONFIG_MODE () }
Method (_DIS) { ENTER_CONFIG_MODE (1) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () }
@@ -477,33 +478,33 @@
/* Get device settings */ ENTER_CONFIG_MODE (1) - Store (IO1L, Local0) - Store (IO1H, Local1) - Store (OPT1, Local2) - Store (IRQ0, Local5) + Local0 = IO1L + Local1 = IO1H + Local2 = OPT1 + Local5 = IRQ0 EXIT_CONFIG_MODE () /* Calculate IO port and modify template */ - Or(ShiftLeft(Local1, 8), Local0, Local0) - Store(Local1, IOP0) - Store(Local1, IOR0) + Local0 |= (Local1 << 8) + IOP0 = Local1 + IOR0 = Local1
/* Set align and length based on active parallel port mode */ - And(Local2, 0x3, Local3) - And(Local2, 0x4, Local4) + Local3 = Local2 & 0x3 + Local4 = Local2 & 0x4 If (Local4) { - Store(0x04, IOAL) + IOAL = 0x04 } - If (LEqual (Local0, 0xBC)) + If (Local0 == 0xBC) { - Store (0x04, IOLE) + IOLE = 0x04 } Else { - Store (0x08, IOLE) + IOLE = 0x08 } /* Calculate IRQ bitmap */ - Store (One, Local0) - ShiftLeft (Local0, Local5, IRQW) + Local0 = 1 + IRQW = Local0 << Local5 /* Return resource template */ Return (CRS) } @@ -564,28 +565,29 @@ CreateByteField (Arg0, IO0._LEN, IOLE) CreateWordField (Arg0, IRQX._INT, IRQL)
- If (LEqual(IOAL, 4)) { - Store(0x0, Local2) + If (IOAL == 4) { + Local2 = 0x0 } else { - Store(0x1, Local2) + Local2 = 0x1 }
- Divide(IOA0, 256, Local0, Local1) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256
ENTER_CONFIG_MODE (1) /* IO port */ - Store (Local0, IO1L) - Store (Local1, IO1H) + IO1L = Local0 + IO1H = Local1 /* Mode */ - Store (OPT1, Local3) - And (Local3, 0xF8, Local3) - Or (Local2, Local3, OPT1) + Local3 = OPT1 + Local3 &= 0xF8 + OPT1 = Local2 | Local3 /* DMA off */ - Store (0x04, DMA0) + DMA0 = 0x04 /* IRQ */ - Subtract(FindSetLeftBit (IRQL), 1, IRQ0) + IRQ0 = FindSetLeftBit (IRQL) - 1 /* Activate */ - Store (One, ACTR) + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -600,43 +602,43 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (2) If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } EXIT_CONFIG_MODE () Return (Local0) }
Method (_PSC) { - Store(^^_PSC (), Local0) + Local0 = ^^_PSC () If (Local0) { Return (Local0) } ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (UAPW, Local0) + Local0 = UAPW EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, UAPW) + UAPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, UAPW) + UAPW = 0 EXIT_CONFIG_MODE () }
Method (_DIS) { ENTER_CONFIG_MODE (2) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () }
@@ -647,20 +649,20 @@ IRQNoFlags (IRQX) {6} }) ENTER_CONFIG_MODE (2) - Store(IO1L, Local0) - Store(IO1H, Local1) - Store(IRQ0, Local2) + Local0 = IO1L + Local1 = IO1H + Local2 = IRQ0 EXIT_CONFIG_MODE () - Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) - Store (Local0, IMIN) + IMIN = Local0 CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMAX) + IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2
Return (CRS) } @@ -699,15 +701,16 @@ CreateWordField (Arg0, IO0._MIN, IOA0) CreateWordField (Arg0, IRQX._INT, IRQL)
- Divide(IOA0, 256, Local0, Local1) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256
- Subtract(FindSetLeftBit (IRQL), 1, Local3) + Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (2) - Store (Local0, IO1L) - Store (Local1, IO1H) - Store (Local3, IRQ0) - Store (One, ACTR) + IO1L = Local0 + IO1H = Local1 + Local3 = Local3 + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -722,16 +725,17 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (3) - If (LNot(And(OPT2, 0x30))) + If (!(OPT2 & 0x30)) { If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F + } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } } EXIT_CONFIG_MODE () @@ -739,29 +743,29 @@ }
Method (_PSC) { - Store(^^_PSC (), Local0) + Local0 = ^^_PSC () If (Local0) { Return (Local0) } ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (UBPW, Local0) + Local0 = UBPW EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, UBPW) + UBPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, UBPW) + UBPW = 0 EXIT_CONFIG_MODE () }
Method (_DIS) { ENTER_CONFIG_MODE (3) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () }
@@ -772,20 +776,20 @@ IRQNoFlags (IRQX) {6} }) ENTER_CONFIG_MODE (3) - Store(IO1L, Local0) - Store(IO1H, Local1) - Store(IRQ0, Local2) + Local0 = IO1L + Local1 = IO1H + Local2 = IRQ0 EXIT_CONFIG_MODE () - Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) - Store (Local0, IMIN) + IMIN = Local0 CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMAX) + IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2
Return (CRS) } @@ -824,15 +828,16 @@ CreateWordField (Arg0, IO0._MIN, IOA0) CreateByteField (Arg0, IRQX._INT, IRQL)
- Divide(IOA0, 256, Local0, Local1) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256
- Subtract(FindSetLeftBit (IRQL), 1, Local3) + Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (3) - Store (Local0, IO1L) - Store (Local1, IO1H) - Store (Local3, IRQ0) - Store (One, ACTR) + IO1L = Local0 + IO1H = Local1 + IRQ0 = Local3 + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -847,16 +852,16 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (3) - If (And(OPT2, 0x30)) + If (OPT2 & 0x30) { If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } } EXIT_CONFIG_MODE () @@ -864,29 +869,29 @@ }
Method (_PSC) { - Store(^^_PSC (), Local0) + Local0 = ^^_PSC () If (Local0) { Return (Local0) } ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (UBPW, Local0) + Local0 = UBPW EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } } Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, UBPW) + UBPW = 1 EXIT_CONFIG_MODE () } Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, UBPW) + UBPW = 0 EXIT_CONFIG_MODE () }
Method (_DIS) { ENTER_CONFIG_MODE (3) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () }
@@ -897,20 +902,20 @@ IRQNoFlags (IRQX) {6} }) ENTER_CONFIG_MODE (3) - Store(IO1H, Local1) - Store(IO1L, Local0) - Store(IRQ0, Local2) + Local1 = IO1H + Local0 = IO1L + Local2 = IRQ0 EXIT_CONFIG_MODE () - Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) - Store (Local0, IMIN) + IMIN = Local0 CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMAX) + IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2
Return (CRS) } @@ -949,15 +954,16 @@ CreateWordField (Arg0, IO0._MIN, IOA0) CreateByteField (Arg0, IRQX._INT, IRQL)
- Divide(IOA0, 256, Local0, Local1) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256
- Subtract(FindSetLeftBit (IRQL), 1, Local3) + Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (3) - Store (Local0, IO1L) - Store (Local1, IO1H) - Store (Local3, IRQ0) - Store (One, ACTR) + IO1L = Local0 + IO1H = Local1 + IRQ0 = Local3 + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -973,14 +979,14 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (6) If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } EXIT_CONFIG_MODE () Return (Local0) @@ -989,7 +995,7 @@ Method (_DIS) { ENTER_CONFIG_MODE (6) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () }
@@ -1000,20 +1006,20 @@ IRQNoFlags (IRQX) {6} }) ENTER_CONFIG_MODE (6) - Store(IO1L, Local0) - Store(IO1H, Local1) - Store(IRQ0, Local2) + Local0 = IO1L + Local1 = IO1H + Local2 = IRQ0 EXIT_CONFIG_MODE () - Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) - Store (Local0, IMIN) + IMIN = Local0 CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMAX) + IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2
Return (CRS) } @@ -1036,15 +1042,16 @@ CreateWordField (Arg0, IO0._MIN, IOA0) CreateByteField (Arg0, IRQX._INT, IRQL)
- Divide(IOA0, 256, Local0, Local1) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256
- Subtract(FindSetLeftBit (IRQL), 1, Local3) + Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (6) - Store (Local0, IO1L) - Store (Local1, IO1H) - Store (Local3, IRQ0) - Store (One, ACTR) + IO1L = Local0 + IO1H = Local1 + IRQ0 = Local3 + ACTR = 1 EXIT_CONFIG_MODE () } } @@ -1059,17 +1066,17 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (5) If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F } - ElseIf (Lor(LOr (IO1H, IO1L), LOr (IO2H, IO2L))) + ElseIf (IO1H || IO1L || IO2H ||IO2L) { #ifdef W83627HF_KBC_COMPAT - Store (0x0F, Local0) + Local0 = 0x0F #else - Store (0x0D, Local0) + Local0 = 0x0D #endif } EXIT_CONFIG_MODE () @@ -1079,7 +1086,7 @@ Method (_DIS) { ENTER_CONFIG_MODE (5) - Store (Zero, ACTR) + ACTR = 0 EXIT_CONFIG_MODE () Notify(PS2M, 1) } @@ -1092,29 +1099,29 @@ IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1) }) ENTER_CONFIG_MODE (5) - Store(IO1L, Local0) - Store(IO1H, Local1) - Store(IO2L, Local2) - Store(IO2H, Local3) - Store(IRQ0, Local4) + Local0 = IO1L + Local1 = IO1H + Local2 = IO2L + Local3 = IO2H + Local4 = IRQ0 EXIT_CONFIG_MODE ()
- Or(ShiftLeft(Local1, 8), Local0, Local0) - Or(ShiftLeft(Local3, 8), Local2, Local2) + Local0 |= (Local1 << 8) + Local2 |= (Local3 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) - Store (Local0, IMIN) + IMIN = Local0 CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMAX) + IMAX = Local0
CreateWordField (CRS, IO1._MIN, I1MI) - Store (Local2, I1MI) + I1MI = Local2 CreateWordField (CRS, IO1._MAX, I1MA) - Store (Local2, I1MA) + I1MA = Local2
CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local5) - ShiftLeft (Local5, Local4, IRQW) + Local5 = 1 + IRQW = Local5 << Local4
Return (CRS) } @@ -1140,18 +1147,20 @@ CreateWordField (Arg0, IO1._MIN, IOA1) CreateWordField (Arg0, IRQX._INT, IRQL)
- Divide(IOA0, 256, Local0, Local1) - Divide(IOA1, 256, Local2, Local3) + Local1 = IOA0 / 256 + Local0 = IOA0 % 256 + Local3 = IOA0 / 256 + Local2 = IOA0 % 256
- Subtract(FindSetLeftBit (IRQL), 1, Local4) + Local4 = FindSetLeftBit (IRQL) -1
ENTER_CONFIG_MODE (5) - Store (Local0, IO1L) - Store (Local1, IO1H) - Store (Local2, IO2L) - Store (Local3, IO2H) - Store (Local4, IRQ0) - Store (One, ACTR) + IO1L = Local0 + IO1H = Local1 + IO2L = Local2 + IO2H = Local3 + IRQ0 = Local4 + ACTR = 1 EXIT_CONFIG_MODE () Notify(PS2M, 1) } @@ -1164,17 +1173,17 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (5) - If (LAnd(ACTR, IRQ1) ) { - Store (0x0F, Local0) + If (ACTR && IRQ1) { + Local0 = 0x0F } - ElseIf (Lor(LOr (IO1H, IO1L), LOr (IO2H, IO2L))) + ElseIf ((IO1H ||IO1L) || (IO2H || IO2L)) { #ifdef W83627HF_KBC_COMPAT - Store (0x0F, Local0) + Local0 = 0x0F #else - Store (0x0D, Local0) + Local0 = 0x0D #endif } EXIT_CONFIG_MODE () @@ -1184,7 +1193,7 @@ Method (_DIS) { ENTER_CONFIG_MODE (5) - Store (Zero, IRQ1) + IRQ1 = 0 EXIT_CONFIG_MODE () }
@@ -1194,12 +1203,12 @@ IRQNoFlags (IRQX) {} }) ENTER_CONFIG_MODE (5) - Store(IRQ1, Local4) + Local4 = IRQ1 EXIT_CONFIG_MODE ()
CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local5) - ShiftLeft (Local5, Local4, IRQW) + Local5 = 1 + IRQW = Local5 << Local4
Return (CRS) } @@ -1222,10 +1231,10 @@ }) CreateWordField (Arg0, IRQX._INT, IRQL)
- Subtract(FindSetLeftBit (IRQL), 1, Local0) + Local0 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (5) - Store (Local0, IRQ1) + IRQ1 = Local0 /* Only activates if KBD is active */ EXIT_CONFIG_MODE () } @@ -1242,14 +1251,14 @@ Name (_UID, "w83627hf-game")
Method (_STA) { - Store(0, Local0) + Local0 = 0 ENTER_CONFIG_MODE (7) - If (LOr(IO1L, IO1H)) { - If (LOr(ACTR, ACT1)) { - Store (0x0F, Local0) + If (IO1L || IO1H) { + If (ACTR || ACT1) { + Local0 = 0x0F } Else { - Store (0x0D, Local0) + Local0 = 0x0D } } EXIT_CONFIG_MODE () @@ -1263,22 +1272,22 @@ IRQNoFlags (IRQX) {} }) ENTER_CONFIG_MODE (7) - Store(IO1L, Local0) - Store(IO1H, Local1) - Store(IRQ0, Local2) + Local0 = IO1L + Local1 = IO1H + Local2 = IRQ0 EXIT_CONFIG_MODE ()
- Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMIN) - Store (Local0, IMAX) + IMIN = Local0 + IMAX = Local0
If (Local2) { CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2 }
Return (CRS) @@ -1297,14 +1306,14 @@
Method (_STA) { - Store(0, Local0) + Local0 = 0 ENTER_CONFIG_MODE (7) - If (LOr(IO2L, IO2H)) { - If (LOr(ACTR, ACT2)) { - Store (0x0F, Local0) + If ((IO2L || IO2H)) { + If ((ACTR || ACT2)) { + Local0 = 0x0F } Else { - Store (0x0D, Local0) + Local0 = 0x0D } } EXIT_CONFIG_MODE () @@ -1318,22 +1327,22 @@ IRQNoFlags (IRQX) {} }) ENTER_CONFIG_MODE (7) - Store(IO2L, Local0) - Store(IO2H, Local1) - Store(IRQ1, Local2) + Local0 = IO2L + Local1 = IO2H + Local2 = IRQ1 EXIT_CONFIG_MODE ()
- Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMIN) - Store (Local0, IMAX) + IMIN = Local0 + IMAX = Local0
If (Local2) { CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2 }
Return (CRS) @@ -1346,9 +1355,9 @@ Method (SLED, 1) { ENTER_CONFIG_MODE (9) - Store(OPT4, Local0) - And(Local0, 63, Local0) - Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4) + Local0 = OPT4 + Local0 &= 63 + OPT4 = Local0 | ((Arg0 & 0x03) << 6) EXIT_CONFIG_MODE () }
@@ -1356,9 +1365,9 @@ Method (PLED, 1) { ENTER_CONFIG_MODE (8) - Store(OPT4, Local0) - And(Local0, 63, Local0) - Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4) + Local0 = OPT4 + Local0 &= 63 + OPT4 = Local0 | ((Arg0 & 0x03) << 6) EXIT_CONFIG_MODE () }
@@ -1372,14 +1381,14 @@
Method (_STA) { - Store (0x00, Local0) + Local0 = 0x00 ENTER_CONFIG_MODE (11) If (ACTR) { - Store (0x0F, Local0) + Local0 = 0x0F } - ElseIf (LOr (IO1H, IO1L)) + ElseIf (IO1H || IO1L) { - Store (0x0D, Local0) + Local0 = 0x0D } EXIT_CONFIG_MODE () Return (Local0) @@ -1387,10 +1396,10 @@
Method (_PSC) { - Store(^^_PSC (), Local0) + Local0 = ^^_PSC () If (Local0) { Return (Local0) } ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (HWPW, Local0) + Local0 = HWPW EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } @@ -1399,14 +1408,14 @@ Method (_PS0) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (One, HWPW) + HWPW = 1 EXIT_CONFIG_MODE () }
Method (_PS3) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (Zero, HWPW) + HWPW = 0 EXIT_CONFIG_MODE () }
@@ -1417,22 +1426,22 @@ IRQNoFlags (IRQX) {} }) ENTER_CONFIG_MODE (11) - Store(IO1L, Local0) - Store(IO1H, Local1) - Store(IRQ1, Local2) + Local0 = IO1L + Local1 = IO1H + Local2 = IRQ1 EXIT_CONFIG_MODE ()
- Or(ShiftLeft(Local1, 8), Local0, Local0) + Local0 |= (Local1 << 8)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MAX, IMAX) - Store (Local0, IMIN) - Store (Local0, IMAX) + IMIN = Local0 + IMAX = Local0
If (Local2) { CreateWordField (CRS, IRQX._INT, IRQW) - Store (One, Local3) - ShiftLeft (Local3, Local2, IRQW) + Local3 = 1 + IRQW = Local3 << Local2 } Return (CRS) } @@ -1451,7 +1460,7 @@ Method (WAKS) { ENTER_CONFIG_MODE (10) - Store (CRE3, Local0) + Local0 = CRE3 EXIT_CONFIG_MODE () Return (Local0) } diff --git a/src/superio/winbond/w83977tf/acpi/superio.asl b/src/superio/winbond/w83977tf/acpi/superio.asl index 36d7681..291475a 100644 --- a/src/superio/winbond/w83977tf/acpi/superio.asl +++ b/src/superio/winbond/w83977tf/acpi/superio.asl @@ -80,7 +80,7 @@ /* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */ Method (_PSC) { ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) - Store (IPD, Local0) + Local0 = IPD EXIT_CONFIG_MODE () If (Local0) { Return (3) } Else { Return (0) } @@ -118,11 +118,11 @@ PNP_READ_IO(PNP_IO0, BUF0, IO0) /* Store xx7 range first so the value isn't overwritten * for below */ - Add(IO0I, 7, IO1I) - Store(IO1I, IO1A) + IO1I += 7 + IO1A = IO1I /* Store xx2 range */ - Add(IO0I, 2, IO0I) - Store(IO0I, IO0A) + IO0I += 2 + IO0A = IO0I /* End OEM BIOS deficiency */ PNP_READ_IRQ(PNP_IRQ0, BUF0, Y08) PNP_READ_DMA(PNP_DMA0, BUF0, Y09) @@ -147,11 +147,11 @@ CreateByteField (Arg0, 0x15, DMAV) ENTER_CONFIG_MODE(W83977TF_FDC) /* FDC base port on 8-byte boundary. */ - And (IOLO, 0xF8, PNP_IO0_LOW_BYTE) - Store (IOHI, PNP_IO0_HIGH_BYTE) - Subtract (FindSetLeftBit (IRQW), 1, PNP_IRQ0) - Subtract (FindSetLeftBit (DMAV), 1, PNP_DMA0) - Store (One, PNP_DEVICE_ACTIVE) + PNP_IO0_LOW_BYTE = IOLO & 0xF8 + PNP_IO0_HIGH_BYTE = IOHI + PNP_IRQ0 = FindSetLeftBit (IRQW) - 1 + PNP_DMA0 = (FindSetLeftBit (DMAV) - 1 + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE() } } @@ -165,11 +165,11 @@ Method (_STA, 0, NotSerialized) { ENTER_CONFIG_MODE(W83977TF_PP) - And (OPT1, 0x02, Local0) - If (LOr (IO0H, IO0L)) + Local0 = OPT1 & 0x02 + If (IO0H || IO0L) { /* Report device not present if ECP is enabled */ - If (LEqual (Local0, 0x02)) + If (Local0 == 0x02) { EXIT_CONFIG_MODE() Return (0x00) @@ -239,10 +239,10 @@ CreateByteField (Arg0, 0x03, IOHI) CreateWordField (Arg0, 0x09, IRQW) ENTER_CONFIG_MODE(W83977TF_PP) - Store (IOLO, PNP_IO0_LOW_BYTE) - Store (IOHI, PNP_IO0_HIGH_BYTE) - Subtract (FindSetLeftBit (IRQW), 1, PNP_IRQ0) - Store (One, PNP_DEVICE_ACTIVE) + PNP_IO0_LOW_BYTE = IOLO + PNP_IO0_HIGH_BYTE = IOHI + PNP_IRQ0 = FindSetLeftBit (IRQW) - 1 + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE() } } @@ -254,10 +254,10 @@ Method (_STA, 0, NotSerialized) { ENTER_CONFIG_MODE(W83977TF_PP) - And (OPT1, 0x02, Local0) - If (LOr (IO0H, IO0L)) + Local0 = OPT1 & 0x02 + If (IO0H || IO0L) { - If (LEqual (Local0, 0x02)) + If (Local0 == 0x02) { If (PNP_DEVICE_ACTIVE) { @@ -339,11 +339,11 @@ CreateByteField (Arg0, 0x15, DMAC)
ENTER_CONFIG_MODE(W83977TF_PP) - Store (IOLO, PNP_IO0_LOW_BYTE) - Store (IOHI, PNP_IO0_HIGH_BYTE) - Subtract (FindSetLeftBit (IRQW), 1, PNP_IRQ0) - Subtract (FindSetLeftBit (DMAC), 1, PNP_DMA0) - Store (One, PNP_DEVICE_ACTIVE) + PNP_IO0_LOW_BYTE = IOLO + PNP_IO0_HIGH_BYTE = IOHI + PNP_IRQ0 = FindSetLeftBit (IRQW) - 1 + PNP_DMA0 = FindSetLeftBit (DMAC) - 1 + PNP_DEVICE_ACTIVE = 1 EXIT_CONFIG_MODE() } }