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>
This commit is contained in:
Elyes HAOUAS 2020-10-08 09:33:36 +02:00 committed by Patrick Georgi
parent db11fa46ad
commit 316466b765
3 changed files with 17 additions and 17 deletions

View File

@ -22,7 +22,7 @@ Scope (\_SB) {
Name(_HID, EisaId("PNP0C0D")) Name(_HID, EisaId("PNP0C0D"))
Method(_LID, 0) Method(_LID, 0)
{ {
Store (GP15, \LIDS) \LIDS = GP15
Return (\LIDS) Return (\LIDS)
} }
} }

View File

@ -15,16 +15,16 @@ Method(_WAK,1)
{ {
/* Update in case state changed while asleep */ /* Update in case state changed while asleep */
/* Update AC status */ /* Update AC status */
Store (\_SB.PCI0.LPCB.EC0.ADPT, Local0) Local0 = \_SB.PCI0.LPCB.EC0.ADPT
if (LNotEqual (Local0, \PWRS)) { if (Local0 != \PWRS) {
Store (Local0, \PWRS) \PWRS = Local0
Notify (\_SB.PCI0.LPCB.EC0.AC, 0x80) Notify (\_SB.PCI0.LPCB.EC0.AC, 0x80)
} }
/* Update LID status */ /* Update LID status */
Store (GP15, Local0) Local0 = GP15
if (LNotEqual (Local0, \LIDS)) { if (Local0 != \LIDS) {
Store (Local0, \LIDS) \LIDS = Local0
Notify (\_SB.LID0, 0x80) Notify (\_SB.LID0, 0x80)
} }

View File

@ -26,10 +26,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)
} }
@ -55,23 +55,23 @@ Scope (\_TZ)
Method (_TMP, 0, Serialized) Method (_TMP, 0, Serialized)
{ {
// Get CPU Temperature from the Embedded Controller // 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 // Re-read from EC if the temperature is very high to
// avoid OS shutdown if we got a bad reading. // avoid OS shutdown if we got a bad reading.
If (LGreaterEqual (Local0, \TCRT)) { If (Local0 >= \TCRT) {
Store (\_SB.PCI0.LPCB.EC0.CTMP, Local0) Local0 = \_SB.PCI0.LPCB.EC0.CTMP
If (LGreaterEqual (Local0, \TCRT)) { If (Local0 >= \TCRT) {
// Check if this is an early read // Check if this is an early read
If (LLess (CRDC, IRDC)) { If (CRDC < IRDC) {
Store (0, Local0) Local0 = 0
} }
} }
} }
// Keep track of first few reads by the OS // Keep track of first few reads by the OS
If (LLess (CRDC, IRDC)) { If (CRDC < IRDC) {
Increment (CRDC) CRDC++
} }
Return (CTOK (Local0)) Return (CTOK (Local0))