aboutsummaryrefslogtreecommitdiff
path: root/src/mainboard/google/auron/acpi/thermal.asl
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-08 09:30:03 +0200
committerPatrick Georgi <pgeorgi@google.com>2021-01-25 09:09:43 +0000
commit9c19a4fae8aa9487ee9283839ea4f89f07a790cd (patch)
tree1652122994ac67e8e9dcb69e19c0da5b298b142c /src/mainboard/google/auron/acpi/thermal.asl
parentf0712795b01f741a1b0ca725a0b3ddc8eee373f2 (diff)
mb/google/auron: Convert to ASL 2.0 syntax
Built google/auron (Lulu) provides identical 'dsdt.dsl' files. Change-Id: I5728b220e88d4105fcf6e5cee78662bc80fa01d7 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46169 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/mainboard/google/auron/acpi/thermal.asl')
-rw-r--r--src/mainboard/google/auron/acpi/thermal.asl50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/mainboard/google/auron/acpi/thermal.asl b/src/mainboard/google/auron/acpi/thermal.asl
index 4be4fe5c2a..fd05e7350f 100644
--- a/src/mainboard/google/auron/acpi/thermal.asl
+++ b/src/mainboard/google/auron/acpi/thermal.asl
@@ -24,10 +24,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)
}
@@ -53,56 +53,56 @@ Scope (\_TZ)
Method (TCHK, 0, Serialized)
{
// Get Temperature from TIN# set in NVS
- Store (\_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0)
+ Local0 = \_SB.PCI0.LPCB.EC0.TINS (TMPS)
// Check for sensor not calibrated
- If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNCA)) {
+ If (Local0 == \_SB.PCI0.LPCB.EC0.TNCA) {
Return (CTOK(0))
}
// Check for sensor not present
- If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNPR)) {
+ If (Local0 == \_SB.PCI0.LPCB.EC0.TNPR) {
Return (CTOK(0))
}
// Check for sensor not powered
- If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TNOP)) {
+ If (Local0 == \_SB.PCI0.LPCB.EC0.TNOP) {
Return (CTOK(0))
}
// Check for sensor bad reading
- If (LEqual (Local0, \_SB.PCI0.LPCB.EC0.TBAD)) {
+ If (Local0 == \_SB.PCI0.LPCB.EC0.TBAD) {
Return (CTOK(0))
}
// Adjust by offset to get Kelvin
- Add (\_SB.PCI0.LPCB.EC0.TOFS, Local0, Local0)
+ Local0 += \_SB.PCI0.LPCB.EC0.TOFS
// Convert to 1/10 Kelvin
- Multiply (Local0, 10, Local0)
+ Local0 *= 10
Return (Local0)
}
Method (_TMP, 0, Serialized)
{
// Get temperature from EC in deci-kelvin
- Store (TCHK (), Local0)
+ Local0 = TCHK ()
// Critical temperature in deci-kelvin
- Store (CTOK (\TCRT), Local1)
+ Local1 = CTOK (\TCRT)
- If (LGreaterEqual (Local0, Local1)) {
- Store ("CRITICAL TEMPERATURE", Debug)
- Store (Local0, Debug)
+ If (Local0 >= Local1) {
+ Debug = "CRITICAL TEMPERATURE"
+ Debug = Local0
// Wait 1 second for EC to re-poll
Sleep (1000)
// Re-read temperature from EC
- Store (TCHK (), Local0)
+ Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug)
- Store (Local0, Debug)
+ Debug = "RE-READ TEMPERATURE"
+ Debug = Local0
}
Return (Local0)
@@ -110,7 +110,7 @@ Scope (\_TZ)
/* CTDP Down */
Method (_AC0) {
- If (LLessEqual (\FLVL, 0)) {
+ If (\FLVL <= 0) {
Return (CTOK (CTL_TDP_THRESHOLD_OFF))
} Else {
Return (CTOK (CTL_TDP_THRESHOLD_ON))
@@ -119,7 +119,7 @@ Scope (\_TZ)
/* CTDP Nominal */
Method (_AC1) {
- If (LLessEqual (\FLVL, 1)) {
+ If (\FLVL <= 1) {
Return (CTOK (CTL_TDP_THRESHILD_NORMAL))
} Else {
Return (CTOK (CTL_TDP_THRESHILD_NORMAL))
@@ -132,14 +132,14 @@ Scope (\_TZ)
PowerResource (TNP0, 0, 0)
{
Method (_STA) {
- If (LLessEqual (\FLVL, 0)) {
+ If (\FLVL <= 0) {
Return (One)
} Else {
Return (Zero)
}
}
Method (_ON) {
- Store (0, \FLVL)
+ \FLVL = 0
/* Enable Power Limit */
\_SB.PCI0.MCHC.CTLE (CTL_TDP_POWER_LIMIT)
@@ -147,7 +147,7 @@ Scope (\_TZ)
Notify (\_TZ.THRM, 0x81)
}
Method (_OFF) {
- Store (1, \FLVL)
+ \FLVL = 1
/* Disable Power Limit */
\_SB.PCI0.MCHC.CTLD ()
@@ -159,18 +159,18 @@ Scope (\_TZ)
PowerResource (TNP1, 0, 0)
{
Method (_STA) {
- If (LLessEqual (\FLVL, 1)) {
+ If (\FLVL <= 1) {
Return (One)
} Else {
Return (Zero)
}
}
Method (_ON) {
- Store (1, \FLVL)
+ \FLVL = 1
Notify (\_TZ.THRM, 0x81)
}
Method (_OFF) {
- Store (1, \FLVL)
+ \FLVL = 1
Notify (\_TZ.THRM, 0x81)
}
}