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 /src/ec/smsc/mec1308/acpi | |
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>
Diffstat (limited to 'src/ec/smsc/mec1308/acpi')
-rw-r--r-- | src/ec/smsc/mec1308/acpi/battery.asl | 4 |
1 files changed, 2 insertions, 2 deletions
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 |