HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/45875 )
Change subject: sb/amd/cimx/sb800/acpi: Convert 'smbus.asl' to ASL 2.0 syntax ......................................................................
sb/amd/cimx/sb800/acpi: Convert 'smbus.asl' to ASL 2.0 syntax
Also, fix typo on "success".
Change-Id: I6fd7056d8053f0097b5c9de6b4e2e6db38910a2e Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/southbridge/amd/cimx/sb800/acpi/smbus.asl 1 file changed, 31 insertions(+), 31 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/75/45875/1
diff --git a/src/southbridge/amd/cimx/sb800/acpi/smbus.asl b/src/southbridge/amd/cimx/sb800/acpi/smbus.asl index a676893..b99da33 100644 --- a/src/southbridge/amd/cimx/sb800/acpi/smbus.asl +++ b/src/southbridge/amd/cimx/sb800/acpi/smbus.asl @@ -19,37 +19,37 @@ }
Method (WCLR, 0, NotSerialized) { /* clear SMBUS status register */ - Store (0x1E, HSTS) - Store (0xFA, Local0) - While (LAnd (LNotEqual (And (HSTS, 0x1E), Zero), LGreater (Local0, Zero))) { + HSTS = 0x1E + Local0 = 0xFA + While ((HSTS & 0x1E) != Zero) && (Local0 > 0)) { Stall (0x64) - Decrement (Local0) + Local0-- }
Return (Local0) }
Method (SWTC, 1, NotSerialized) { - Store (Arg0, Local0) - Store (0x07, Local2) - Store (One, Local1) - While (LEqual (Local1, One)) { - Store (And (HSTS, 0x1E), Local3) - If (LNotEqual (Local3, Zero)) { /* read sucess */ - If (LEqual (Local3, 0x02)) { - Store (Zero, Local2) + Local0 = Arg0 + Local2 = 0x07 + Local1 = 1 + While (Local1 == 1) { + Local3 = HSTS & 0x1E + If (Local3 != 0) { /* read success */ + If (Local3 != 0x02) { + Local2 = 0 }
- Store (Zero, Local1) + Local1 = 0 } Else { - If (LLess (Local0, 0x0A)) { /* read failure */ - Store (0x10, Local2) - Store (Zero, Local1) + If (Local0 < 0x0A) { /* read failure */ + Local2 = 0x10 + Local1 = 0 } Else { Sleep (0x0A) /* 10 ms, try again */ - Subtract (Local0, 0x0A, Local0) + Local0 -= 0x0A } } } @@ -58,29 +58,29 @@ }
Method (SMBR, 3, NotSerialized) { - Store (0x07, Local0) - If (LEqual (Acquire (SBX0, 0xFFFF), Zero)) { - Store (WCLR (), Local0) /* clear SMBUS status register before read data */ - If (LEqual (Local0, Zero)) { + Local0 = 0x07 + If (Acquire (SBX0, 0xFFFF) == 0) { + Local0 = WCLR () /* clear SMBUS status register before read data */ + If (Local0 == 0) { Release (SBX0) Return (0x0) }
- Store (0x1F, HSTS) - Store (Or (ShiftLeft (Arg1, One), One), HADD) - Store (Arg2, HCMD) - If (LEqual (Arg0, 0x07)) { - Store (0x48, HCNT) /* read byte */ + HSTS = 0x1F + HADD = (Arg1 << 1) | 1 + HCMD = Arg2 + If (Arg0 == 0x07) { + HCNT = 0x48 /* read byte */ }
- Store (SWTC (0x03E8), Local1) /* 1000 ms */ - If (LEqual (Local1, Zero)) { - If (LEqual (Arg0, 0x07)) { - Store (DAT0, Local0) + Local1 = SWTC (0x03E8) /* 1000 ms */ + If (Local1 == 0) { + If (Arg0 == 0x07) { + Local0 = DAT0 } } Else { - Store (Local1, Local0) + Local0 = Local1 }
Release (SBX0)