HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46082 )
Change subject: mb/lenovo: Convert to ASL 2.0 syntax ......................................................................
mb/lenovo: Convert to ASL 2.0 syntax
Change-Id: If47882e5ba6f98e98721f1d813503b697351a98f Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/lenovo/g505s/acpi/gpe.asl M src/mainboard/lenovo/s230u/acpi/ec.asl M src/mainboard/lenovo/t400/acpi/dock.asl M src/mainboard/lenovo/t400/acpi/gpe.asl M src/mainboard/lenovo/t400/acpi/graphics.asl M src/mainboard/lenovo/t410/acpi/dock.asl M src/mainboard/lenovo/t410/acpi/gpe.asl M src/mainboard/lenovo/t60/acpi/gpe.asl M src/mainboard/lenovo/x200/acpi/dock.asl M src/mainboard/lenovo/x200/acpi/gpe.asl M src/mainboard/lenovo/x201/acpi/dock.asl M src/mainboard/lenovo/x201/acpi/gpe.asl M src/mainboard/lenovo/x60/acpi/gpe.asl 13 files changed, 85 insertions(+), 86 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/46082/1
diff --git a/src/mainboard/lenovo/g505s/acpi/gpe.asl b/src/mainboard/lenovo/g505s/acpi/gpe.asl index 910d2e6..f137606 100644 --- a/src/mainboard/lenovo/g505s/acpi/gpe.asl +++ b/src/mainboard/lenovo/g505s/acpi/gpe.asl @@ -15,7 +15,7 @@
/* USB controller PME# */ Method(_L0B) { - Store("USB PME", Debug) + Debug = "USB PME" /* Notify devices of wake event */ Notify(_SB.PCI0.UOH1, 0x02) Notify(_SB.PCI0.UOH2, 0x02) @@ -37,16 +37,16 @@
/* Lid switch opened or closed */ Method(_L16) { - Store("Lid status changed", Debug) + Debug = "Lid status changed" /* Flip trigger polarity */ - Not(LPOL, LPOL) + LPOL = ~LPOL /* Notify lid object of status change */ Notify(_SB.LID, 0x80) }
/* GPIO0 or GEvent8 event */ Method(_L18) { - Store("PCI bridge wake event", Debug) + Debug = "PCI bridge wake event" /* Notify PCI bridges of wake event */ Notify(_SB.PCI0.PBR4, 0x02) Notify(_SB.PCI0.PBR5, 0x02) diff --git a/src/mainboard/lenovo/s230u/acpi/ec.asl b/src/mainboard/lenovo/s230u/acpi/ec.asl index 888feac..a1e7379 100644 --- a/src/mainboard/lenovo/s230u/acpi/ec.asl +++ b/src/mainboard/lenovo/s230u/acpi/ec.asl @@ -128,7 +128,7 @@ /* Switched to AC power */ Method (_Q26, 0, NotSerialized) { - Store (One, PWRS) + PWRS = 1 Notify (^AC, 0x80) Notify (^BAT0, 0x80) \PNOT () @@ -138,7 +138,7 @@ /* Switched to battery power */ Method (_Q27, 0, NotSerialized) { - Store (Zero, PWRS) + PWRS = 0 Notify (^AC, 0x80) Notify (^BAT0, 0x80) \PNOT () @@ -148,7 +148,7 @@ /* Lid openend */ Method (_Q2A, 0, NotSerialized) { - Store (One, LIDS) + LIDS = 1 Notify(^LID, 0x80) ^HKEY.MHKQ (0x5002) } @@ -156,7 +156,7 @@ /* Lid closed */ Method (_Q2B, 0, NotSerialized) { - Store (Zero, LIDS) + LIDS = 0 Notify(^LID, 0x80) ^HKEY.MHKQ (0x5001) } @@ -237,7 +237,7 @@
/* FN+Esc pressed / FN row mode switch */ Method (_Q74, 0, NotSerialized) { - XOr(One, HKFA, HKFA) + HKFA = 1 ^ HKFA ^HKEY.MHKQ (0x6060) }
@@ -271,11 +271,11 @@ { Acquire (XDHK, 0xFFFF)
- ShiftLeft (One, Decrement (Arg0), Local0) + Local0 = 1 << Arg0-- If (Arg1) { - Or (Local0, DHKN, DHKN) + DHKN |= Local0 } Else { - And (Not(Local0), DHKN, DHKN) + DHKN &= ~Local0 }
Release (XDHK) @@ -285,7 +285,7 @@ { Acquire (XDHK, 0xFFFF)
- Store (Arg0, DHKC) + DHKC = Arg0
Release (XDHK) } @@ -294,11 +294,11 @@ { Acquire (XDHK, 0xFFFF)
- Store (Zero, Local0) + Local0 = 0
if (DHKV) { - Store (DHKV, Local0) - Store (Zero, DHKV) + Local0 = DHKV + DHKV = 0 }
Release (XDHK) @@ -310,7 +310,7 @@ { Acquire (XDHK, 0xFFFF)
- Store (Arg0, DHKV) + DHKV = Arg0
Release (XDHK)
@@ -321,7 +321,7 @@ /* LED support for thinkpad-acpi */ Method (LED, 2, NotSerialized) { - Or (Arg0, Arg1, HLCL) + HLCL = Arg0 | Arg1 }
Device (AC) diff --git a/src/mainboard/lenovo/t400/acpi/dock.asl b/src/mainboard/lenovo/t400/acpi/dock.asl index 9a6d354..dce1d1a 100644 --- a/src/mainboard/lenovo/t400/acpi/dock.asl +++ b/src/mainboard/lenovo/t400/acpi/dock.asl @@ -12,14 +12,14 @@ { if (Arg0) { /* connect dock */ - Store (1, \GP28) - Store (1, _SB.PCI0.LPCB.EC.DKR1) + \GP28 = 1 + _SB.PCI0.LPCB.EC.DKR1 = 1 } else { /* disconnect dock */ - Store (0, \GP28) - Store (0, _SB.PCI0.LPCB.EC.DKR1) + \GP28 = 0 + _SB.PCI0.LPCB.EC.DKR1 = 0 } - Xor(Arg0, _SB.PCI0.LPCB.EC.DKR1, Local0) + Local0 = Arg0 ^ _SB.PCI0.LPCB.EC.DKR1 Return (Local0) }
diff --git a/src/mainboard/lenovo/t400/acpi/gpe.asl b/src/mainboard/lenovo/t400/acpi/gpe.asl index 62e7b37..9984636 100644 --- a/src/mainboard/lenovo/t400/acpi/gpe.asl +++ b/src/mainboard/lenovo/t400/acpi/gpe.asl @@ -5,8 +5,8 @@ Method(_L18, 0, NotSerialized) { /* Read EC register to clear wake status */ - Store(_SB.PCI0.LPCB.EC.WAKE, Local0) + Local0 = _SB.PCI0.LPCB.EC.WAKE /* So that we don't get a warning that Local0 is unused. */ - Increment (Local0) + Local0++ } } diff --git a/src/mainboard/lenovo/t400/acpi/graphics.asl b/src/mainboard/lenovo/t400/acpi/graphics.asl index 8780e2f..5559bfc 100644 --- a/src/mainboard/lenovo/t400/acpi/graphics.asl +++ b/src/mainboard/lenovo/t400/acpi/graphics.asl @@ -26,19 +26,19 @@
Method(SHYB, 1) { /* Switch hybrid graphics */ - if (LEqual(Arg0, One)) + if (Arg0 == One) { /* Discrete graphics requested */ - Or(GPLV, HYG1, GPLV) - Or(GQLV, HYG2, GQLV) + GPLV |= HYG1 + GQLV |= HYG2 } else { /* Integrated graphics requested */ - Xor(HYG1, 0xFFFFFFFF, Local0) - And(GPLV, Local0, GPLV) - Xor(HYG2, 0xFFFFFFFF, Local0) - And(GQLV, Local0, GQLV) + Local0 = HYG1 ^ 0xFFFFFFFF + GPLV &= Local0 + Local0 = HYG2 ^ 0xFFFFFFFF + GQLV &= Local0 } }
@@ -53,21 +53,21 @@ CreateDWordField (ATPR, 0x04, FUNC)
/* Version request */ - if (LEqual(Arg0, 0x0)) + if (Arg0 == 0x0) { /* Assemble and return version information */ - Store (0x08, SIZE) /* Response length */ - Store (0x01, VERS) /* Version number */ - Store (0x0F, FUNC) /* Supported functions? */ + SIZE = 0x08 /* Response length */ + VERS = 0x01 /* Version number */ + FUNC = 0x0F /* Supported functions? */ Return (ATPR) }
/* Mux select */ - if (LEqual(Arg0, 0x2)) + if (Arg0 == 0x2) { CreateByteField (Arg1, 0x02, PWST) - Store (PWST, Local0) - And (Local0, 0x01, Local0) + Local0 = PWST + Local0 &= 0x01 If (Local0) { /* Enable discrete graphics */ diff --git a/src/mainboard/lenovo/t410/acpi/dock.asl b/src/mainboard/lenovo/t410/acpi/dock.asl index 4771c51..a94762f 100644 --- a/src/mainboard/lenovo/t410/acpi/dock.asl +++ b/src/mainboard/lenovo/t410/acpi/dock.asl @@ -12,18 +12,18 @@ { if (Arg0) { /* connect dock */ - Store (1, \GP28) - Store (1, _SB.PCI0.LPCB.EC.DKR1) - Store (1, _SB.PCI0.LPCB.EC.DKR2) - Store (1, _SB.PCI0.LPCB.EC.DKR3) + \GP28 = 1 + _SB.PCI0.LPCB.EC.DKR1 = 1 + _SB.PCI0.LPCB.EC.DKR2 = 1 + _SB.PCI0.LPCB.EC.DKR3 = 1 } else { /* disconnect dock */ - Store (0, \GP28) - Store (0, _SB.PCI0.LPCB.EC.DKR1) - Store (0, _SB.PCI0.LPCB.EC.DKR2) - Store (0, _SB.PCI0.LPCB.EC.DKR3) + \GP28 = 0 + _SB.PCI0.LPCB.EC.DKR1 = 0 + _SB.PCI0.LPCB.EC.DKR2 = 0 + _SB.PCI0.LPCB.EC.DKR3 = 0 } - Xor(Arg0, _SB.PCI0.LPCB.EC.DKR1, Local0) + Local0 = Arg0 ^ _SB.PCI0.LPCB.EC.DKR1 Return (Local0) }
diff --git a/src/mainboard/lenovo/t410/acpi/gpe.asl b/src/mainboard/lenovo/t410/acpi/gpe.asl index 62e7b37..9984636 100644 --- a/src/mainboard/lenovo/t410/acpi/gpe.asl +++ b/src/mainboard/lenovo/t410/acpi/gpe.asl @@ -5,8 +5,8 @@ Method(_L18, 0, NotSerialized) { /* Read EC register to clear wake status */ - Store(_SB.PCI0.LPCB.EC.WAKE, Local0) + Local0 = _SB.PCI0.LPCB.EC.WAKE /* So that we don't get a warning that Local0 is unused. */ - Increment (Local0) + Local0++ } } diff --git a/src/mainboard/lenovo/t60/acpi/gpe.asl b/src/mainboard/lenovo/t60/acpi/gpe.asl index 62e7b37..9984636 100644 --- a/src/mainboard/lenovo/t60/acpi/gpe.asl +++ b/src/mainboard/lenovo/t60/acpi/gpe.asl @@ -5,8 +5,8 @@ Method(_L18, 0, NotSerialized) { /* Read EC register to clear wake status */ - Store(_SB.PCI0.LPCB.EC.WAKE, Local0) + Local0 = _SB.PCI0.LPCB.EC.WAKE /* So that we don't get a warning that Local0 is unused. */ - Increment (Local0) + Local0++ } } diff --git a/src/mainboard/lenovo/x200/acpi/dock.asl b/src/mainboard/lenovo/x200/acpi/dock.asl index b612f06..ba8f46e 100644 --- a/src/mainboard/lenovo/x200/acpi/dock.asl +++ b/src/mainboard/lenovo/x200/acpi/dock.asl @@ -12,14 +12,14 @@ { if (Arg0) { /* connect dock */ - Store (1, \GP28) - Store (1, _SB.PCI0.LPCB.EC.DKR1) + \GP28 = 1 + _SB.PCI0.LPCB.EC.DKR1 = 1 } else { /* disconnect dock */ - Store (0, \GP28) - Store (0, _SB.PCI0.LPCB.EC.DKR1) + \GP28 = 0 + _SB.PCI0.LPCB.EC.DKR1 = 0 } - Xor(Arg0, _SB.PCI0.LPCB.EC.DKR1, Local0) + Local0 = Arg0 ^ _SB.PCI0.LPCB.EC.DKR1 Return (Local0) }
@@ -32,16 +32,15 @@ /* Returns 0x7 (dock absent) or 0x3 (dock present) */ Method(GGID, 0, NotSerialized) { - Store(G_ID, Local0) - if (LEqual(Local0, 0xFFFFFFFF)) + Local0 = G_ID + if (Local0 == 0xFFFFFFFF) { - Store(Or (Or (GP02, ShiftLeft(GP03, 1)), - ShiftLeft(GP04, 2)), Local0) - If (LEqual(Local0, 0x00)) + Local0 = GP02 | (GP03 << 1) | (GP04 << 2) + If (Local0 == 0x00) { - Store(0x03, Local0) + Local0 = 0x03 } - Store(Local0, G_ID) + G_ID = Local0 } return (Local0) } @@ -68,8 +67,8 @@ /* Undock button on dock */ Method(_Q50, 0, NotSerialized) { - Store(_SB.DOCK.GGID (), Local0) - if (LNotEqual(Local0, 0x07)) + Local0 = _SB.DOCK.GGID () + if (Local0 != 0x07) { Notify(_SB.DOCK, 3) } @@ -83,16 +82,16 @@ /* Unplug power: only disconnect dock on force eject */ Method(_Q5A, 0, NotSerialized) { - Store(_SB.DOCK.GGID (), Local0) - if (LEqual(Local0, 0x07)) + Local0 = _SB.DOCK.GGID () + if (Local0 == 0x07) { Notify(_SB.DOCK, 3) } - if (LEqual(Local0, 0x03)) + if (Local0 == 0x03) { Sleep(0x64) - Store(DKR1, Local1) - if (LEqual(Local1, 1)) + Local1 = DKR1 + if (Local1 == 1) { Notify(_SB.DOCK, 0) } diff --git a/src/mainboard/lenovo/x200/acpi/gpe.asl b/src/mainboard/lenovo/x200/acpi/gpe.asl index 62e7b37..9984636 100644 --- a/src/mainboard/lenovo/x200/acpi/gpe.asl +++ b/src/mainboard/lenovo/x200/acpi/gpe.asl @@ -5,8 +5,8 @@ Method(_L18, 0, NotSerialized) { /* Read EC register to clear wake status */ - Store(_SB.PCI0.LPCB.EC.WAKE, Local0) + Local0 = _SB.PCI0.LPCB.EC.WAKE /* So that we don't get a warning that Local0 is unused. */ - Increment (Local0) + Local0++ } } diff --git a/src/mainboard/lenovo/x201/acpi/dock.asl b/src/mainboard/lenovo/x201/acpi/dock.asl index 0bf5a25..311e620 100644 --- a/src/mainboard/lenovo/x201/acpi/dock.asl +++ b/src/mainboard/lenovo/x201/acpi/dock.asl @@ -12,18 +12,18 @@ { if (Arg0) { /* connect dock */ - Store (1, \GP28) - Store (1, _SB.PCI0.LPCB.EC.DKR1) - Store (1, _SB.PCI0.LPCB.EC.DKR2) - Store (1, _SB.PCI0.LPCB.EC.DKR3) + \GP28 = 1 + _SB.PCI0.LPCB.EC.DKR1 = 1 + _SB.PCI0.LPCB.EC.DKR2 = 1 + _SB.PCI0.LPCB.EC.DKR3 = 1 } else { /* disconnect dock */ - Store (0, \GP28) - Store (0, _SB.PCI0.LPCB.EC.DKR1) - Store (0, _SB.PCI0.LPCB.EC.DKR2) - Store (0, _SB.PCI0.LPCB.EC.DKR3) + \GP28 = 0 + _SB.PCI0.LPCB.EC.DKR1 = 0 + _SB.PCI0.LPCB.EC.DKR2 = 0 + _SB.PCI0.LPCB.EC.DKR3 = 0 } - Xor(Arg0, _SB.PCI0.LPCB.EC.DKR1, Local0) + Local0 = Arg0 ^ _SB.PCI0.LPCB.EC.DKR1 Return (Local0) }
diff --git a/src/mainboard/lenovo/x201/acpi/gpe.asl b/src/mainboard/lenovo/x201/acpi/gpe.asl index 62e7b37..9984636 100644 --- a/src/mainboard/lenovo/x201/acpi/gpe.asl +++ b/src/mainboard/lenovo/x201/acpi/gpe.asl @@ -5,8 +5,8 @@ Method(_L18, 0, NotSerialized) { /* Read EC register to clear wake status */ - Store(_SB.PCI0.LPCB.EC.WAKE, Local0) + Local0 = _SB.PCI0.LPCB.EC.WAKE /* So that we don't get a warning that Local0 is unused. */ - Increment (Local0) + Local0++ } } diff --git a/src/mainboard/lenovo/x60/acpi/gpe.asl b/src/mainboard/lenovo/x60/acpi/gpe.asl index 62e7b37..9984636 100644 --- a/src/mainboard/lenovo/x60/acpi/gpe.asl +++ b/src/mainboard/lenovo/x60/acpi/gpe.asl @@ -5,8 +5,8 @@ Method(_L18, 0, NotSerialized) { /* Read EC register to clear wake status */ - Store(_SB.PCI0.LPCB.EC.WAKE, Local0) + Local0 = _SB.PCI0.LPCB.EC.WAKE /* So that we don't get a warning that Local0 is unused. */ - Increment (Local0) + Local0++ } }