diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-12-16 07:54:16 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-12-23 10:18:55 +0000 |
commit | d25277666829d7ed9897598d3ed46fdee0613106 (patch) | |
tree | a8aa22ed086730113ae0fefb2584fb0f424cc5c4 /src/ec | |
parent | 35e65a8bc36628baad7d2ed94bef7619971e6d88 (diff) |
tree: Replace And(a,b) with ASL 2.0 syntax
Replace `And (a, b)` with `a & b`.
Change-Id: Id8bbd1a477e6286bbcb5fa31afd1c7a860b1c7dc
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70851
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec')
-rw-r--r-- | src/ec/google/chromeec/acpi/battery.asl | 2 | ||||
-rw-r--r-- | src/ec/kontron/it8516e/acpi/pm_channels.asl | 8 | ||||
-rw-r--r-- | src/ec/quanta/it8518/acpi/battery.asl | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index a98117126b..5e881e54c8 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -44,7 +44,7 @@ Method (BSTA, 1, Serialized) Return (Zero) } - If (And(Not(BTSW (Arg0)), BTEX)) { + If (Not(BTSW (Arg0)) & BTEX) { Local0 = 0x1F } Else { Local0 = 0x0F diff --git a/src/ec/kontron/it8516e/acpi/pm_channels.asl b/src/ec/kontron/it8516e/acpi/pm_channels.asl index 8f3fc7e1d2..ca414f02df 100644 --- a/src/ec/kontron/it8516e/acpi/pm_channels.asl +++ b/src/ec/kontron/it8516e/acpi/pm_channels.asl @@ -32,7 +32,7 @@ Device (PM1) { Method (CTK) { Local0 = EC_READ (0x52) - If (And (Local0, EC_ERROR_MASK)) { + If (Local0 & EC_ERROR_MASK) { Return (0) } Local0 *= 10 @@ -74,17 +74,17 @@ Device (PM2) { { Acquire (EC_MUTEX, 0xffff) Local0 = SEND_EC_COMMAND (0x20) /* GET_CPUTEMP */ - If (And (Local0, EC_ERROR_MASK)) { + If (Local0 & EC_ERROR_MASK) { Release (EC_MUTEX) Return (0) } Local0 = RECV_EC_DATA () /* Temp low byte in 64th °C */ - If (And (Local0, EC_ERROR_MASK)) { + If (Local0 & EC_ERROR_MASK) { Release (EC_MUTEX) Return (0) } Local1 = RECV_EC_DATA () /* Temp high byte in 64th °C */ - If (And (Local1, EC_ERROR_MASK)) { + If (Local1 & EC_ERROR_MASK) { Release (EC_MUTEX) Return (0) } diff --git a/src/ec/quanta/it8518/acpi/battery.asl b/src/ec/quanta/it8518/acpi/battery.asl index 53bcb6a10f..fbbae1fdf2 100644 --- a/src/ec/quanta/it8518/acpi/battery.asl +++ b/src/ec/quanta/it8518/acpi/battery.asl @@ -216,13 +216,13 @@ Device (BATX) // // Get battery state from EC - If (And (HB0S, 0x20)) + If (HB0S & 0x20) { Local0 = 2 } Else { - if (And (HB0S, 0x40)) + if (HB0S & 0x40) { Local0 = One } @@ -233,7 +233,7 @@ Device (BATX) } // Set critical flag if battery is empty - If (And (HB0S, 0x0F) == 0) + If (HB0S & 0x0F == 0) { Local0 |= 4 } @@ -263,7 +263,7 @@ Device (BATX) Local1 = ECAC If (Local1 >= 0x8000) { - If (And (Local0, 1)) + If (Local0 & 1) { Local1 = 0x10000 - Local1 } @@ -275,7 +275,7 @@ Device (BATX) } Else { - If (!(AND (Local0, 2))) + If (!(Local0 & 2)) { // Battery is not charging Local1 = Zero |