mb/lenovo/x200: Convert to ASL 2.0 syntax

Generated 'build/dsdt.dsl' are identical.

Change-Id: I0767afcb0ffdd6f9a8d83209955d42d9e89325e9
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
This commit is contained in:
Elyes HAOUAS 2020-10-08 09:57:22 +02:00 committed by Michael Niewöhner
parent 635ac11deb
commit 965f98c8dc
3 changed files with 22 additions and 23 deletions

View File

@ -12,14 +12,14 @@ Scope (\_SB)
{
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 @@ Scope (\_SB)
/* 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 @@ Scope(\_SB.PCI0.LPCB.EC)
/* 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 @@ Scope(\_SB.PCI0.LPCB.EC)
/* 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)
}

View File

@ -5,8 +5,8 @@ Scope (\_GPE)
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++
}
}

View File

@ -26,12 +26,12 @@ Method(_WAK,1)
// was inserted while a sleep state was active.
// Are we going to S3?
If (LEqual(Arg0, 3)) {
If (Arg0 == 3) {
// ..
}
// Are we going to S4?
If (LEqual(Arg0, 4)) {
If (Arg0 == 4) {
// ..
}