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

Replace `ShiftRight (a, b, c)` with `c = a >> b`. One case was
simplified to just `a >> b`.

Change-Id: I889012b0a3067138e6f02d3fe8e97151effb5c2a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70840
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
This commit is contained in:
Felix Singer
2022-12-16 02:25:30 +01:00
parent 100f92c54f
commit 034920c1d4
7 changed files with 12 additions and 12 deletions

View File

@@ -209,7 +209,7 @@ Method (BBST, 4, Serialized)
Local2 = BTDF
// See if within ~6% of full
ShiftRight (Local2, 4, Local3)
Local3 = Local2 >> 4
If (Local1 > Local2 - Local3 && Local1 < Local2 + Local3)
{
Local1 = Local2

View File

@@ -184,9 +184,9 @@ Device (HKEY)
HAST = One
If (HBDC) {
ShiftRight (Arg0 & 2, 1, Local0)
Local0 = (Arg0 & 2) >> 1
\_SB.PCI0.LPCB.EC.BTEB = Local0
ShiftRight (Arg0 & 4, 2, Local0)
Local0 = (Arg0 & 4) >> 2
WBDC = Local0
}
}
@@ -226,9 +226,9 @@ Device (HKEY)
HAST = One
If (HWAN) {
ShiftRight (Arg0 & 2, 1, Local0)
Local0 = (Arg0 & 2) >> 1
\_SB.PCI0.LPCB.EC.WWEB = Local0
ShiftRight (Arg0 & 4, 2, WWAN)
WWAN = (Arg0 & 4) >> 2
}
}
@@ -288,7 +288,7 @@ Device (HKEY)
Method (SUWB, 1)
{
If (HUWB) {
ShiftRight (Arg0 & 2, 1, Local0)
Local0 = (Arg0 & 2) >> 1
\_SB.PCI0.LPCB.EC.UWBE = Local0
}
}

View File

@@ -316,7 +316,7 @@ Device (BATX)
Local2 = SBRS
// See if within ~3% of full
ShiftRight (Local2, 5, Local3)
Local3 = Local2 >> 5
If (Local1 > Local2 - Local3 && Local1 < Local2 + Local3)
{
Local1 = Local2

View File

@@ -59,7 +59,7 @@ Device (BAT0)
// Swap bytes in a word
Method (SWAB, 1, NotSerialized)
{
ShiftRight (Arg0, 8, Local0)
Local0 = Arg0 >> 8
ShiftLeft (Arg0, 8, Local1)
And (Local1, 0xFF00, Local1)
Or (Local0, Local1, Local0)
@@ -156,7 +156,7 @@ Device (BAT0)
Local2 = SWAB (BTDF)
// See if within ~3% of full
ShiftRight (Local2, 5, Local3)
Local3 = Local2 >> 5
If (Local1 > Local2 - Local3 && Local1 < Local2 + Local3)
{
Local1 = Local2