diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-12-16 02:25:30 +0100 |
---|---|---|
committer | Felix Singer <felixsinger@posteo.net> | 2022-12-23 03:16:35 +0000 |
commit | 034920c1d438ff39f9243a1d6b0d41957405d34c (patch) | |
tree | 7f31b5de997fbd30ef15cf854c916f24c11fb627 | |
parent | 100f92c54f2f199e98d817bd16ae7530e8ad719c (diff) |
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>
-rw-r--r-- | src/ec/google/chromeec/acpi/battery.asl | 2 | ||||
-rw-r--r-- | src/ec/lenovo/h8/acpi/thinkpad.asl | 10 | ||||
-rw-r--r-- | src/ec/quanta/it8518/acpi/battery.asl | 2 | ||||
-rw-r--r-- | src/ec/smsc/mec1308/acpi/battery.asl | 4 | ||||
-rw-r--r-- | src/mainboard/aopen/dxplplusu/acpi/e7505_pri.asl | 2 | ||||
-rw-r--r-- | src/mainboard/aopen/dxplplusu/acpi/e7505_sec.asl | 2 | ||||
-rw-r--r-- | src/mainboard/google/cyan/variants/terra/include/variant/acpi/mainboard.asl | 2 |
7 files changed, 12 insertions, 12 deletions
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl index 0e48cac84a..114a10c36c 100644 --- a/src/ec/google/chromeec/acpi/battery.asl +++ b/src/ec/google/chromeec/acpi/battery.asl @@ -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 diff --git a/src/ec/lenovo/h8/acpi/thinkpad.asl b/src/ec/lenovo/h8/acpi/thinkpad.asl index bb2b94a181..e1c979eaae 100644 --- a/src/ec/lenovo/h8/acpi/thinkpad.asl +++ b/src/ec/lenovo/h8/acpi/thinkpad.asl @@ -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 } } diff --git a/src/ec/quanta/it8518/acpi/battery.asl b/src/ec/quanta/it8518/acpi/battery.asl index e63cefb7c5..82269010ef 100644 --- a/src/ec/quanta/it8518/acpi/battery.asl +++ b/src/ec/quanta/it8518/acpi/battery.asl @@ -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 diff --git a/src/ec/smsc/mec1308/acpi/battery.asl b/src/ec/smsc/mec1308/acpi/battery.asl index 257897fb48..dbccf0fa21 100644 --- a/src/ec/smsc/mec1308/acpi/battery.asl +++ b/src/ec/smsc/mec1308/acpi/battery.asl @@ -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 diff --git a/src/mainboard/aopen/dxplplusu/acpi/e7505_pri.asl b/src/mainboard/aopen/dxplplusu/acpi/e7505_pri.asl index 353f5e7485..5f27bff67c 100644 --- a/src/mainboard/aopen/dxplplusu/acpi/e7505_pri.asl +++ b/src/mainboard/aopen/dxplplusu/acpi/e7505_pri.asl @@ -48,7 +48,7 @@ Device (MBRS) CreateDWordField (MSBF, \_SB.MBRS._Y1D._MAX, MS01) CreateDWordField (MSBF, \_SB.MBRS._Y1D._LEN, MEM2) And (\_SB.PCI0.TOLM, 0xF800, Local1) - ShiftRight (Local1, 0x04, Local1) + Local1 >>= 4 Local1-- If (Local1 > 0x10) { diff --git a/src/mainboard/aopen/dxplplusu/acpi/e7505_sec.asl b/src/mainboard/aopen/dxplplusu/acpi/e7505_sec.asl index 400a5d7092..a2537c271b 100644 --- a/src/mainboard/aopen/dxplplusu/acpi/e7505_sec.asl +++ b/src/mainboard/aopen/dxplplusu/acpi/e7505_sec.asl @@ -42,7 +42,7 @@ Method (_CRS, 0, NotSerialized) CreateDWordField (PBRS, \_SB.PCI0._Y08._MAX, MEMH) CreateDWordField (PBRS, \_SB.PCI0._Y08._LEN, LENM) And (\_SB.PCI0.TOLM, 0xF800, Local1) - ShiftRight (Local1, 0x04, Local1) + Local1 >>= 4 ShiftLeft (Local1, 0x14, MEML) MEMH = IO_APIC_ADDR - 1 LENM = IO_APIC_ADDR - MEML diff --git a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/mainboard.asl b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/mainboard.asl index 0bee309e14..1f46c69aeb 100644 --- a/src/mainboard/google/cyan/variants/terra/include/variant/acpi/mainboard.asl +++ b/src/mainboard/google/cyan/variants/terra/include/variant/acpi/mainboard.asl @@ -10,7 +10,7 @@ Scope (\_SB) { Method (GPID, 0, Serialized) // GPID: Get Project ID for Terra2/Terra3 { - And( ShiftRight (\BDID, 3, Local0), 0x01, Local0) + And(\BDID >> 3, 0x01, Local0) Return (Local0) } } |