Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/60463 )
Change subject: ec/smsc/mec1308/acpi: Replace LAnd() operations with ACPI 2.0 syntax ......................................................................
ec/smsc/mec1308/acpi: Replace LAnd() operations with ACPI 2.0 syntax
Replace `LAnd (a, b)` with `a && b`.
Change-Id: I8c3323e1d367872e9f2a134eaf4ebd9e35f74313 Signed-off-by: Felix Singer felixsinger@posteo.net --- M src/ec/smsc/mec1308/acpi/battery.asl 1 file changed, 5 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/63/60463/1
diff --git a/src/ec/smsc/mec1308/acpi/battery.asl b/src/ec/smsc/mec1308/acpi/battery.asl index a072c93..bbbcfe2 100644 --- a/src/ec/smsc/mec1308/acpi/battery.asl +++ b/src/ec/smsc/mec1308/acpi/battery.asl @@ -133,8 +133,7 @@ //
Store (SWAB (BTPR), Local1) - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), - LGreaterEqual (Local1, 0x8000))) { + If (LNotEqual (Local1, 0xFFFFFFFF) && LGreaterEqual (Local1, 0x8000)) { Xor (Local1, 0xFFFF, Local1) Increment (Local1) } @@ -144,13 +143,12 @@ // 2: BATTERY REMAINING CAPACITY // Store (SWAB (BTRA), Local1) - If (LAnd (LNotEqual (Local1, 0xFFFFFFFF), - LGreaterEqual (Local1, 0x8000))) { + If (LNotEqual (Local1, 0xFFFFFFFF) && LGreaterEqual (Local1, 0x8000)) { Xor (Local1, 0xFFFF, Local1) Increment (Local1) }
- If (LAnd (BFWK, LAnd (ACEX, LNot (Local0)))) { + If (BFWK && ACEX && LNot (Local0)) { // On AC power and battery is neither charging // nor discharging. Linux expects a full battery // to report same capacity as last full charge. @@ -159,8 +157,8 @@
// See if within ~3% of full ShiftRight (Local2, 5, Local3) - If (LAnd (LGreater (Local1, Subtract (Local2, Local3)), - LLess (Local1, Add (Local2, Local3)))) + If (LGreater (Local1, Subtract (Local2, Local3)) && + LLess (Local1, Add (Local2, Local3))) { Store (Local2, Local1) }