summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-09-20 11:57:14 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-11-04 09:41:17 +0000
commite28133a9948df5f98007219d54d1afa478318d56 (patch)
tree6ae5fcfb15c770803831b5faaa6711bce1e78b84
parent50a44350ee5e0f3b34869a0b6804425efb2a906d (diff)
mb/getac/p470/acpi: Convert to ASL 2.0 syntax
Generated 'build/dsdt.dsl' are identical. Change-Id: Ifed93f4b0c360ec74f28926fb7cc9774ae03b8a6 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/45555 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
-rw-r--r--src/mainboard/getac/p470/acpi/ec.asl178
-rw-r--r--src/mainboard/getac/p470/acpi/platform.asl42
-rw-r--r--src/mainboard/getac/p470/acpi/superio.asl350
-rw-r--r--src/mainboard/getac/p470/acpi/thermal.asl18
4 files changed, 294 insertions, 294 deletions
diff --git a/src/mainboard/getac/p470/acpi/ec.asl b/src/mainboard/getac/p470/acpi/ec.asl
index 5c0f4d85bd..da6046ce4c 100644
--- a/src/mainboard/getac/p470/acpi/ec.asl
+++ b/src/mainboard/getac/p470/acpi/ec.asl
@@ -87,16 +87,16 @@ Device(EC0)
Method (_Q01, 0)
{
Notify (\_SB.CP00, 0x80)
- If(ADP) {
- Store(1, \_SB.AC.ACST)
- TRAP(0xe3)
- Store(1, PWRS)
- TRAP(0x2b)
+ If (ADP) {
+ \_SB.AC.ACST = 1
+ TRAP (0xe3)
+ PWRS = 1
+ TRAP (0x2b)
} Else {
- Store(0, \_SB.AC.ACST)
- Notify(\_SB.AC, 0x80)
- Notify(\_SB.BAT0, 0x80)
- Store(0, PWRS)
+ \_SB.AC.ACST = 0
+ Notify (\_SB.AC, 0x80)
+ Notify (\_SB.BAT0, 0x80)
+ PWRS = 0
TRAP(0x2b)
}
@@ -107,7 +107,7 @@ Device(EC0)
Method (_Q02, 0)
{
- If(BAT) {
+ If (BAT) {
Notify(\_SB.BAT0, 0x00)
Notify(\_SB.AC, 0x80)
} Else {
@@ -132,7 +132,7 @@ Device(EC0)
{
TRAP(0xe0)
- If (LEqual(RTCF, 0x00)) {
+ If (RTCF == 0x00) {
Notify(LID0, 0x80)
} else {
TRAP(0xc1)
@@ -172,25 +172,25 @@ Device(EC0)
Method (_Q24, 0)
{
- Store(0x3f, HOTK)
- If(IGDS) {
+ HOTK = 0x3f
+ If (IGDS) {
Notify (\_SB.PCI0.GFX0, 0x82)
} Else {
- TRAP(0xE1)
+ TRAP (0xE1)
}
Notify (\_SB.ECO, 0x85)
}
Method (_Q25, 0)
{
- Store(0x40, HOTK)
+ HOTK = 0x40
TRAP(0xe1)
Notify(\_SB.ECO, 0x86)
}
Method (_Q26, 0)
{
- Store(0x41, HOTK)
+ HOTK = 0x41
TRAP(0xe1)
Notify(\_SB.ECO, 0x87)
}
@@ -212,7 +212,7 @@ Device(EC0)
Method (_Q2A, 0)
{
- Store(0x57, HOTK)
+ HOTK = 0x57
TRAP(0xe1)
Notify(\_SB.ECO, 0x8b)
}
@@ -225,7 +225,7 @@ Device(EC0)
Method (_Q2C, 0)
{
- Store(0x59, HOTK)
+ HOTK = 0x59
TRAP(0xe1)
}
@@ -241,25 +241,25 @@ Device(EC0)
Method (_Q3A, 0)
{
- Store(1, BRTL)
+ BRTL = 1
Notify(\_SB.ECO, 0x93)
}
Method (_Q3B, 0)
{
- Store(0, BRTL)
+ BRTL = 0
Notify(\_SB.ECO, 0x93)
}
Method (_Q3C, 0)
{
- Store(1, SUN)
+ SUN = 1
Notify(\_SB.ECO, 0x92)
}
Method (_Q3D, 0)
{
- Store(0, SUN)
+ SUN = 0
Notify(\_SB.ECO, 0x92)
}
@@ -302,14 +302,14 @@ Device(EC0)
Method (_Q48, 0)
{
TRAP(0xd2) // Check AC Status
- Store (1, ODDS)
+ ODDS = 1
Notify(\_SB.ECO, 0x90)
}
Method (_Q49, 0)
{
TRAP(0xd2) // Check AC Status
- Store (0, ODDS)
+ ODDS = 0
Notify(\_SB.ECO, 0x90)
}
@@ -337,7 +337,7 @@ Device(EC0)
Method (_Q5C, 0)
{
- // Store(2, IGPS)
+ // IGPS = 2
Notify(\_SB.ECO, 0x94)
}
@@ -364,26 +364,26 @@ Scope(\_SB)
Method (GDPD, 0, Serialized)
{
// Set flag byte to zero
- Store (0, Local0)
+ Local0 = 0
- If (And(BRTL, 0x01)) {
- Or(Local0, 0x01, Local0)
+ If (BRTL & 0x01) {
+ Local0 |= 0x01
}
- If (And(BRTL, 0x02)) {
- Or(Local0, 0x04, Local0)
+ If (BRTL & 0x02) {
+ Local0 |= 0x04
}
- If (And(BRTL, 0x04)) {
- Or(Local0, 0x02, Local0)
+ If (BRTL & 0x04) {
+ Local0 |= 0x02
}
- If (And(BRTL, 0x30)) {
- Or(Local0, 0x10, Local0)
+ If (BRTL & 0x30) {
+ Local0 |= 0x10
}
- If (And(BRTL, 0x40)) {
- Or(Local0, 0x40, Local0)
+ If (BRTL & 0x40) {
+ Local0 |= 0x40
}
Return (Local0)
@@ -391,18 +391,18 @@ Scope(\_SB)
Method (GDPC, 0, Serialized)
{
- Store (0, Local0)
+ Local0 = 0
- If (And(BRTL, 0x10)) {
- Or(Local0, 0x04, Local0)
+ If (BRTL & 0x10) {
+ Local0 |= 0x04
}
- If (And( BRTL, 0x20)) {
- Or(Local0, 0x01, Local0)
+ If (BRTL & 0x20) {
+ Local0 |= 0x01
}
- If (And(BRTL, 0x40)) {
- Or(Local0, 0x02, Local0)
+ If (BRTL & 0x40) {
+ Local0 |= 0x02
}
Return (Local0)
@@ -411,7 +411,7 @@ Scope(\_SB)
/* Set Brightness Level */
Method(SBLL, 1, Serialized)
{
- Store (Arg0, BRTL)
+ BRTL = Arg0
TRAP(0xd5) // See mainboard's smihandler.c
Return (0)
}
@@ -426,7 +426,7 @@ Scope(\_SB)
/* Get Brightness Level Medium? */
Method(GBLM, 0, Serialized)
{
- Store(0x3f, BRTL)
+ BRTL = 0x3f
// XXX don't we have to set the brightness?
Return(BRTL)
}
@@ -434,7 +434,7 @@ Scope(\_SB)
/* ??? */
Method(SUTE, 1, Serialized)
{
- If (And(Arg0, 0x01)) {
+ If (Arg0 & 0x01) {
TRAP(0xf5)
} Else {
TRAP(0xf6)
@@ -462,30 +462,30 @@ Scope(\_SB)
/* Let coreboot update the flags */
TRAP(0xe5)
- Store (0, Local0)
- If(And(RFDV, 0x01)) {
- Or(Local0, 0x01, Local0)
+ Local0 = 0
+ If (RFDV & 0x01) {
+ Local0 |= 0x01
}
- If(And(RFDV, 0x02)) {
- Or(Local0, 0x02, Local0)
+ If (RFDV & 0x02) {
+ Local0 |= 0x02
}
- If(And(RFDV, 0x04)) {
- Or(Local0, 0x04, Local0)
+ If (RFDV & 0x04) {
+ Local0 |= 0x04
}
- If(And(RFDV, 0x08)) {
- Or(Local0, 0x08, Local0)
+ If (RFDV & 0x08) {
+ Local0 |= 0x08
}
- If(And(GP15, 0x01)) { // GDIS
- Or(Local0, 0x10, Local0)
+ If (GP15 & 0x01) { // GDIS
+ Local0 |= 0x10
}
- If(And(GP12, 0x01)) { // WIFI Led (WLED)
- Or(Local0, 0x20, Local0)
+ If (GP12 & 0x01) { // WIFI Led (WLED)
+ Local0 |= 0x20
}
- If(And(BTEN, 0x01)) { // BlueTooth Enable
- Or(Local0, 0x40, Local0)
+ If (BTEN & 0x01) { // BlueTooth Enable
+ Local0 |= 0x40
}
- If(And(GP10, 0x01)) { // GPS Enable
- Or(Local0, 0x80, Local0)
+ If (GP10 & 0x01) { // GPS Enable
+ Local0 |= 0x80
}
Return (Local0)
@@ -494,30 +494,30 @@ Scope(\_SB)
/* Set RFD */
Method(SRFD, 1, Serialized)
{
- If (And(Arg0, 0x01)) {
- Store (1, GP14) // GLED
- Store (1, GP15) // GDIS
+ If (Arg0 & 0x01) {
+ GP14 = 1 // GLED
+ GP15 = 1 // GDIS
} Else {
- Store (0, GP14)
- Store (0, GP15)
+ GP14 = 0
+ GP15 = 0
}
/* WIFI */
- If (And(Arg0, 0x02)) {
- Store (1, GP12) // WLED
- Store (1, GP25) // WLAN
+ If (Arg0 & 0x02) {
+ GP12 = 1 // WLED
+ GP25 = 1 // WLAN
} Else {
- Store (0, GP12)
- Store (0, GP25)
+ GP12 = 0
+ GP25 = 0
}
/* Bluetooth */
- If (And(Arg0, 0x04)) {
- Store (1, GP13) // BLED
- Store (1, BTEN)
+ If (Arg0 & 0x04) {
+ GP13 = 1 // BLED
+ BTEN = 1
} Else {
- Store (0, GP13) // BLED
- Store (0, BTEN)
+ GP13 = 0 // BLED
+ BTEN = 0
}
Return (0)
}
@@ -539,7 +539,7 @@ Scope(\_SB)
/* Set IGD (Graphics) */
Method(SIGD, 1, Serialized)
{
- If (And(Arg0, 0x01)) {
+ If (Arg0 & 0x01) {
TRAP(0xf7)
} Else {
TRAP(0xf8)
@@ -550,7 +550,7 @@ Scope(\_SB)
/* SMI-C? Set Mic? */
Method (SMIC, 1, Serialized)
{
- If (And(Arg0, 0x01)) {
+ If (Arg0 & 0x01) {
TRAP(0xeb)
} Else {
TRAP(0xec)
@@ -567,7 +567,7 @@ Scope(\_SB)
/* Not even decent function names anymore? */
Method(S024, 1, Serialized)
{
- If (And(Arg0, 0x01)) {
+ If (Arg0 & 0x01) {
TRAP(0xf1)
} Else {
TRAP(0xf2)
@@ -585,13 +585,13 @@ Scope(\_SB)
/* ??? Something with PATA */
Method(S025, 1, Serialized)
{
- If(And(Arg0, 0x01)) {
+ If (Arg0 & 0x01) {
TRAP(0xfc)
- Store (1, GP33) // CREN
+ GP33 = 1 // CREN
Sleep(1500)
- Store (1, GP34) // CRRS
+ GP34 = 1 // CRRS
Sleep(500)
Notify(^^PCI0.PATA, 0)
@@ -599,7 +599,7 @@ Scope(\_SB)
} Else {
TRAP(0xfb)
Sleep(1500)
- Store(0, GP33) // CREN
+ GP33 = 0 // CREN
Sleep(1500)
Notify(^^PCI0.PATA, 0)
Notify(^^PCI0.PATA.PRID, 0)
@@ -613,16 +613,16 @@ Scope(\_SB)
Method(G021, 0, Serialized)
{
TRAP(0xfe)
- If (LEqual(ACIN, 0)) {
+ If (ACIN == 0) {
TRAP(0xfa)
TRAP(0xfd)
- If (LEqual(ODDS, 1)) {
+ If (ODDS == 1) {
TRAP(0xfb)
Notify(^^PCI0.PATA, 0)
Notify(^^PCI0.PATA.PRID.DSK1, 1)
Notify(^^PCI0.PATA.PRID.DSK0, 1)
Sleep (1500)
- Store (0, GP33) // CREN
+ GP33 = 0 // CREN
Sleep (1500)
Notify(^^PCI0.PATA, 0)
Notify(^^PCI0.PATA.PRID.DSK1, 1)
@@ -645,7 +645,7 @@ Scope(\_SB)
/* ??? */
Method(S00B, 1, Serialized)
{
- If (And(Arg0, 1)) {
+ If (Arg0 & 1) {
TRAP(0xdc)
} Else {
TRAP(0xdd)
diff --git a/src/mainboard/getac/p470/acpi/platform.asl b/src/mainboard/getac/p470/acpi/platform.asl
index 98cecbc587..b9835d1f87 100644
--- a/src/mainboard/getac/p470/acpi/platform.asl
+++ b/src/mainboard/getac/p470/acpi/platform.asl
@@ -9,23 +9,23 @@ Method(_PTS,1)
TRAP(0xed)
Sleep(1000)
- Store(0, \_SB.ACFG)
+ \_SB.ACFG = 0
// Are we going to S4?
- If (Lequal(Arg0, 4)) {
+ If (Arg0 == 4) {
TRAP(0xe7)
TRAP(0xea)
}
// Are we going to S5?
- If (Lequal(Arg0, 5)) {
+ If (Arg0 == 5) {
TRAP(0xde)
}
// The 2.6.12.5 ACPI engine seems to optimize the
- // If(LEqual(Arg0, 5)) path away. This keeps it from doing so:
+ // If(Arg0 == 5) path away. This keeps it from doing so:
TRAP(Arg0)
- Store(Arg0, DBG0)
+ DBG0 = Arg0
// End of ugly OS bug workaround
}
@@ -34,12 +34,12 @@ Method(_PTS,1)
Method(_WAK,1)
{
// Enable GPS
- Store (1, GP11) // GPSE
+ GP11 = 1 // GPSE
// Wake from S3 or S4?
- If (LOr(LEqual(Arg0, 3), LEqual(Arg0, 4))) {
- If (And(CFGD, 0x01000000)) {
- If (LAnd(And(CFGD, 0xf0), LEqual(OSYS, 2001))) {
+ If ((Arg0 == 0x03) || (Arg0 == 0x04)) {
+ If (CFGD & 0x01000000) {
+ If ((CFGD & 0xF0) && (OSYS == 2001)) {
TRAP(0x3d)
}
}
@@ -48,26 +48,26 @@ Method(_WAK,1)
// Notify PCI Express slots in case a card
// was inserted while a sleep state was active.
- If (LEqual(RP1D, 0)) {
+ If (RP1D == 0) {
Notify(\_SB.PCI0.RP01, 0)
}
- If (LEqual(RP3D, 0)) {
+ If (RP3D == 0) {
Notify(\_SB.PCI0.RP03, 0)
}
- If (LEqual(RP4D, 0)) {
+ If (RP4D == 0) {
Notify(\_SB.PCI0.RP04, 0)
}
// Are we coming from S3?
- If (LEqual(Arg0, 3)) {
+ If (Arg0 == 3) {
TRAP(0xeb)
TRAP(0x46)
}
// Are we coming from S4?
- If (LEqual(Arg0, 4)) {
+ If (Arg0 == 4) {
Notify(SLPB, 0x02)
If (DTSE) {
TRAP(0x47)
@@ -75,16 +75,16 @@ Method(_WAK,1)
}
// Windows XP SP2 P-State restore
- If (LAnd(LEqual(OSYS, 2002), And(CFGD, 1))) {
- If (LGreater(\_SB.CP00._PPC, 0)) {
- Subtract(\_SB.CP00._PPC, 1, \_SB.CP00._PPC)
+ If ((OSYS == 2002) && (CFGD & 0x01)) {
+ If (\_SB.CP00._PPC > 0) {
+ \_SB.CP00._PPC -= 1
PNOT()
- Add(\_SB.CP00._PPC, 1, \_SB.CP00._PPC)
+ \_SB.CP00._PPC += 1
PNOT()
} Else {
- Add(\_SB.CP00._PPC, 1, \_SB.CP00._PPC)
+ \_SB.CP00._PPC += 1
PNOT()
- Subtract(\_SB.CP00._PPC, 1, \_SB.CP00._PPC)
+ \_SB.CP00._PPC -= 1
PNOT()
}
}
@@ -118,7 +118,7 @@ Scope(\_SB)
* running: Windows XP SP1 needs to have C-State coordination
* enabled in SMM.
*/
- If (LAnd(LEqual(OSYS, 2001), MPEN)) {
+ If ((OSYS == 2001) && MPEN) {
TRAP(0x3d)
}
diff --git a/src/mainboard/getac/p470/acpi/superio.asl b/src/mainboard/getac/p470/acpi/superio.asl
index 705b2b9c61..ab3839c6aa 100644
--- a/src/mainboard/getac/p470/acpi/superio.asl
+++ b/src/mainboard/getac/p470/acpi/superio.asl
@@ -19,13 +19,13 @@ Device (SIO1)
Method (READ, 3)
{
Acquire (SIOM, 0xffff)
- If (LEqual(Arg0, 0)) {
- Store (0x55, INDX)
- Store (Arg1, INDX)
- Store (DATA, Local1)
- Store (0xaa, INDX)
+ If (Arg0 == 0) {
+ INDX = 0x55
+ INDX = Arg1
+ Local1 = DATA
+ INDX = 0xaa
}
- And (Local1, Arg2, Local1)
+ Local1 &= Arg2
Release(SIOM)
Return(Local1)
}
@@ -33,11 +33,11 @@ Device (SIO1)
Method (WRIT, 3)
{
Acquire (SIOM, 0xffff)
- If (LEqual(Arg0, 0)) {
- Store (0x55, INDX)
- Store (Arg1, INDX)
- Store (Arg2, DATA)
- Store (0xaa, INDX)
+ If (Arg0 == 0) {
+ INDX = 0x55
+ INDX = Arg1
+ DATA = Arg2
+ INDX = 0xaa
}
Release(SIOM)
}
@@ -55,13 +55,13 @@ Device (SIO1)
Acquire (SIOM, 0xffff)
// Is the hardware enabled?
- Store (READ(0, 0x24, 0xff), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x24, 0xff)
+ If (Local0 == 0) {
Return (0xd)
} Else {
// Power Enabled?
- Store (READ(0, 0x02, 0x08), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x02, 0x08)
+ If (Local0 == 0) {
Return (0x0d)
} Else {
Return (0x0f)
@@ -74,12 +74,12 @@ Device (SIO1)
{
WRIT(0, 0x24, 0x00)
- Store(READ(0, 0x28, 0x0f), Local0)
+ Local0 = READ (0, 0x28, 0x0f)
WRIT(0, 0x28, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x08, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x08
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
@@ -104,8 +104,8 @@ Device (SIO1)
IRQNoFlags(_IRA) { 4 }
})
- And (_STA(), 0x02, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = (_STA () & 0x02)
+ If (Local0 == 0) {
Return(NONE)
}
@@ -117,15 +117,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR1._CRS._IRA._INT, IRQ)
/* I/O Base */
- Store (READ(0, 0x24, 0xfe), Local0)
- ShiftLeft(Local0, 0x02, Local0)
- Store(Local0, IOMN)
- Store(Local0, IOMX)
+ Local0 = READ (0, 0x24, 0xfe)
+ Local0 <<= 2
+ IOMN = Local0
+ IOMX = Local0
/* Interrupt */
- Store(READ(0, 0x28, 0xf0), Local0)
- ShiftRight(Local0, 4, Local0)
- ShiftLeft(1, Local0, IRQ)
+ Local0 = READ (0, 0x28, 0xf0)
+ Local0 >>= 4
+ IRQ = 1 << Local0
Return(RSRC)
}
@@ -138,29 +138,29 @@ Device (SIO1)
WRIT(0, 0x24, 0)
FindSetRightBit(IRQL, Local0)
- Decrement(Local0)
- ShiftLeft(Local0, 4, Local0)
+ Local0--
+ Local0 <<= 4
- Store(READ(0, 0x28, 0x0f), Local1)
- Or(Local0, Local1, Local0)
+ Local1 = READ (0, 0x28, 0x0f)
+ Local0 |= Local1
WRIT(0, 0x28, Local0)
- Store(IOLO, Local0)
- ShiftRight(Local0, 2, Local0)
- And(Local0, 0xfe, Local0)
+ Local0 = IOLO
+ Local0 >>= 2
+ Local0 &= 0xfe
- Store(IOHI, Local1)
- ShiftLeft(Local1, 6, Local1)
- Or (Local0, Local1, Local0)
+ Local1 = IOHI
+ Local1 <<= 6
+ Local0 |= Local1
WRIT(0, 0x24, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x08, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x08
WRIT(0, 0x02, Local0)
- Store(READ(0, 0x07, 0xff), Local0)
- Not(0x40, Local1)
- And (Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x40
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
@@ -168,22 +168,22 @@ Device (SIO1)
/* D0 state - Line drivers are on */
Method (_PS0, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x08, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x08
WRIT(0, 0x02, Local0)
- Store (READ(0, 0x07, 0xff), Local0)
- Not(0x40, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x40
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
/* D3 State - Line drivers are off */
Method(_PS3, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x08, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x08
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
}
@@ -199,19 +199,19 @@ Device (SIO1)
Method (_STA, 0)
{
/* IRDA? */
- Store(READ(0, 0x0c, 0x38), Local0)
- If (LNotEqual(Local0, Zero)) {
+ Local0 = READ(0, 0x0c, 0x38)
+ If (Local0 != 0) {
Return (0)
}
// Is the hardware enabled?
- Store (READ(0, 0x25, 0xff), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x25, 0xff)
+ If (Local0 == 0) {
Return (0xd)
} Else {
// Power Enabled?
- Store (READ(0, 0x02, 0x80), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x02, 0x80)
+ If (Local0 == 0) {
Return (0x0d)
} Else {
Return (0x0f)
@@ -224,12 +224,12 @@ Device (SIO1)
{
WRIT(0, 0x25, 0x00)
- Store(READ(0, 0x28, 0xf0), Local0)
+ Local0 = READ (0, 0x28, 0xf0)
WRIT(0, 0x28, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x80, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x80
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
@@ -254,8 +254,8 @@ Device (SIO1)
IRQNoFlags(_IRB) { 3 }
})
- And (_STA(), 0x02, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = _STA () & 0x02
+ If (Local0 == 0) {
Return(NONE)
}
@@ -267,15 +267,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR2._CRS._IRB._INT, IRQ)
/* I/O Base */
- Store (READ(0, 0x25, 0xfe), Local0)
- ShiftLeft(Local0, 0x02, Local0)
- Store(Local0, IOMN)
- Store(Local0, IOMX)
+ Local0 = READ (0, 0x25, 0xfe)
+ Local0 <<= 2
+ IOMN = Local0
+ IOMX = Local0
/* Interrupt */
- Store(READ(0, 0x28, 0x0f), Local0)
- ShiftRight(Local0, 4, Local0)
- ShiftLeft(1, Local0, IRQ)
+ Local0 = READ (0, 0x28, 0x0f)
+ Local0 >>= 4
+ IRQ = 1 << Local0
Return(RSRC)
}
@@ -288,55 +288,55 @@ Device (SIO1)
WRIT(0, 0x25, 0)
FindSetRightBit(IRQL, Local0)
- Decrement(Local0)
+ Local0--
- Store(READ(0, 0x28, 0xf0), Local1)
- Or(Local0, Local1, Local0)
+ Local1 = READ (0x00, 0x28, 0xf0)
+ Local0 |= Local1
WRIT(0, 0x28, Local0)
- Store(IOLO, Local0)
- ShiftRight(Local0, 2, Local0)
- And(Local0, 0xfe, Local0)
+ Local0 = IOLO
+ Local0 >>= 2
+ Local0 &= 0xfe
- Store(IOHI, Local1)
- ShiftLeft(Local1, 6, Local1)
- Or (Local0, Local1, Local0)
+ Local1 = IOHI
+ Local1 <<= 6
+ Local0 |= Local1
WRIT(0, 0x25, Local0)
- Store(READ(0, 0x0c, 0xff), Local0)
- Not(0x38, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x0c, 0xff)
+ Local1 = ~0x38
+ Local0 &= Local1
WRIT(0, 0x0c, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x80, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x80
WRIT(0, 0x02, Local0)
- Store(READ(0, 0x07, 0xff), Local0)
- Not(0x20, Local1)
- And (Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x20
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
/* D0 state - Line drivers are on */
Method (_PS0, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x80, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x80
WRIT(0, 0x02, Local0)
- Store (READ(0, 0x07, 0xff), Local0)
- Not(0x20, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x20
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
/* D3 State - Line drivers are off */
Method(_PS3, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x80, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x80
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
}
@@ -354,13 +354,13 @@ Device (SIO1)
Acquire (SIOM, 0xffff)
// Is the hardware enabled?
- Store (READ(0, 0x1b, 0xff), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x1b, 0xff)
+ If (Local0 == 0) {
Return (0xd)
} Else {
// Power Enabled?
- Store (READ(0, 0x02, 0x02), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x02, 0x02)
+ If (Local0 == 0) {
Return (0x0d)
} Else {
Return (0x0f)
@@ -373,12 +373,12 @@ Device (SIO1)
{
WRIT(0, 0x1b, 0x00)
- Store(READ(0, 0x1d, 0x0f), Local0)
+ Local0 = READ (0, 0x1d, 0x0f)
WRIT(0, 0x1d, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x02, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x02
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
@@ -403,8 +403,8 @@ Device (SIO1)
IRQNoFlags(_IRA) { 5 }
})
- And (_STA(), 0x02, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = _STA () & 0x02
+ If (Local0 == 0) {
Return(NONE)
}
@@ -416,15 +416,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR3._CRS._IRA._INT, IRQ)
/* I/O Base */
- Store (READ(0, 0x1b, 0xfe), Local0)
- ShiftLeft(Local0, 0x02, Local0)
- Store(Local0, IOMN)
- Store(Local0, IOMX)
+ Local0 = READ (0x00, 0x1b, 0xfe)
+ Local0 <<= 2
+ IOMN = Local0
+ IOMX = Local0
/* Interrupt */
- Store(READ(0, 0x1d, 0xf0), Local0)
- ShiftRight(Local0, 4, Local0)
- ShiftLeft(1, Local0, IRQ)
+ Local0 = READ (0, 0x1d, 0xf0)
+ Local0 >>= 4
+ IRQ = 1 << Local0
Return(RSRC)
}
@@ -437,29 +437,29 @@ Device (SIO1)
WRIT(0, 0x1b, 0)
FindSetRightBit(IRQL, Local0)
- Decrement(Local0)
- ShiftLeft(Local0, 4, Local0)
+ Local0--
+ Local0 <<= 4
- Store(READ(0, 0x1d, 0x0f), Local1)
- Or(Local0, Local1, Local0)
+ Local1 = READ (0, 0x1d, 0x0f)
+ Local0 |= Local1
WRIT(0, 0x1d, Local0)
- Store(IOLO, Local0)
- ShiftRight(Local0, 2, Local0)
- And(Local0, 0xfe, Local0)
+ Local0 = IOLO
+ Local0 >>= 2
+ Local0 &= 0xfe
- Store(IOHI, Local1)
- ShiftLeft(Local1, 6, Local1)
- Or (Local0, Local1, Local0)
+ Local1 = IOHI
+ Local1 <<= 6
+ Local0 |= Local1
WRIT(0, 0x1b, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x02, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x02
WRIT(0, 0x02, Local0)
- Store(READ(0, 0x07, 0xff), Local0)
- Not(0x04, Local1)
- And (Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x04
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
@@ -467,22 +467,22 @@ Device (SIO1)
/* D0 state - Line drivers are on */
Method (_PS0, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x02, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x02
WRIT(0, 0x02, Local0)
- Store (READ(0, 0x07, 0xff), Local0)
- Not(0x04, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x04
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
/* D3 State - Line drivers are off */
Method(_PS3, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x02, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x02
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
}
@@ -501,13 +501,13 @@ Device (SIO1)
Acquire (SIOM, 0xffff)
// Is the hardware enabled?
- Store (READ(0, 0x1c, 0xff), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x1c, 0xff)
+ If (Local0 == 0) {
Return (0xd)
} Else {
// Power Enabled?
- Store (READ(0, 0x02, 0x04), Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = READ (0, 0x02, 0x04)
+ If (Local0 == 0) {
Return (0x0d)
} Else {
Return (0x0f)
@@ -520,12 +520,12 @@ Device (SIO1)
{
WRIT(0, 0x1c, 0x00)
- Store(READ(0, 0x1d, 0x0f), Local0)
+ Local0 = READ (0, 0x1d, 0x0f)
WRIT(0, 0x1d, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x04, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x04
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
@@ -550,8 +550,8 @@ Device (SIO1)
IRQNoFlags(_IRA) { 11 }
})
- And (_STA(), 0x02, Local0)
- If (LEqual(Local0, 0)) {
+ Local0 = _STA () & 0x02
+ If (Local0 == 0) {
Return(NONE)
}
@@ -563,15 +563,15 @@ Device (SIO1)
\_SB.PCI0.LPCB.SIO1.UAR4._CRS._IRA._INT, IRQ)
/* I/O Base */
- Store (READ(0, 0x1c, 0xfe), Local0)
- ShiftLeft(Local0, 0x02, Local0)
- Store(Local0, IOMN)
- Store(Local0, IOMX)
+ Local0 = READ (0, 0x1c, 0xfe)
+ Local0 <<= 2
+ IOMN = Local0
+ IOMX = Local0
/* Interrupt */
- Store(READ(0, 0x1d, 0xf0), Local0)
- ShiftRight(Local0, 4, Local0)
- ShiftLeft(1, Local0, IRQ)
+ Local0 = READ (0, 0x1d, 0xf0)
+ Local0 >>= 4
+ IRQ = 1 << Local0
Return(RSRC)
}
@@ -584,29 +584,29 @@ Device (SIO1)
WRIT(0, 0x1c, 0)
FindSetRightBit(IRQL, Local0)
- Decrement(Local0)
- ShiftLeft(Local0, 4, Local0)
+ Local0--
+ Local0 <<= 4
- Store(READ(0, 0x1d, 0x0f), Local1)
- Or(Local0, Local1, Local0)
+ Local1 = READ (0x00, 0x1d, 0x0f)
+ Local0 |= Local1
WRIT(0, 0x1d, Local0)
- Store(IOLO, Local0)
- ShiftRight(Local0, 2, Local0)
- And(Local0, 0xfe, Local0)
+ Local0 = IOLO
+ Local0 >>= 2
+ Local0 &= 0xfe
- Store(IOHI, Local1)
- ShiftLeft(Local1, 6, Local1)
- Or (Local0, Local1, Local0)
+ Local1 = IOHI
+ Local1 <<= 6
+ Local0 |= Local1
WRIT(0, 0x1c, Local0)
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x04, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x04
WRIT(0, 0x02, Local0)
- Store(READ(0, 0x07, 0xff), Local0)
- Not(0x08, Local1)
- And (Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x08
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
@@ -614,22 +614,22 @@ Device (SIO1)
/* D0 state - Line drivers are on */
Method (_PS0, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Or(Local0, 0x04, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local0 |= 0x04
WRIT(0, 0x02, Local0)
- Store (READ(0, 0x07, 0xff), Local0)
- Not(0x08, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x07, 0xff)
+ Local1 = ~0x08
+ Local0 &= Local1
WRIT(0, 0x07, Local0)
}
/* D3 State - Line drivers are off */
Method(_PS3, 0)
{
- Store(READ(0, 0x02, 0xff), Local0)
- Not(0x04, Local1)
- And(Local0, Local1, Local0)
+ Local0 = READ (0, 0x02, 0xff)
+ Local1 = ~0x04
+ Local0 &= Local1
WRIT(0, 0x02, Local0)
}
}
diff --git a/src/mainboard/getac/p470/acpi/thermal.asl b/src/mainboard/getac/p470/acpi/thermal.asl
index 6e3dc22cf9..4e31ef3a93 100644
--- a/src/mainboard/getac/p470/acpi/thermal.asl
+++ b/src/mainboard/getac/p470/acpi/thermal.asl
@@ -17,11 +17,11 @@ Scope (\_TZ)
// Convert from °C to 1/10 Kelvin
Method(DEGR, 1, NotSerialized)
{
- Store(Arg0, Local0)
+ Local0 = Arg0
// 10ths of degrees
- Multiply(Local0, 10, Local0)
+ Local0 *= 10
// 0°C is 273.15 K, we need to round it.
- Add(Local0, 2732, Local0)
+ Local0 += 2732
Return(Local0)
}
@@ -35,24 +35,24 @@ Scope (\_TZ)
// Critical shutdown temperature
Method (_CRT, 0, Serialized)
{
- Store(\_SB.PCI0.LPCB.EC0.CRTT, Local0)
- Store(DEGR(Local0), Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.CRTT
+ Local0 = DEGR (Local0)
Return(Local0)
}
// CPU throttling start temperature
Method (_PSV, 0, Serialized)
{
- Store(\_SB.PCI0.LPCB.EC0.CTRO, Local0)
- Store(DEGR(Local0), Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.CTRO
+ Local0 = DEGR (Local0)
Return(Local0)
}
// Get DTS Temperature
Method (_TMP, 0, Serialized)
{
- Store(\_SB.PCI0.LPCB.EC0.CTMP, Local0)
- Store(DEGR(Local0), Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.CTMP
+ Local0 = DEGR (Local0)
Return(Local0)
}