HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46100 )
Change subject: ec/kontron/it8516e: Convert to ASL 2.0 syntax ......................................................................
ec/kontron/it8516e: Convert to ASL 2.0 syntax
Change-Id: I3b8e0582aad629558bc93265648d1908a4355aba Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/ec/kontron/it8516e/acpi/pm_channels.asl 1 file changed, 11 insertions(+), 11 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/00/46100/1
diff --git a/src/ec/kontron/it8516e/acpi/pm_channels.asl b/src/ec/kontron/it8516e/acpi/pm_channels.asl index ebfd872..ec0c41e 100644 --- a/src/ec/kontron/it8516e/acpi/pm_channels.asl +++ b/src/ec/kontron/it8516e/acpi/pm_channels.asl @@ -31,12 +31,12 @@ */ Method (CTK) { - Store (EC_READ (0x52), Local0) - If (And (Local0, EC_ERROR_MASK)) { + Local0 = EC_READ (0x52) + If (Local0 & EC_ERROR_MASK) { Return (0) } - Multiply (Local0, 10, Local0) /* Convert to 10th °C */ - Return (Add (Local0, 2732)) /* Return as 10th Kelvin */ + Local0 *= 10 /* Convert to 10th °C */ + Return (Local0 + 2732) /* Return as 10th Kelvin */ } } #endif @@ -74,25 +74,25 @@ { Acquire (EC_MUTEX, 0xffff) Store (SEND_EC_COMMAND (0x20), Local0) /* GET_CPUTEMP */ - If (And (Local0, EC_ERROR_MASK)) { + If (Local0 & EC_ERROR_MASK) { Release (EC_MUTEX) Return (0) } - Store (RECV_EC_DATA (), Local0) /* Temp low byte in 64th °C */ - If (And (Local0, EC_ERROR_MASK)) { + Local0 = RECV_EC_DATA () /* Temp low byte in 64th °C */ + If (Local0 & EC_ERROR_MASK) { Release (EC_MUTEX) Return (0) } Store (RECV_EC_DATA (), Local1) /* Temp high byte in 64th °C */ - If (And (Local1, EC_ERROR_MASK)) { + If (Local1 & EC_ERROR_MASK) { Release (EC_MUTEX) Return (0) } Release (EC_MUTEX)
- Or (ShiftLeft (Local1, 8), Local0, Local0) - Store (Divide (Multiply (Local0, 10), 64), Local0) /* Convert to 10th °C */ - Return (Add (Local0, 2732)) /* Return as 10th Kelvin */ + Local0 |= Local1 << 8 + Local0 = (Local0 * 10) / 64 /* Convert to 10th °C */ + Return (Local0 + 2732) /* Return as 10th Kelvin */ } } #endif