summaryrefslogtreecommitdiff
path: root/src/mainboard/google/beltino
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-08 09:30:35 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-11-04 09:43:09 +0000
commit3ed5c9e3cdf7eb38c92c4c75c2eee6fb22d61eea (patch)
tree1f515324a41841f7e98ac93a21201e26bd0d23c0 /src/mainboard/google/beltino
parent29ef574b3f7bd5431373efa4f86bdd65d6b347c5 (diff)
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>
Diffstat (limited to 'src/mainboard/google/beltino')
-rw-r--r--src/mainboard/google/beltino/acpi/mainboard.asl8
-rw-r--r--src/mainboard/google/beltino/acpi/thermal.asl116
2 files changed, 57 insertions, 67 deletions
diff --git a/src/mainboard/google/beltino/acpi/mainboard.asl b/src/mainboard/google/beltino/acpi/mainboard.asl
index 3049dbee96..10696ff9fc 100644
--- a/src/mainboard/google/beltino/acpi/mainboard.asl
+++ b/src/mainboard/google/beltino/acpi/mainboard.asl
@@ -14,9 +14,9 @@ Scope (\_SB.PCI0.RP01)
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
\_SB.PCI0.LPCB.GWAK (Local0)
}
@@ -36,9 +36,9 @@ Scope (\_SB.PCI0.RP02)
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
\_SB.PCI0.LPCB.GWAK (Local0)
}
diff --git a/src/mainboard/google/beltino/acpi/thermal.asl b/src/mainboard/google/beltino/acpi/thermal.asl
index 1292af4a20..96acaeb975 100644
--- a/src/mainboard/google/beltino/acpi/thermal.asl
+++ b/src/mainboard/google/beltino/acpi/thermal.asl
@@ -23,10 +23,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)
}
@@ -52,66 +52,66 @@ Scope (\_TZ)
// 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))
@@ -119,7 +119,7 @@ Scope (\_TZ)
}
Method (_AC1) {
- If (LLessEqual (\FLVL, 1)) {
+ If (\FLVL <= 1) {
Return (CTOK (FAN1_THRESHOLD_OFF))
} Else {
Return (CTOK (FAN1_THRESHOLD_ON))
@@ -127,7 +127,7 @@ Scope (\_TZ)
}
Method (_AC2) {
- If (LLessEqual (\FLVL, 2)) {
+ If (\FLVL <= 2) {
Return (CTOK (FAN2_THRESHOLD_OFF))
} Else {
Return (CTOK (FAN2_THRESHOLD_ON))
@@ -135,7 +135,7 @@ Scope (\_TZ)
}
Method (_AC3) {
- If (LLessEqual (\FLVL, 3)) {
+ If (\FLVL <= 3) {
Return (CTOK (FAN3_THRESHOLD_OFF))
} Else {
Return (CTOK (FAN3_THRESHOLD_ON))
@@ -143,7 +143,7 @@ Scope (\_TZ)
}
Method (_AC4) {
- If (LLessEqual (\FLVL, 4)) {
+ If (\FLVL <= 4) {
Return (CTOK (FAN4_THRESHOLD_OFF))
} Else {
Return (CTOK (FAN4_THRESHOLD_ON))
@@ -159,25 +159,23 @@ Scope (\_TZ)
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)
}
}
@@ -186,25 +184,23 @@ Scope (\_TZ)
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)
}
}
@@ -213,25 +209,23 @@ Scope (\_TZ)
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)
}
}
@@ -240,25 +234,23 @@ Scope (\_TZ)
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)
}
}
@@ -267,25 +259,23 @@ Scope (\_TZ)
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)
}
}