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>
This commit is contained in:
Felix Singer 2021-07-26 18:38:42 +02:00 committed by Nico Huber
parent 7f4d53a21c
commit 2b902ebf95
2 changed files with 8 additions and 8 deletions

View File

@ -47,8 +47,8 @@ Device (BAT0)
Local0 = 0x0F Local0 = 0x0F
Local1 = ECPS Local1 = ECPS
And (Local1, 0x02, Local1) Local1 &= 0x02
If (LEqual (Local1, 0x02)) If (Local1 == 0x02)
{ {
Local0 = 0x1F Local0 = 0x1F
} }
@ -76,10 +76,10 @@ Device (BAT0)
Printf ("-----> BAT0: _BST") Printf ("-----> BAT0: _BST")
Local0 = B0ST Local0 = B0ST
And (Local0, 0x40, Local0) Local0 &= 0x40
If (LEqual (Local0, 0x40)) If (Local0 == 0x40)
{ {
If (LEqual (PWRS, 1)) If (PWRS == 1)
{ {
PBST[0] = 0x00 PBST[0] = 0x00
} }
@ -94,7 +94,7 @@ Device (BAT0)
} }
Local1 = B0AC Local1 = B0AC
If (LGreaterEqual (Local1, 0x8000)) If (Local1 >= 0x8000)
{ {
Subtract (0x00010000, Local1, Local1) Subtract (0x00010000, Local1, Local1)
} }

View File

@ -134,7 +134,7 @@ Device (EC0)
Local0 = BRIG Local0 = BRIG
Increment (Local0) Increment (Local0)
If (LGreater (Local0, 0xAA)) { If (Local0 > 0xAA) {
Local0 = 0xAA Local0 = 0xAA
} }
BRIG = Local0 BRIG = Local0
@ -150,7 +150,7 @@ Device (EC0)
Local0 = BRIG Local0 = BRIG
Decrement (Local0) Decrement (Local0)
If (LLess (Local0, 0xA0)) If (Local0 < 0xA0)
{ {
Local0 = 0xA0 Local0 = 0xA0
} }