From 81623fbd96426782e1cf8853e37e0ba73cfe9983 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Sun, 2 Jan 2022 00:13:07 +0100 Subject: [PATCH] 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/60655 Tested-by: build bot (Jenkins) Reviewed-by: Tim Wawrzynczak --- src/ec/google/chromeec/acpi/battery.asl | 8 ++++---- src/ec/google/chromeec/acpi/ec.asl | 4 ++-- 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