summaryrefslogtreecommitdiff
path: root/src/ec/google/chromeec/acpi
diff options
context:
space:
mode:
authorFelix Singer <felixsinger@posteo.net>2022-01-02 00:13:07 +0100
committerPaul Fagerburg <pfagerburg@chromium.org>2022-06-03 15:26:04 +0000
commit81623fbd96426782e1cf8853e37e0ba73cfe9983 (patch)
tree769512fa30cdb0e9b10b896d3caf4e4677f43f70 /src/ec/google/chromeec/acpi
parent3c799fa311ecc6e14189f5132bee081545881d48 (diff)
ec/google/chromeec/acpi: Replace Divide(a,b,,c) with ASL 2.0 syntax
Replace `Divide (a, b, , c)` with `c = a / b`. Change-Id: I26117087c09109cfc480cbe01d3761a02a12c61b Signed-off-by: Felix Singer <felixsinger@posteo.net> Reviewed-on: https://review.coreboot.org/c/coreboot/+/60655 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Diffstat (limited to 'src/ec/google/chromeec/acpi')
-rw-r--r--src/ec/google/chromeec/acpi/battery.asl8
-rw-r--r--src/ec/google/chromeec/acpi/ec.asl4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/ec/google/chromeec/acpi/battery.asl b/src/ec/google/chromeec/acpi/battery.asl
index ad7d741ba4..c4a787bbe1 100644
--- a/src/ec/google/chromeec/acpi/battery.asl
+++ b/src/ec/google/chromeec/acpi/battery.asl
@@ -78,11 +78,11 @@ Method (BBIF, 2, Serialized)
Store (Local0, Arg1[1])
// Design Capacity of Warning
- Divide (Local0 * DWRN, 100, , Local2)
+ Local2 = Local0 * DWRN / 100
Store (Local2, Arg1[5])
// Design Capacity of Low
- Divide (Local0 * DLOW, 100, , Local2)
+ Local2 = Local0 * DLOW / 100
Store (Local2, Arg1[6])
// Get battery info from mainboard
@@ -118,11 +118,11 @@ Method (BBIX, 2, Serialized)
Store (Local0, Arg1[2])
// Design Capacity of Warning
- Divide (Local0 * DWRN, 100, , Local2)
+ Local2 = Local0 * DWRN / 100
Store (Local2, Arg1[6])
// Design Capacity of Low
- Divide (Local0 * DLOW, 100, , Local2)
+ Local2 = Local0 * DLOW / 100
Store (Local2, Arg1[7])
// Cycle Count
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl
index ef4054fa5d..e2b55ff88d 100644
--- a/src/ec/google/chromeec/acpi/ec.asl
+++ b/src/ec/google/chromeec/acpi/ec.asl
@@ -423,7 +423,7 @@ Device (EC0)
Store (ToInteger (Arg0), ^PATI)
/* Temperature is passed in 1/10 Kelvin */
- Divide (ToInteger (Arg1), 10, , Local1)
+ Local1 = ToInteger (Arg1) / 10
/* Adjust by EC temperature offset */
^PATT = Local1 - ^TOFS
@@ -450,7 +450,7 @@ Device (EC0)
Store (ToInteger (Arg0), ^PATI)
/* Temperature is passed in 1/10 Kelvin */
- Divide (ToInteger (Arg1), 10, , Local1)
+ Local1 = ToInteger (Arg1) / 10
/* Adjust by EC temperature offset */
^PATT = Local1 - ^TOFS