HAOUAS Elyes has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46174 )
Change subject: mb/google/jecht: Convert to ASL 2.0 syntax ......................................................................
mb/google/jecht: Convert to ASL 2.0 syntax
Change-Id: Id1c8b0fce9feae90e2de944fa173cf719b7042a9 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/google/jecht/acpi/mainboard.asl M src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl 5 files changed, 271 insertions(+), 311 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/46174/1
diff --git a/src/mainboard/google/jecht/acpi/mainboard.asl b/src/mainboard/google/jecht/acpi/mainboard.asl index da92d2c..8a90ae6 100644 --- a/src/mainboard/google/jecht/acpi/mainboard.asl +++ b/src/mainboard/google/jecht/acpi/mainboard.asl @@ -14,9 +14,9 @@
Method (_DSW, 3, NotSerialized) { - Store (JECHT_NIC_WAKE_GPIO, Local0) + Local0 = JECHT_NIC_WAKE_GPIO
- If (LEqual (Arg0, 1)) { + If (Arg0 == 1) { // Enable GPIO as wake source _SB.PCI0.LPCB.GPIO.GWAK (Local0) } @@ -36,9 +36,9 @@
Method (_DSW, 3, NotSerialized) { - Store (JECHT_WLAN_WAKE_GPIO, Local0) + Local0 = JECHT_WLAN_WAKE_GPIO
- If (LEqual (Arg0, 1)) { + If (Arg0 == 1) { // Enable GPIO as wake source _SB.PCI0.LPCB.GPIO.GWAK (Local0) } diff --git a/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl index 2a16352..1ea32a6 100644 --- a/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl @@ -24,10 +24,10 @@ // 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,66 +53,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -120,7 +120,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -128,7 +128,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -136,7 +136,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -144,7 +144,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -160,25 +160,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -187,25 +185,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -214,25 +210,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -241,25 +235,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -268,25 +260,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl index 2a16352..1ea32a6 100644 --- a/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl @@ -24,10 +24,10 @@ // 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,66 +53,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -120,7 +120,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -128,7 +128,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -136,7 +136,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -144,7 +144,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -160,25 +160,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -187,25 +185,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -214,25 +210,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -241,25 +235,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -268,25 +260,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl index 2a16352..1ea32a6 100644 --- a/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl @@ -24,10 +24,10 @@ // 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,66 +53,66 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) }
Method (TCHK, 0, Serialized) { // Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (FAN0_THRESHOLD_OFF)) } Else { Return (CTOK (FAN0_THRESHOLD_ON)) @@ -120,7 +120,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (FAN1_THRESHOLD_OFF)) } Else { Return (CTOK (FAN1_THRESHOLD_ON)) @@ -128,7 +128,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (FAN2_THRESHOLD_OFF)) } Else { Return (CTOK (FAN2_THRESHOLD_ON)) @@ -136,7 +136,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (FAN3_THRESHOLD_OFF)) } Else { Return (CTOK (FAN3_THRESHOLD_ON)) @@ -144,7 +144,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -160,25 +160,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (FAN0_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } @@ -187,25 +185,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (FAN1_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } @@ -214,25 +210,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (FAN2_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } @@ -241,25 +235,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (FAN3_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } @@ -268,25 +260,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (FAN4_PWM, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM Notify (_TZ.THRM, 0x81) } } diff --git a/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl b/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl index e2f2675..80893f6 100644 --- a/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl +++ b/src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl @@ -39,99 +39,99 @@ // 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) }
// Thermal Table 0 Method (TTB0, 0) { - Store (FAN0_0_THRESHOLD_ON, F0ON) - Store (FAN0_0_THRESHOLD_OFF, F0OF) - Store (FAN0_0_PWM, F0PW) - Store (FAN1_0_THRESHOLD_ON, F1ON) - Store (FAN1_0_THRESHOLD_OFF, F1OF) - Store (FAN1_0_PWM, F1PW) - Store (FAN2_0_THRESHOLD_ON, F2ON) - Store (FAN2_0_THRESHOLD_OFF, F2OF) - Store (FAN2_0_PWM, F2PW) - Store (FAN3_0_THRESHOLD_ON, F3ON) - Store (FAN3_0_THRESHOLD_OFF, F3OF) - Store (FAN3_0_PWM, F3PW) - Store (FAN4_0_PWM, F4PW) - Store (0, THTB) + F0ON = FAN0_0_THRESHOLD_ON + F0OF = FAN0_0_THRESHOLD_OFF + F0PW = FAN0_0_PWM + F1ON = FAN1_0_THRESHOLD_ON + F1OF = FAN1_0_THRESHOLD_OFF + F1PW = FAN1_0_PWM + F2ON = FAN2_0_THRESHOLD_ON + F2OF = FAN2_0_THRESHOLD_OFF + F2PW = FAN2_0_PWM + F3ON = FAN3_0_THRESHOLD_ON + F3OF = FAN3_0_THRESHOLD_OFF + F3PW = FAN3_0_PWM + F4PW = FAN4_0_PWM + THTB = 0 }
// Thermal Table 1 Method (TTB1, 0) { - Store (FAN0_1_THRESHOLD_ON, F0ON) - Store (FAN0_1_THRESHOLD_OFF, F0OF) - Store (FAN0_1_PWM, F0PW) - Store (FAN1_1_THRESHOLD_ON, F1ON) - Store (FAN1_1_THRESHOLD_OFF, F1OF) - Store (FAN1_1_PWM, F1PW) - Store (FAN2_1_THRESHOLD_ON, F2ON) - Store (FAN2_1_THRESHOLD_OFF, F2OF) - Store (FAN2_1_PWM, F2PW) - Store (FAN3_1_THRESHOLD_ON, F3ON) - Store (FAN3_1_THRESHOLD_OFF, F3OF) - Store (FAN3_1_PWM, F3PW) - Store (FAN4_1_PWM, F4PW) - Store (1, THTB) + F0ON = FAN0_1_THRESHOLD_ON + F0OF = FAN0_1_THRESHOLD_OFF + F0PW = FAN0_1_PWM + F1ON = FAN1_1_THRESHOLD_ON + F1OF = FAN1_1_THRESHOLD_OFF + F1PW = FAN1_1_PWM + F2ON = FAN2_1_THRESHOLD_ON + F2OF = FAN2_1_THRESHOLD_OFF + F2PW = FAN2_1_PWM + F3ON = FAN3_1_THRESHOLD_ON + F3OF = FAN3_1_THRESHOLD_OFF + F3PW = FAN3_1_PWM + F4PW = FAN4_1_PWM + THTB = 1 }
// Thermal Table 2 Method (TTB2, 0) { - Store (FAN0_2_THRESHOLD_ON, F0ON) - Store (FAN0_2_THRESHOLD_OFF, F0OF) - Store (FAN0_2_PWM, F0PW) - Store (FAN1_2_THRESHOLD_ON, F1ON) - Store (FAN1_2_THRESHOLD_OFF, F1OF) - Store (FAN1_2_PWM, F1PW) - Store (FAN2_2_THRESHOLD_ON, F2ON) - Store (FAN2_2_THRESHOLD_OFF, F2OF) - Store (FAN2_2_PWM, F2PW) - Store (FAN3_2_THRESHOLD_ON, F3ON) - Store (FAN3_2_THRESHOLD_OFF, F3OF) - Store (FAN3_2_PWM, F3PW) - Store (FAN4_2_PWM, F4PW) - Store (2, THTB) + F0ON = FAN0_2_THRESHOLD_ON + F0OF = FAN0_2_THRESHOLD_OFF + F0PW = FAN0_2_PWM + F1ON = FAN1_2_THRESHOLD_ON + F1OF = FAN1_2_THRESHOLD_OFF + F1PW = FAN1_2_PWM + F2ON = FAN2_2_THRESHOLD_ON + F2OF = FAN2_2_THRESHOLD_OFF + F2PW = FAN2_2_PWM + F3ON = FAN3_2_THRESHOLD_ON + F3OF = FAN3_2_THRESHOLD_OFF + F3PW = FAN3_2_PWM + F4PW = FAN4_2_PWM + THTB = 2 }
// Update Thermal Table Method (UPTB, 0) { // Get System Temperature via SuperIO TMPIN2 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN2, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN2
// Check for "no reading available - If (LEqual (Local0, 0x80)) { - Store (THERMAL_POLICY_0_THRESHOLD_ON, Local0) + If (Local0 == 0x80) { + Local0 = THERMAL_POLICY_0_THRESHOLD_ON }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { - Store (THERMAL_POLICY_0_THRESHOLD_ON, Local0) + If ((Local0 == 255) || (Local0 == 0)) { + Local0 = THERMAL_POLICY_0_THRESHOLD_ON }
- If (LEqual (THTB, 2)) { - If (LGreaterEqual (Local0, THERMAL_POLICY_0_THRESHOLD_ON)) { + If (THTB == 2) { + If (Local0 >= THERMAL_POLICY_0_THRESHOLD_ON) { TTB0 () - } ElseIf (LGreaterEqual (Local0, THERMAL_POLICY_1_THRESHOLD_ON)) { + } ElseIf (Local0 >= THERMAL_POLICY_1_THRESHOLD_ON) { TTB1 () } - } ElseIf (LEqual (THTB, 1)) { - If (LGreaterEqual (Local0, THERMAL_POLICY_0_THRESHOLD_ON)) { + } ElseIf (THTB == 1) { + If (Local0 >= THERMAL_POLICY_0_THRESHOLD_ON) { TTB0 () - } ElseIf (LLessEqual (Local0, THERMAL_POLICY_1_THRESHOLD_OFF)) { + } ElseIf (Local0 <= THERMAL_POLICY_1_THRESHOLD_OFF) { TTB2 () } } Else { - If (LLess (Local0, THERMAL_POLICY_1_THRESHOLD_OFF)) { + If (Local0 < THERMAL_POLICY_1_THRESHOLD_OFF) { TTB2 () - } ElseIf (LLessEqual (Local0, THERMAL_POLICY_0_THRESHOLD_OFF)) { + } ElseIf (Local0 <= THERMAL_POLICY_0_THRESHOLD_OFF) { TTB1 () } } @@ -158,8 +158,8 @@ // Start fan at state 4 = lowest temp state Method (_INI) { - Store (4, \FLVL) - Store (FAN4_2_PWM, _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_2_PWM Notify (_TZ.THRM, 0x81) }
@@ -169,58 +169,58 @@ UPTB ()
// Get CPU Temperature from PECI via SuperIO TMPIN3 - Store (_SB.PCI0.LPCB.SIO.ENVC.TIN3, Local0) + Local0 = _SB.PCI0.LPCB.SIO.ENVC.TIN3
// Check for "no reading available - If (LEqual (Local0, 0x80)) { + If (Local0 == 0x80) { Return (CTOK (FAN0_0_THRESHOLD_ON)) }
// Check for invalid readings - If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { + If ((Local0 == 255) || (Local0 == 0)) { Return (CTOK (FAN0_0_THRESHOLD_ON)) }
// PECI raw value is an offset from Tj_max - Subtract (255, Local0, Local1) + Local1 = 255 - Local0
// Handle values greater than Tj_max - If (LGreaterEqual (Local1, \TMAX)) { + If (Local1 >= \TMAX) { Return (CTOK (\TMAX)) }
// Subtract from Tj_max to get temperature - Subtract (\TMAX, Local1, Local0) + Local0 = \TMAX - Local1 Return (CTOK (Local0)) }
Method (_TMP, 0, Serialized) { // Get temperature from SuperIO in deci-kelvin - Store (TCHK (), Local0) + Local0 = TCHK ()
// Critical temperature in deci-kelvin - Store (CTOK (\TMAX), Local1) + Local1 = CTOK (\TMAX)
- If (LGreaterEqual (Local0, Local1)) { - Store ("CRITICAL TEMPERATURE", Debug) - Store (Local0, Debug) + If (Local0 >= Local1) { + Debug = "CRITICAL TEMPERATURE" + Debug = Local0
// Wait 1 second for SuperIO to re-poll Sleep (1000)
// Re-read temperature from SuperIO - Store (TCHK (), Local0) + Local0 = TCHK ()
- Store ("RE-READ TEMPERATURE", Debug) - Store (Local0, Debug) + Debug = "RE-READ TEMPERATURE" + Debug = Local0 }
Return (Local0) }
Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (CTOK (F0OF)) } Else { Return (CTOK (F0ON)) @@ -228,7 +228,7 @@ }
Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (CTOK (F1OF)) } Else { Return (CTOK (F1ON)) @@ -236,7 +236,7 @@ }
Method (_AC2) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (CTOK (F2OF)) } Else { Return (CTOK (F2ON)) @@ -244,7 +244,7 @@ }
Method (_AC3) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (CTOK (F3OF)) } Else { Return (CTOK (F3ON)) @@ -252,7 +252,7 @@ }
Method (_AC4) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (CTOK (0)) } Else { Return (CTOK (0)) @@ -268,25 +268,23 @@ PowerResource (FNP0, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 0)) { + If (\FLVL <= 0) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (0, \FLVL) - Store (F0PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 0 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F0PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (1, \FLVL) - Store (F1PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F1PW Notify (_TZ.THRM, 0x81) } } @@ -295,25 +293,23 @@ PowerResource (FNP1, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 1)) { + If (\FLVL <= 1) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (1, \FLVL) - Store (F1PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 1 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F1PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (2, \FLVL) - Store (F2PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F2PW Notify (_TZ.THRM, 0x81) } } @@ -322,25 +318,23 @@ PowerResource (FNP2, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 2)) { + If (\FLVL <= 2) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (2, \FLVL) - Store (F2PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 2 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F2PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (3, \FLVL) - Store (F3PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F3PW Notify (_TZ.THRM, 0x81) } } @@ -349,25 +343,23 @@ PowerResource (FNP3, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 3)) { + If (\FLVL <= 3) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (3, \FLVL) - Store (F3PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 3 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F3PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (F4PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F4PW Notify (_TZ.THRM, 0x81) } } @@ -376,25 +368,23 @@ PowerResource (FNP4, 0, 0) { Method (_STA) { - If (LLessEqual (\FLVL, 4)) { + If (\FLVL <= 4) { Return (One) } Else { Return (Zero) } } Method (_ON) { - If (LNot (_STA ())) { - Store (4, \FLVL) - Store (F4PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + If (!_STA ()) { + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F4PW Notify (_TZ.THRM, 0x81) } } Method (_OFF) { If (_STA ()) { - Store (4, \FLVL) - Store (F4PW, - _SB.PCI0.LPCB.SIO.ENVC.F2PS) + \FLVL = 4 + _SB.PCI0.LPCB.SIO.ENVC.F2PS = F4PW Notify (_TZ.THRM, 0x81) } }
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46174
to look at the new patch set (#2).
Change subject: mb/google/jecht: Convert to ASL 2.0 syntax ......................................................................
mb/google/jecht: Convert to ASL 2.0 syntax
Built for google/jecht (Tidus) provides identical 'build/dsdt.dsl' file.
Change-Id: Id1c8b0fce9feae90e2de944fa173cf719b7042a9 Signed-off-by: Elyes HAOUAS ehaouas@noos.fr --- M src/mainboard/google/jecht/acpi/mainboard.asl M src/mainboard/google/jecht/variants/guado/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/jecht/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/rikku/include/variant/acpi/thermal.asl M src/mainboard/google/jecht/variants/tidus/include/variant/acpi/thermal.asl 5 files changed, 271 insertions(+), 311 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/46174/2