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

Replace `Or (a, b, c)` with `c = a | b`, respectively `c |= b` where
possible.

Change-Id: Icf194b248075f290de90fb4bc4e9a0cd9d76ec61
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70846
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 04:40:39 +01:00
parent 372573eaff
commit 86bc2e708d
25 changed files with 138 additions and 138 deletions

View File

@@ -175,7 +175,7 @@ Method (BBST, 4, Serialized)
// Check for critical battery level
If (BFCR) {
Or (Local1, 0x04, Local1)
Local1 |= 4
}
Arg1[0] = Local1

View File

@@ -621,7 +621,7 @@ Device (EC0)
*/
Method (UPPS, 1, Serialized)
{
Or (USPP, 1 << Arg0, USPP)
USPP |= 1 << Arg0
}
/*

View File

@@ -90,7 +90,7 @@ Device (PM2) {
}
Release (EC_MUTEX)
Or (Local1 << 8, Local0, Local0)
Local0 |= Local1 << 8
Local0 *= 10 / 64 /* Convert to 10th °C */
Return (Local0 + 2732) /* Return as 10th Kelvin */
}

View File

@@ -87,7 +87,7 @@ Device (HKEY)
Local0 = One << (Arg0 - 1)
If (Arg1)
{
Or (DHKN, Local0, DHKN)
DHKN |= Local0
}
Else
{
@@ -165,9 +165,9 @@ Device (HKEY)
Local0 = One
If(\_SB.PCI0.LPCB.EC.BTEB)
{
Or(Local0, 2, Local0)
Local0 |= 2
}
Or(Local0, WBDC << 2, Local0)
Local0 |= WBDC << 2
Return (Local0)
} Else {
Return (0)
@@ -207,9 +207,9 @@ Device (HKEY)
Local0 = One
If(\_SB.PCI0.LPCB.EC.WWEB)
{
Or(Local0, 2, Local0)
Local0 |= 2
}
Or(Local0, WWAN << 2, Local0)
Local0 |= WWAN << 2
Return (Local0)
} Else {
Return (0)
@@ -243,7 +243,7 @@ Device (HKEY)
If (HKBL) {
Local0 = 0x200
/* FIXME: Support 2bit brightness control */
Or (Local0, \_SB.PCI0.LPCB.EC.KBLT, Local0)
Local0 |= \_SB.PCI0.LPCB.EC.KBLT
Return (Local0)
} Else {
Return (0)
@@ -273,7 +273,7 @@ Device (HKEY)
Local0 = One
If(\_SB.PCI0.LPCB.EC.UWBE)
{
Or(Local0, 2, Local0)
Local0 |= 2
}
Return (Local0)
} Else {

View File

@@ -235,7 +235,7 @@ Device (BATX)
// Set critical flag if battery is empty
If (And (HB0S, 0x0F) == 0)
{
Or (Local0, 4, Local0)
Local0 |= 4
}
Local1 = Zero
@@ -254,7 +254,7 @@ Device (BATX)
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Or (Local1, Local4, Local1)
Local1 |= Local4
PBST[0] = Local1
//

View File

@@ -62,7 +62,7 @@ Device (BAT0)
Local0 = Arg0 >> 8
Local1 = Arg0 << 8
And (Local1, 0xFF00, Local1)
Or (Local0, Local1, Local0)
Local0 |= Local1
If (Local0 == 0xFFFF) {
Local0 = 0xFFFFFFFF
}
@@ -119,7 +119,7 @@ Device (BAT0)
// Flag if the battery level is critical
And (Local0, 0x04, Local4)
Or (Local1, Local4, Local1)
Local1 |= Local4
PBST[0] = Local1
// Notify if battery state has changed since last time