Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/56606 )
Change subject: ec/roda/it8518/acpi: Use bit-wise and logical operators ......................................................................
ec/roda/it8518/acpi: Use bit-wise and logical operators
Use bit-wise and logical operators instead of their equivalent methods.
Built roda/rw11 with `BUILD_TIMELESS=1` and coreboot.rom remains the same.
Change-Id: I30807e14b2a9a8203a76d418f586423bcaec2a3a Signed-off-by: Felix Singer felix.singer@secunet.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/56606 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/ec/roda/it8518/acpi/battery.asl M src/ec/roda/it8518/acpi/ec.asl 2 files changed, 8 insertions(+), 8 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/ec/roda/it8518/acpi/battery.asl b/src/ec/roda/it8518/acpi/battery.asl index 12c07b1..882168f 100644 --- a/src/ec/roda/it8518/acpi/battery.asl +++ b/src/ec/roda/it8518/acpi/battery.asl @@ -47,8 +47,8 @@ Local0 = 0x0F
Local1 = ECPS - And (Local1, 0x02, Local1) - If (LEqual (Local1, 0x02)) + Local1 &= 0x02 + If (Local1 == 0x02) { Local0 = 0x1F } @@ -76,10 +76,10 @@ Printf ("-----> BAT0: _BST")
Local0 = B0ST - And (Local0, 0x40, Local0) - If (LEqual (Local0, 0x40)) + Local0 &= 0x40 + If (Local0 == 0x40) { - If (LEqual (PWRS, 1)) + If (PWRS == 1) { PBST[0] = 0x00 } @@ -94,7 +94,7 @@ }
Local1 = B0AC - If (LGreaterEqual (Local1, 0x8000)) + If (Local1 >= 0x8000) { Subtract (0x00010000, Local1, Local1) } diff --git a/src/ec/roda/it8518/acpi/ec.asl b/src/ec/roda/it8518/acpi/ec.asl index 6c8a738..76c0b63 100644 --- a/src/ec/roda/it8518/acpi/ec.asl +++ b/src/ec/roda/it8518/acpi/ec.asl @@ -134,7 +134,7 @@
Local0 = BRIG Increment (Local0) - If (LGreater (Local0, 0xAA)) { + If (Local0 > 0xAA) { Local0 = 0xAA } BRIG = Local0 @@ -150,7 +150,7 @@
Local0 = BRIG Decrement (Local0) - If (LLess (Local0, 0xA0)) + If (Local0 < 0xA0) { Local0 = 0xA0 }