summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Singer <felix.singer@secunet.com>2021-07-26 18:38:42 +0200
committerNico Huber <nico.h@gmx.de>2021-07-28 13:49:33 +0000
commit2b902ebf95822ec33d26397e0094a55eac5eabb4 (patch)
tree8f5f8fa2ecf8a30f812b969e761c2449e52fc018
parent7f4d53a21c737a21dc2563189cb537b036b119dd (diff)
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>
-rw-r--r--src/ec/roda/it8518/acpi/battery.asl12
-rw-r--r--src/ec/roda/it8518/acpi/ec.asl4
2 files changed, 8 insertions, 8 deletions
diff --git a/src/ec/roda/it8518/acpi/battery.asl b/src/ec/roda/it8518/acpi/battery.asl
index 12c07b1f39..882168fc9e 100644
--- a/src/ec/roda/it8518/acpi/battery.asl
+++ b/src/ec/roda/it8518/acpi/battery.asl
@@ -47,8 +47,8 @@ Device (BAT0)
Local0 = 0x0F
Local1 = ECPS
- And (Local1, 0x02, Local1)
- If (LEqual (Local1, 0x02))
+ Local1 &= 0x02
+ If (Local1 == 0x02)
{
Local0 = 0x1F
}
@@ -76,10 +76,10 @@ Device (BAT0)
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 @@ Device (BAT0)
}
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 6c8a738e03..76c0b63d92 100644
--- a/src/ec/roda/it8518/acpi/ec.asl
+++ b/src/ec/roda/it8518/acpi/ec.asl
@@ -134,7 +134,7 @@ Device (EC0)
Local0 = BRIG
Increment (Local0)
- If (LGreater (Local0, 0xAA)) {
+ If (Local0 > 0xAA) {
Local0 = 0xAA
}
BRIG = Local0
@@ -150,7 +150,7 @@ Device (EC0)
Local0 = BRIG
Decrement (Local0)
- If (LLess (Local0, 0xA0))
+ If (Local0 < 0xA0)
{
Local0 = 0xA0
}