mb/google/beltino: Convert to ASL 2.0 syntax

Built google/beltino (Monroe) provides identical 'dsdt.dsl'.

Change-Id: I12b6a8264e53ece30ae79da2d79c6f1d302fb357
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46170
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
This commit is contained in:
Elyes HAOUAS 2020-10-08 09:30:35 +02:00 committed by Patrick Georgi
parent 29ef574b3f
commit 3ed5c9e3cd
2 changed files with 57 additions and 67 deletions

View File

@ -14,9 +14,9 @@ Scope (\_SB.PCI0.RP01)
Method (_DSW, 3, NotSerialized) Method (_DSW, 3, NotSerialized)
{ {
Store (NIC_WAKE_GPIO, Local0) Local0 = NIC_WAKE_GPIO
If (LEqual (Arg0, 1)) { If (Arg0 == 1) {
// Enable GPIO as wake source // Enable GPIO as wake source
\_SB.PCI0.LPCB.GWAK (Local0) \_SB.PCI0.LPCB.GWAK (Local0)
} }
@ -36,9 +36,9 @@ Scope (\_SB.PCI0.RP02)
Method (_DSW, 3, NotSerialized) Method (_DSW, 3, NotSerialized)
{ {
Store (WLAN_WAKE_GPIO, Local0) Local0 = WLAN_WAKE_GPIO
If (LEqual (Arg0, 1)) { If (Arg0 == 1) {
// Enable GPIO as wake source // Enable GPIO as wake source
\_SB.PCI0.LPCB.GWAK (Local0) \_SB.PCI0.LPCB.GWAK (Local0)
} }

View File

@ -23,10 +23,10 @@ Scope (\_TZ)
// Convert from Degrees C to 1/10 Kelvin for ACPI // Convert from Degrees C to 1/10 Kelvin for ACPI
Method (CTOK, 1) { Method (CTOK, 1) {
// 10th of Degrees C // 10th of Degrees C
Multiply (Arg0, 10, Local0) Local0 = Arg0 * 10
// Convert to Kelvin // Convert to Kelvin
Add (Local0, 2732, Local0) Local0 += 2732
Return (Local0) Return (Local0)
} }
@ -52,66 +52,66 @@ Scope (\_TZ)
// Start fan at state 4 = lowest temp state // Start fan at state 4 = lowest temp state
Method (_INI) Method (_INI)
{ {
Store (4, \FLVL) \FLVL = 4
Store (FAN4_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS) \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
Method (TCHK, 0, Serialized) Method (TCHK, 0, Serialized)
{ {
// Get CPU Temperature from PECI via SuperIO TMPIN3 // 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" // Check for "no reading available"
If (LEqual (Local0, 0x80)) { If (Local0 == 0x80) {
Return (CTOK (FAN0_THRESHOLD_ON)) Return (CTOK (FAN0_THRESHOLD_ON))
} }
// Check for invalid readings // Check for invalid readings
If (LOr (LEqual (Local0, 255), LEqual (Local0, 0))) { If ((Local0 == 255) || (Local0 == 0)) {
Return (CTOK (FAN0_THRESHOLD_ON)) Return (CTOK (FAN0_THRESHOLD_ON))
} }
// PECI raw value is an offset from Tj_max // PECI raw value is an offset from Tj_max
Subtract (255, Local0, Local1) Local1 = 255 - Local0
// Handle values greater than Tj_max // Handle values greater than Tj_max
If (LGreaterEqual (Local1, \TMAX)) { If (Local1 >= \TMAX) {
Return (CTOK (\TMAX)) Return (CTOK (\TMAX))
} }
// Subtract from Tj_max to get temperature // Subtract from Tj_max to get temperature
Subtract (\TMAX, Local1, Local0) Local0 = \TMAX - Local1
Return (CTOK (Local0)) Return (CTOK (Local0))
} }
Method (_TMP, 0, Serialized) Method (_TMP, 0, Serialized)
{ {
// Get temperature from SuperIO in deci-kelvin // Get temperature from SuperIO in deci-kelvin
Store (TCHK (), Local0) Local0 = TCHK ()
// Critical temperature in deci-kelvin // Critical temperature in deci-kelvin
Store (CTOK (\TMAX), Local1) Local1 = CTOK (\TMAX)
If (LGreaterEqual (Local0, Local1)) { If (Local0 >= Local1) {
Store ("CRITICAL TEMPERATURE", Debug) Debug = "CRITICAL TEMPERATURE"
Store (Local0, Debug) Debug = Local0
// Wait 1 second for SuperIO to re-poll // Wait 1 second for SuperIO to re-poll
Sleep (1000) Sleep (1000)
// Re-read temperature from SuperIO // Re-read temperature from SuperIO
Store (TCHK (), Local0) Local0 = TCHK ()
Store ("RE-READ TEMPERATURE", Debug) Debug = "RE-READ TEMPERATURE"
Store (Local0, Debug) Debug = Local0
} }
Return (Local0) Return (Local0)
} }
Method (_AC0) { Method (_AC0) {
If (LLessEqual (\FLVL, 0)) { If (\FLVL <= 0) {
Return (CTOK (FAN0_THRESHOLD_OFF)) Return (CTOK (FAN0_THRESHOLD_OFF))
} Else { } Else {
Return (CTOK (FAN0_THRESHOLD_ON)) Return (CTOK (FAN0_THRESHOLD_ON))
@ -119,7 +119,7 @@ Scope (\_TZ)
} }
Method (_AC1) { Method (_AC1) {
If (LLessEqual (\FLVL, 1)) { If (\FLVL <= 1) {
Return (CTOK (FAN1_THRESHOLD_OFF)) Return (CTOK (FAN1_THRESHOLD_OFF))
} Else { } Else {
Return (CTOK (FAN1_THRESHOLD_ON)) Return (CTOK (FAN1_THRESHOLD_ON))
@ -127,7 +127,7 @@ Scope (\_TZ)
} }
Method (_AC2) { Method (_AC2) {
If (LLessEqual (\FLVL, 2)) { If (\FLVL <= 2) {
Return (CTOK (FAN2_THRESHOLD_OFF)) Return (CTOK (FAN2_THRESHOLD_OFF))
} Else { } Else {
Return (CTOK (FAN2_THRESHOLD_ON)) Return (CTOK (FAN2_THRESHOLD_ON))
@ -135,7 +135,7 @@ Scope (\_TZ)
} }
Method (_AC3) { Method (_AC3) {
If (LLessEqual (\FLVL, 3)) { If (\FLVL <= 3) {
Return (CTOK (FAN3_THRESHOLD_OFF)) Return (CTOK (FAN3_THRESHOLD_OFF))
} Else { } Else {
Return (CTOK (FAN3_THRESHOLD_ON)) Return (CTOK (FAN3_THRESHOLD_ON))
@ -143,7 +143,7 @@ Scope (\_TZ)
} }
Method (_AC4) { Method (_AC4) {
If (LLessEqual (\FLVL, 4)) { If (\FLVL <= 4) {
Return (CTOK (FAN4_THRESHOLD_OFF)) Return (CTOK (FAN4_THRESHOLD_OFF))
} Else { } Else {
Return (CTOK (FAN4_THRESHOLD_ON)) Return (CTOK (FAN4_THRESHOLD_ON))
@ -159,25 +159,23 @@ Scope (\_TZ)
PowerResource (FNP0, 0, 0) PowerResource (FNP0, 0, 0)
{ {
Method (_STA) { Method (_STA) {
If (LLessEqual (\FLVL, 0)) { If (\FLVL <= 0) {
Return (One) Return (One)
} Else { } Else {
Return (Zero) Return (Zero)
} }
} }
Method (_ON) { Method (_ON) {
If (LNot (_STA ())) { If (!_STA ()) {
Store (0, \FLVL) \FLVL = 0
Store (FAN0_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN0_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
Method (_OFF) { Method (_OFF) {
If (_STA ()) { If (_STA ()) {
Store (1, \FLVL) \FLVL = 1
Store (FAN1_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
@ -186,25 +184,23 @@ Scope (\_TZ)
PowerResource (FNP1, 0, 0) PowerResource (FNP1, 0, 0)
{ {
Method (_STA) { Method (_STA) {
If (LLessEqual (\FLVL, 1)) { If (\FLVL <= 1) {
Return (One) Return (One)
} Else { } Else {
Return (Zero) Return (Zero)
} }
} }
Method (_ON) { Method (_ON) {
If (LNot (_STA ())) { If (!_STA ()) {
Store (1, \FLVL) \FLVL = 1
Store (FAN1_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN1_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
Method (_OFF) { Method (_OFF) {
If (_STA ()) { If (_STA ()) {
Store (2, \FLVL) \FLVL = 2
Store (FAN2_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
@ -213,25 +209,23 @@ Scope (\_TZ)
PowerResource (FNP2, 0, 0) PowerResource (FNP2, 0, 0)
{ {
Method (_STA) { Method (_STA) {
If (LLessEqual (\FLVL, 2)) { If (\FLVL <= 2) {
Return (One) Return (One)
} Else { } Else {
Return (Zero) Return (Zero)
} }
} }
Method (_ON) { Method (_ON) {
If (LNot (_STA ())) { If (!_STA ()) {
Store (2, \FLVL) \FLVL = 2
Store (FAN2_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN2_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
Method (_OFF) { Method (_OFF) {
If (_STA ()) { If (_STA ()) {
Store (3, \FLVL) \FLVL = 3
Store (FAN3_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
@ -240,25 +234,23 @@ Scope (\_TZ)
PowerResource (FNP3, 0, 0) PowerResource (FNP3, 0, 0)
{ {
Method (_STA) { Method (_STA) {
If (LLessEqual (\FLVL, 3)) { If (\FLVL <= 3) {
Return (One) Return (One)
} Else { } Else {
Return (Zero) Return (Zero)
} }
} }
Method (_ON) { Method (_ON) {
If (LNot (_STA ())) { If (!_STA ()) {
Store (3, \FLVL) \FLVL = 3
Store (FAN3_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN3_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
Method (_OFF) { Method (_OFF) {
If (_STA ()) { If (_STA ()) {
Store (4, \FLVL) \FLVL = 4
Store (FAN4_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
@ -267,25 +259,23 @@ Scope (\_TZ)
PowerResource (FNP4, 0, 0) PowerResource (FNP4, 0, 0)
{ {
Method (_STA) { Method (_STA) {
If (LLessEqual (\FLVL, 4)) { If (\FLVL <= 4) {
Return (One) Return (One)
} Else { } Else {
Return (Zero) Return (Zero)
} }
} }
Method (_ON) { Method (_ON) {
If (LNot (_STA ())) { If (!_STA ()) {
Store (4, \FLVL) \FLVL = 4
Store (FAN4_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }
Method (_OFF) { Method (_OFF) {
If (_STA ()) { If (_STA ()) {
Store (4, \FLVL) \FLVL = 4
Store (FAN4_PWM, \_SB.PCI0.LPCB.SIO.ENVC.F2PS = FAN4_PWM
\_SB.PCI0.LPCB.SIO.ENVC.F2PS)
Notify (\_TZ.THRM, 0x81) Notify (\_TZ.THRM, 0x81)
} }
} }