tree: Replace And(a,b,c) with ASL 2.0 syntax

Replace `And (a, b, c)` with `c = a & b`, respectively `c &= b` where
possible.

Change-Id: Ie558f9d0b597c56ca3b31498edb68de8877d3a2f
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70850
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:11:17 +01:00
parent 86bc2e708d
commit 35e65a8bc3
21 changed files with 60 additions and 60 deletions

View File

@@ -630,7 +630,7 @@ Device (EC0)
*/
Method (UPPC, 1, Serialized)
{
And (USPP, Not (1 << Arg0), USPP)
USPP &= Not (1 << Arg0)
}
#endif

View File

@@ -131,7 +131,7 @@ Device (EC0)
Local0 = CTMP
// Use Local0 to avoid iasl warning: Method Local is set but never used
And(Local0, Ones, Local0)
Local0 &= Ones
// Find and program number of P-States
MPST = SizeOf (\_SB.CP00._PSS)

View File

@@ -244,7 +244,7 @@ Device (BATX)
If (ACPW)
{
// Set only charging/discharging bits
And (Local0, 0x03, Local1)
Local1 = Local0 & 3
}
Else
{
@@ -253,7 +253,7 @@ Device (BATX)
}
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Local4 = Local0 & 4
Local1 |= Local4
PBST[0] = Local1

View File

@@ -61,7 +61,7 @@ Device (BAT0)
{
Local0 = Arg0 >> 8
Local1 = Arg0 << 8
And (Local1, 0xFF00, Local1)
Local1 &= 0xFF00
Local0 |= Local1
If (Local0 == 0xFFFF) {
Local0 = 0xFFFFFFFF
@@ -111,14 +111,14 @@ Device (BAT0)
// Check if AC is present
If (ACEX) {
// Set only charging/discharging bits
And (Local0, 0x03, Local1)
Local1 = Local0 & 3
} Else {
// Always discharging when on battery power
Local1 = 0x01
}
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Local4 = Local0 & 4
Local1 |= Local4
PBST[0] = Local1