aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/parrot/acpi/thermal.asl
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-08 09:33:36 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-01-28 09:26:03 +0000
commit316466b76513dad87f1b7c90eab142ddea955fcc (patch)
tree83e4d001422d8f3b6012f9ee88f5978683bb0a8a /src/mainboard/google/parrot/acpi/thermal.asl
parentdb11fa46ad4611d32e56e7b16c4b1cb6057404da (diff)
mb/google/parrot: Convert to ASL 2.0 syntax
Change-Id: Ie802b540cea13000227c969bbc262f034d1b6b84 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46177 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/mainboard/google/parrot/acpi/thermal.asl')
-rw-r--r--src/mainboard/google/parrot/acpi/thermal.asl20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/mainboard/google/parrot/acpi/thermal.asl b/src/mainboard/google/parrot/acpi/thermal.asl
index 852f58f907..2d32d47ba1 100644
--- a/src/mainboard/google/parrot/acpi/thermal.asl
+++ b/src/mainboard/google/parrot/acpi/thermal.asl
@@ -26,10 +26,10 @@ Scope (\_TZ)
// Convert from Degrees C to 1/10 Kelvin for ACPI
Method (CTOK, 1) {
// 10th of Degrees C
- Multiply (Arg0, 10, Local0)
+ Local0 = Arg0 * 10
// Convert to Kelvin
- Add (Local0, 2732, Local0)
+ Local0 += 2732
Return (Local0)
}
@@ -55,23 +55,23 @@ Scope (\_TZ)
Method (_TMP, 0, Serialized)
{
// Get CPU Temperature from the Embedded Controller
- Store (\_SB.PCI0.LPCB.EC0.CTMP, Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.CTMP
// Re-read from EC if the temperature is very high to
// avoid OS shutdown if we got a bad reading.
- If (LGreaterEqual (Local0, \TCRT)) {
- Store (\_SB.PCI0.LPCB.EC0.CTMP, Local0)
- If (LGreaterEqual (Local0, \TCRT)) {
+ If (Local0 >= \TCRT) {
+ Local0 = \_SB.PCI0.LPCB.EC0.CTMP
+ If (Local0 >= \TCRT) {
// Check if this is an early read
- If (LLess (CRDC, IRDC)) {
- Store (0, Local0)
+ If (CRDC < IRDC) {
+ Local0 = 0
}
}
}
// Keep track of first few reads by the OS
- If (LLess (CRDC, IRDC)) {
- Increment (CRDC)
+ If (CRDC < IRDC) {
+ CRDC++
}
Return (CTOK (Local0))