diff options
author | Felix Singer <felixsinger@posteo.net> | 2022-12-25 16:54:45 +0100 |
---|---|---|
committer | Elyes Haouas <ehaouas@noos.fr> | 2022-12-26 19:57:44 +0000 |
commit | 8171364d064afe5e714e4d6faee3cf44d843eb19 (patch) | |
tree | 077fa3a7ea51d211bdc321a2132bc8ead1638323 /src/ec/hp/kbc1126 | |
parent | eaa31d95c239a0a9b3c12a69ccbc71ac8f6f6034 (diff) |
tree/acpi: Replace Divide(a,b,c,d) with ASL 2.0 syntax
Replace `Divide (a, b, c, d)` with these instructions:
c = a % b
d = a / b
Change-Id: I44366be5b5145a5d19f85df7a2f338866cb9c8b0
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Diffstat (limited to 'src/ec/hp/kbc1126')
-rw-r--r-- | src/ec/hp/kbc1126/acpi/battery.asl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/ec/hp/kbc1126/acpi/battery.asl b/src/ec/hp/kbc1126/acpi/battery.asl index 5a5632b92a..e657f4ca6f 100644 --- a/src/ec/hp/kbc1126/acpi/battery.asl +++ b/src/ec/hp/kbc1126/acpi/battery.asl @@ -42,8 +42,12 @@ Mutex (BTMX, 0x00) Method (ITLB, 0, NotSerialized) { - Divide ((NLB1 + 0x09), 0x0A, Local0, Local1) - Divide ((0x96 + 0x09), 0x0A, Local0, Local2) + Local0 = (NLB1 + 9) % 0x0a + Local1 = (NLB1 + 9) / 0x0a + + Local0 = (0x96 + 9) % 0x0a + Local2 = (0x96 + 9) / 0x0a + Local0 = Local0 LB1 = Local1 LB2 = Local2 @@ -229,7 +233,8 @@ Method (\ISTR, 2, Serialized) While (Local1) { Local1-- - Divide (Local0, 10, Local2, Local0) + Local2 = Local0 % 10 + Local0 = Local0 / 10 NUMB[Local1] = Local2 + 48 } ToString (NUMB, Arg1, Local3) |