sio/winbond/w83627hf/acpi: Replace Store(a,b) with ASL 2.0 syntax

Replace `Store (a, b)` with `b = a`.

Change-Id: I6858ddaa8b70194ffdd3b4edcb0ee57aec262b48
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70635
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Felix Singer 2022-12-12 04:43:21 +01:00
parent 84e6123d7e
commit fa0709663b
1 changed files with 200 additions and 200 deletions

View File

@ -151,10 +151,10 @@ Device(SIO) {
Method (ENTER_CONFIG_MODE, 1) Method (ENTER_CONFIG_MODE, 1)
{ {
Acquire (CRMX, 0xFFFF) Acquire (CRMX, 0xFFFF)
Store (0x87, ADDR) ADDR = 0x87
Store (0x87, ADDR) ADDR = 0x87
If (Arg0 < 0xFF) { If (Arg0 < 0xFF) {
Store(Arg0, LDN) LDN = Arg0
} }
} }
@ -163,14 +163,14 @@ Device(SIO) {
*/ */
Method (EXIT_CONFIG_MODE) Method (EXIT_CONFIG_MODE)
{ {
Store (0xAA, ADDR) ADDR = 0xAA
Release (CRMX) Release (CRMX)
} }
/* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */ /* PM: indicate IPD (Immediate Power Down) bit state as D0/D3 */
Method (_PSC) { Method (_PSC) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (IPD, Local0) Local0 = IPD
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
@ -179,14 +179,14 @@ Device(SIO) {
/* PM: Switch to D0 by setting IPD low */ /* PM: Switch to D0 by setting IPD low */
Method (_PS0) { Method (_PS0) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, IPD) IPD = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
/* PM: Switch to D3 by setting IPD high */ /* PM: Switch to D3 by setting IPD high */
Method (_PS3) { Method (_PS3) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, IPD) IPD = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -199,14 +199,14 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (0) ENTER_CONFIG_MODE (0)
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Return (Local0) Return (Local0)
@ -216,10 +216,10 @@ Device(SIO) {
* 2 if whole chip is powered down), 0 else * 2 if whole chip is powered down), 0 else
*/ */
Method (_PSC) { Method (_PSC) {
Store(^^_PSC (), Local0) Local0 = ^^_PSC ()
If (Local0) { Return (Local0) } If (Local0) { Return (Local0) }
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (FDPW, Local0) Local0 = FDPW
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
@ -227,20 +227,20 @@ Device(SIO) {
/* Disable power saving mode */ /* Disable power saving mode */
Method (_PS0) { Method (_PS0) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, FDPW) FDPW = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
/* Enable power saving mode */ /* Enable power saving mode */
Method (_PS3) { Method (_PS3) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, FDPW) FDPW = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (0) ENTER_CONFIG_MODE (0)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -254,8 +254,8 @@ Device(SIO) {
/* Get IO port info */ /* Get IO port info */
ENTER_CONFIG_MODE (0) ENTER_CONFIG_MODE (0)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
/* Calculate full IO port address */ /* Calculate full IO port address */
@ -264,8 +264,8 @@ Device(SIO) {
/* Modify the resource template and return it */ /* Modify the resource template and return it */
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMIN) IMIN = Local0
Store (Local0, IMAX) IMAX = Local0
Return (CRS) Return (CRS)
} }
@ -300,9 +300,9 @@ Device(SIO) {
// Get resources from logical device // Get resources from logical device
ENTER_CONFIG_MODE (0) ENTER_CONFIG_MODE (0)
Store (ACTR, Local0) Local0 = ACTR
Store (IO1H, Local1) Local1 = IO1H
Store (IO1L, Local2) Local2 = IO1L
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
ShiftLeft(Local1, 8, Local1) ShiftLeft(Local1, 8, Local1)
Or(Local1, Local2, Local1) Or(Local1, Local2, Local1)
@ -338,30 +338,30 @@ Device(SIO) {
SIFR, 8 SIFR, 8
} }
Store(One, ACT1) ACT1 = One
Store(0, SELE) SELE = 0
Sleep(0x64) Sleep(0x64)
If (SIFR) { Store (One, FD1) } If (SIFR) { FD1 = One }
Store(Zero, ACT1) ACT1 = Zero
Store(One, ACT2) ACT2 = One
Store(1, SELE) SELE = 1
Sleep(0x64) Sleep(0x64)
If (SIFR) { Store (One, FD2) } If (SIFR) { FD2 = One }
Store(Zero, ACT2) ACT2 = Zero
Store(One, ACT3) ACT3 = One
Store(2, SELE) SELE = 2
Sleep(0x64) Sleep(0x64)
If (SIFR) { Store (One, FD3) } If (SIFR) { FD3 = One }
Store(Zero, ACT3) ACT3 = Zero
Store(One, ACT4) ACT4 = One
Store(3, SELE) SELE = 3
Sleep(0x64) Sleep(0x64)
If (SIFR) { Store (One, FD4) } If (SIFR) { FD4 = One }
Store(Zero, ACT4) ACT4 = Zero
Store(Zero, SELE) SELE = Zero
Return (FDE) Return (FDE)
} }
@ -382,9 +382,9 @@ Device(SIO) {
Divide(IOA0, 256, Local0, Local1) Divide(IOA0, 256, Local0, Local1)
ENTER_CONFIG_MODE (0) ENTER_CONFIG_MODE (0)
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
} }
@ -412,53 +412,53 @@ Device(SIO) {
through _CRS and it's only useful in ECP mode which we through _CRS and it's only useful in ECP mode which we
don't support at the moment. */ don't support at the moment. */
ENTER_CONFIG_MODE (1) ENTER_CONFIG_MODE (1)
Store (0x04, DMA0) DMA0 = 0x04
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (1) ENTER_CONFIG_MODE (1)
And(OPT1, 0x3, Local1) And(OPT1, 0x3, Local1)
If (ACTR) { If (ACTR) {
If (Local1 != 2) { If (Local1 != 2) {
Store (0x0D, Local0) Local0 = 0x0D
} Else { } Else {
Store (0x0D, Local0) Local0 = 0x0D
} }
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Return (Local0) Return (Local0)
} }
Method (_PSC) { Method (_PSC) {
Store(^^_PSC (), Local0) Local0 = ^^_PSC ()
If (Local0) { Return (Local0) } If (Local0) { Return (Local0) }
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (PRPW, Local0) Local0 = PRPW
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
} }
Method (_PS0) { Method (_PS0) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, PRPW) PRPW = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_PS3) { Method (_PS3) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, PRPW) PRPW = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_DIS) { Method (_DIS) {
ENTER_CONFIG_MODE (1) ENTER_CONFIG_MODE (1)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -477,32 +477,32 @@ Device(SIO) {
/* Get device settings */ /* Get device settings */
ENTER_CONFIG_MODE (1) ENTER_CONFIG_MODE (1)
Store (IO1L, Local0) Local0 = IO1L
Store (IO1H, Local1) Local1 = IO1H
Store (OPT1, Local2) Local2 = OPT1
Store (IRQ0, Local5) Local5 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
/* Calculate IO port and modify template */ /* Calculate IO port and modify template */
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
Store(Local1, IOP0) IOP0 = Local1
Store(Local1, IOR0) IOR0 = Local1
/* Set align and length based on active parallel port mode */ /* Set align and length based on active parallel port mode */
And(Local2, 0x3, Local3) And(Local2, 0x3, Local3)
And(Local2, 0x4, Local4) And(Local2, 0x4, Local4)
If (Local4) { If (Local4) {
Store(0x04, IOAL) IOAL = 0x04
} }
If (Local0 == 0xBC) If (Local0 == 0xBC)
{ {
Store (0x04, IOLE) IOLE = 0x04
} }
Else Else
{ {
Store (0x08, IOLE) IOLE = 0x08
} }
/* Calculate IRQ bitmap */ /* Calculate IRQ bitmap */
Store (One, Local0) Local0 = One
ShiftLeft (Local0, Local5, IRQW) ShiftLeft (Local0, Local5, IRQW)
/* Return resource template */ /* Return resource template */
Return (CRS) Return (CRS)
@ -565,27 +565,27 @@ Device(SIO) {
CreateWordField (Arg0, IRQX._INT, IRQL) CreateWordField (Arg0, IRQX._INT, IRQL)
If (IOAL == 4) { If (IOAL == 4) {
Store(0x0, Local2) Local2 = 0x0
} else { } else {
Store(0x1, Local2) Local2 = 0x1
} }
Divide(IOA0, 256, Local0, Local1) Divide(IOA0, 256, Local0, Local1)
ENTER_CONFIG_MODE (1) ENTER_CONFIG_MODE (1)
/* IO port */ /* IO port */
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
/* Mode */ /* Mode */
Store (OPT1, Local3) Local3 = OPT1
And (Local3, 0xF8, Local3) And (Local3, 0xF8, Local3)
Or (Local2, Local3, OPT1) Or (Local2, Local3, OPT1)
/* DMA off */ /* DMA off */
Store (0x04, DMA0) DMA0 = 0x04
/* IRQ */ /* IRQ */
IRQ0 = FindSetLeftBit (IRQL) - 1 IRQ0 = FindSetLeftBit (IRQL) - 1
/* Activate */ /* Activate */
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
} }
@ -600,43 +600,43 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (2) ENTER_CONFIG_MODE (2)
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Return (Local0) Return (Local0)
} }
Method (_PSC) { Method (_PSC) {
Store(^^_PSC (), Local0) Local0 = ^^_PSC ()
If (Local0) { Return (Local0) } If (Local0) { Return (Local0) }
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (UAPW, Local0) Local0 = UAPW
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
} }
Method (_PS0) { Method (_PS0) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, UAPW) UAPW = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_PS3) { Method (_PS3) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, UAPW) UAPW = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (2) ENTER_CONFIG_MODE (2)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -647,19 +647,19 @@ Device(SIO) {
IRQNoFlags (IRQX) {6} IRQNoFlags (IRQX) {6}
}) })
ENTER_CONFIG_MODE (2) ENTER_CONFIG_MODE (2)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
Store(IRQ0, Local2) Local2 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
Store (Local0, IMIN) IMIN = Local0
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMAX) IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
Return (CRS) Return (CRS)
@ -704,10 +704,10 @@ Device(SIO) {
Local3 = FindSetLeftBit (IRQL) - 1 Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (2) ENTER_CONFIG_MODE (2)
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
Store (Local3, IRQ0) IRQ0 = Local3
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
} }
@ -722,16 +722,16 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
If (!And(OPT2, 0x30)) If (!And(OPT2, 0x30))
{ {
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -739,29 +739,29 @@ Device(SIO) {
} }
Method (_PSC) { Method (_PSC) {
Store(^^_PSC (), Local0) Local0 = ^^_PSC ()
If (Local0) { Return (Local0) } If (Local0) { Return (Local0) }
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (UBPW, Local0) Local0 = UBPW
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
} }
Method (_PS0) { Method (_PS0) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, UBPW) UBPW = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_PS3) { Method (_PS3) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, UBPW) UBPW = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -772,19 +772,19 @@ Device(SIO) {
IRQNoFlags (IRQX) {6} IRQNoFlags (IRQX) {6}
}) })
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
Store(IRQ0, Local2) Local2 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
Store (Local0, IMIN) IMIN = Local0
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMAX) IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
Return (CRS) Return (CRS)
@ -829,10 +829,10 @@ Device(SIO) {
Local3 = FindSetLeftBit (IRQL) - 1 Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
Store (Local3, IRQ0) IRQ0 = Local3
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
} }
@ -847,16 +847,16 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
If (And(OPT2, 0x30)) If (And(OPT2, 0x30))
{ {
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -864,29 +864,29 @@ Device(SIO) {
} }
Method (_PSC) { Method (_PSC) {
Store(^^_PSC (), Local0) Local0 = ^^_PSC ()
If (Local0) { Return (Local0) } If (Local0) { Return (Local0) }
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (UBPW, Local0) Local0 = UBPW
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
} }
Method (_PS0) { Method (_PS0) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, UBPW) UBPW = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_PS3) { Method (_PS3) {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, UBPW) UBPW = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -897,19 +897,19 @@ Device(SIO) {
IRQNoFlags (IRQX) {6} IRQNoFlags (IRQX) {6}
}) })
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
Store(IO1H, Local1) Local1 = IO1H
Store(IO1L, Local0) Local0 = IO1L
Store(IRQ0, Local2) Local2 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
Store (Local0, IMIN) IMIN = Local0
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMAX) IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
Return (CRS) Return (CRS)
@ -954,10 +954,10 @@ Device(SIO) {
Local3 = FindSetLeftBit (IRQL) - 1 Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (3) ENTER_CONFIG_MODE (3)
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
Store (Local3, IRQ0) IRQ0 = Local3
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
} }
@ -973,14 +973,14 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (6) ENTER_CONFIG_MODE (6)
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Return (Local0) Return (Local0)
@ -989,7 +989,7 @@ Device(SIO) {
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (6) ENTER_CONFIG_MODE (6)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -1000,19 +1000,19 @@ Device(SIO) {
IRQNoFlags (IRQX) {6} IRQNoFlags (IRQX) {6}
}) })
ENTER_CONFIG_MODE (6) ENTER_CONFIG_MODE (6)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
Store(IRQ0, Local2) Local2 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
Store (Local0, IMIN) IMIN = Local0
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMAX) IMAX = Local0
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
Return (CRS) Return (CRS)
@ -1041,10 +1041,10 @@ Device(SIO) {
Local3 = FindSetLeftBit (IRQL) - 1 Local3 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (6) ENTER_CONFIG_MODE (6)
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
Store (Local3, IRQ0) IRQ0 = Local3
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
} }
@ -1059,17 +1059,17 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L || IO2H || IO2L) ElseIf (IO1H || IO1L || IO2H || IO2L)
{ {
#ifdef W83627HF_KBC_COMPAT #ifdef W83627HF_KBC_COMPAT
Store (0x0F, Local0) Local0 = 0x0F
#else #else
Store (0x0D, Local0) Local0 = 0x0D
#endif #endif
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -1079,7 +1079,7 @@ Device(SIO) {
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
Store (Zero, ACTR) ACTR = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Notify(PS2M, 1) Notify(PS2M, 1)
} }
@ -1092,28 +1092,28 @@ Device(SIO) {
IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1) IO (Decode16, 0x0000, 0x0000, 0x01, 0x01, IO1)
}) })
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
Store(IO2L, Local2) Local2 = IO2L
Store(IO2H, Local3) Local3 = IO2H
Store(IRQ0, Local4) Local4 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
Or(ShiftLeft(Local3, 8), Local2, Local2) Or(ShiftLeft(Local3, 8), Local2, Local2)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
Store (Local0, IMIN) IMIN = Local0
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMAX) IMAX = Local0
CreateWordField (CRS, IO1._MIN, I1MI) CreateWordField (CRS, IO1._MIN, I1MI)
Store (Local2, I1MI) I1MI = Local2
CreateWordField (CRS, IO1._MAX, I1MA) CreateWordField (CRS, IO1._MAX, I1MA)
Store (Local2, I1MA) I1MA = Local2
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local5) Local5 = One
ShiftLeft (Local5, Local4, IRQW) ShiftLeft (Local5, Local4, IRQW)
Return (CRS) Return (CRS)
@ -1146,12 +1146,12 @@ Device(SIO) {
Local4 = FindSetLeftBit (IRQL) - 1 Local4 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
Store (Local0, IO1L) IO1L = Local0
Store (Local1, IO1H) IO1H = Local1
Store (Local2, IO2L) IO2L = Local2
Store (Local3, IO2H) IO2H = Local3
Store (Local4, IRQ0) IRQ0 = Local4
Store (One, ACTR) ACTR = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Notify(PS2M, 1) Notify(PS2M, 1)
} }
@ -1164,17 +1164,17 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
If (ACTR && IRQ1) { If (ACTR && IRQ1) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L || IO2H || IO2L) ElseIf (IO1H || IO1L || IO2H || IO2L)
{ {
#ifdef W83627HF_KBC_COMPAT #ifdef W83627HF_KBC_COMPAT
Store (0x0F, Local0) Local0 = 0x0F
#else #else
Store (0x0D, Local0) Local0 = 0x0D
#endif #endif
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -1184,7 +1184,7 @@ Device(SIO) {
Method (_DIS) Method (_DIS)
{ {
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
Store (Zero, IRQ1) IRQ1 = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -1194,11 +1194,11 @@ Device(SIO) {
IRQNoFlags (IRQX) {} IRQNoFlags (IRQX) {}
}) })
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
Store(IRQ1, Local4) Local4 = IRQ1
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local5) Local5 = One
ShiftLeft (Local5, Local4, IRQW) ShiftLeft (Local5, Local4, IRQW)
Return (CRS) Return (CRS)
@ -1225,7 +1225,7 @@ Device(SIO) {
Local0 = FindSetLeftBit (IRQL) - 1 Local0 = FindSetLeftBit (IRQL) - 1
ENTER_CONFIG_MODE (5) ENTER_CONFIG_MODE (5)
Store (Local0, IRQ1) IRQ1 = Local0
/* Only activates if KBD is active */ /* Only activates if KBD is active */
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -1242,14 +1242,14 @@ Device(SIO) {
Name (_UID, "w83627hf-game") Name (_UID, "w83627hf-game")
Method (_STA) { Method (_STA) {
Store(0, Local0) Local0 = 0
ENTER_CONFIG_MODE (7) ENTER_CONFIG_MODE (7)
If (IO1L || IO1H) { If (IO1L || IO1H) {
If (ACTR || ACT1) { If (ACTR || ACT1) {
Store (0x0F, Local0) Local0 = 0x0F
} }
Else { Else {
Store (0x0D, Local0) Local0 = 0x0D
} }
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -1263,21 +1263,21 @@ Device(SIO) {
IRQNoFlags (IRQX) {} IRQNoFlags (IRQX) {}
}) })
ENTER_CONFIG_MODE (7) ENTER_CONFIG_MODE (7)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
Store(IRQ0, Local2) Local2 = IRQ0
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMIN) IMIN = Local0
Store (Local0, IMAX) IMAX = Local0
If (Local2) { If (Local2) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
} }
@ -1297,14 +1297,14 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store(0, Local0) Local0 = 0
ENTER_CONFIG_MODE (7) ENTER_CONFIG_MODE (7)
If (IO2L || IO2H) { If (IO2L || IO2H) {
If (ACTR || ACT2) { If (ACTR || ACT2) {
Store (0x0F, Local0) Local0 = 0x0F
} }
Else { Else {
Store (0x0D, Local0) Local0 = 0x0D
} }
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -1318,21 +1318,21 @@ Device(SIO) {
IRQNoFlags (IRQX) {} IRQNoFlags (IRQX) {}
}) })
ENTER_CONFIG_MODE (7) ENTER_CONFIG_MODE (7)
Store(IO2L, Local0) Local0 = IO2L
Store(IO2H, Local1) Local1 = IO2H
Store(IRQ1, Local2) Local2 = IRQ1
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMIN) IMIN = Local0
Store (Local0, IMAX) IMAX = Local0
If (Local2) { If (Local2) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
} }
@ -1346,7 +1346,7 @@ Device(SIO) {
Method (SLED, 1) Method (SLED, 1)
{ {
ENTER_CONFIG_MODE (9) ENTER_CONFIG_MODE (9)
Store(OPT4, Local0) Local0 = OPT4
And(Local0, 63, Local0) And(Local0, 63, Local0)
Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4) Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -1356,7 +1356,7 @@ Device(SIO) {
Method (PLED, 1) Method (PLED, 1)
{ {
ENTER_CONFIG_MODE (8) ENTER_CONFIG_MODE (8)
Store(OPT4, Local0) Local0 = OPT4
And(Local0, 63, Local0) And(Local0, 63, Local0)
Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4) Or(Local0, ShiftLeft(And(Arg0, 0x03), 6), OPT4)
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
@ -1372,14 +1372,14 @@ Device(SIO) {
Method (_STA) Method (_STA)
{ {
Store (0x00, Local0) Local0 = 0x00
ENTER_CONFIG_MODE (11) ENTER_CONFIG_MODE (11)
If (ACTR) { If (ACTR) {
Store (0x0F, Local0) Local0 = 0x0F
} }
ElseIf (IO1H || IO1L) ElseIf (IO1H || IO1L)
{ {
Store (0x0D, Local0) Local0 = 0x0D
} }
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Return (Local0) Return (Local0)
@ -1387,10 +1387,10 @@ Device(SIO) {
Method (_PSC) Method (_PSC)
{ {
Store(^^_PSC (), Local0) Local0 = ^^_PSC ()
If (Local0) { Return (Local0) } If (Local0) { Return (Local0) }
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (HWPW, Local0) Local0 = HWPW
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
If (Local0) { Return (3) } If (Local0) { Return (3) }
Else { Return (0) } Else { Return (0) }
@ -1399,14 +1399,14 @@ Device(SIO) {
Method (_PS0) Method (_PS0)
{ {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (One, HWPW) HWPW = One
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
Method (_PS3) Method (_PS3)
{ {
ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE) ENTER_CONFIG_MODE (PNP_NO_LDN_CHANGE)
Store (Zero, HWPW) HWPW = Zero
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
} }
@ -1417,21 +1417,21 @@ Device(SIO) {
IRQNoFlags (IRQX) {} IRQNoFlags (IRQX) {}
}) })
ENTER_CONFIG_MODE (11) ENTER_CONFIG_MODE (11)
Store(IO1L, Local0) Local0 = IO1L
Store(IO1H, Local1) Local1 = IO1H
Store(IRQ1, Local2) Local2 = IRQ1
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Or(ShiftLeft(Local1, 8), Local0, Local0) Or(ShiftLeft(Local1, 8), Local0, Local0)
CreateWordField (CRS, IO0._MIN, IMIN) CreateWordField (CRS, IO0._MIN, IMIN)
CreateWordField (CRS, IO0._MAX, IMAX) CreateWordField (CRS, IO0._MAX, IMAX)
Store (Local0, IMIN) IMIN = Local0
Store (Local0, IMAX) IMAX = Local0
If (Local2) { If (Local2) {
CreateWordField (CRS, IRQX._INT, IRQW) CreateWordField (CRS, IRQX._INT, IRQW)
Store (One, Local3) Local3 = One
ShiftLeft (Local3, Local2, IRQW) ShiftLeft (Local3, Local2, IRQW)
} }
Return (CRS) Return (CRS)
@ -1451,7 +1451,7 @@ Device(SIO) {
Method (WAKS) Method (WAKS)
{ {
ENTER_CONFIG_MODE (10) ENTER_CONFIG_MODE (10)
Store (CRE3, Local0) Local0 = CRE3
EXIT_CONFIG_MODE () EXIT_CONFIG_MODE ()
Return (Local0) Return (Local0)
} }