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>
This commit is contained in:
Felix Singer
2022-12-16 07:54:16 +01:00
parent 35e65a8bc3
commit d252776668
13 changed files with 56 additions and 56 deletions

View File

@@ -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

View File

@@ -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)
}

View File

@@ -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