summaryrefslogtreecommitdiff
path: root/src/soc/intel/skylake/acpi/dptf
diff options
context:
space:
mode:
authorElyes HAOUAS <ehaouas@noos.fr>2020-10-09 15:05:28 +0200
committerMichael Niewöhner <foss@mniewoehner.de>2021-02-10 17:52:29 +0000
commitfc29afbdd42662f1d87adf765f0669b8caf660d6 (patch)
tree5fb8bbcd748a8b1a1bdb310ef66c52d2566f15df /src/soc/intel/skylake/acpi/dptf
parentb4b4fa5b2fad4d5dfbfd8cd7b0d3d17b686fb0e1 (diff)
soc/intel/skylake: Convert to ASL 2.0 syntax
Change-Id: Iea915b60d8ec9a1a7a2aa5926b0277cae58113a6 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46242 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com> Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Diffstat (limited to 'src/soc/intel/skylake/acpi/dptf')
-rw-r--r--src/soc/intel/skylake/acpi/dptf/charger.asl11
-rw-r--r--src/soc/intel/skylake/acpi/dptf/cpu.asl8
-rw-r--r--src/soc/intel/skylake/acpi/dptf/dptf.asl8
-rw-r--r--src/soc/intel/skylake/acpi/dptf/fan.asl6
-rw-r--r--src/soc/intel/skylake/acpi/dptf/thermal.asl18
5 files changed, 25 insertions, 26 deletions
diff --git a/src/soc/intel/skylake/acpi/dptf/charger.asl b/src/soc/intel/skylake/acpi/dptf/charger.asl
index fca9590c37..97c83553c0 100644
--- a/src/soc/intel/skylake/acpi/dptf/charger.asl
+++ b/src/soc/intel/skylake/acpi/dptf/charger.asl
@@ -9,7 +9,7 @@ Device (TCHG)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)
@@ -26,11 +26,11 @@ Device (TCHG)
Method (PPPC)
{
/* Convert size of PPSS table to index */
- Store (SizeOf (\_SB.CHPS), Local0)
- Decrement (Local0)
+ Local0 = SizeOf (\_SB.CHPS)
+ Local0--
/* Check if charging is disabled (AC removed) */
- If (LEqual (\_SB.PCI0.LPCB.EC0.ACEX, Zero)) {
+ If (\_SB.PCI0.LPCB.EC0.ACEX == 0) {
/* Return last power state */
Return (Local0)
} Else {
@@ -45,8 +45,7 @@ Device (TCHG)
Method (SPPC, 1)
{
/* Retrieve Control (index 4) for specified PPSS level */
- Store (DeRefOf (Index (DeRefOf (Index
- (\_SB.CHPS, ToInteger (Arg0))), 4)), Local0)
+ Local0 = DeRefOf (DeRefOf (\_SB.CHPS [ToInteger (Arg0)]) [4])
/* Pass Control value to EC to limit charging */
\_SB.PCI0.LPCB.EC0.CHGS (Local0)
diff --git a/src/soc/intel/skylake/acpi/dptf/cpu.asl b/src/soc/intel/skylake/acpi/dptf/cpu.asl
index 9931f6ca1b..181b01a6b1 100644
--- a/src/soc/intel/skylake/acpi/dptf/cpu.asl
+++ b/src/soc/intel/skylake/acpi/dptf/cpu.asl
@@ -17,7 +17,7 @@ Device (B0D4)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)
@@ -35,7 +35,7 @@ Device (B0D4)
Method (SPPC, 1)
{
- Store (Arg0, \PPCM)
+ \PPCM = Arg0
/* Notify OS to re-read _PPC limit on each CPU */
\PPCN ()
@@ -60,8 +60,8 @@ Device (B0D4)
If (CondRefOf (\_SB.MPDL)) {
Return (\_SB.MPDL)
} ElseIf (CondRefOf (\_SB.CP00._PSS)) {
- Store (SizeOf (\_SB.CP00._PSS), Local0)
- Decrement (Local0)
+ Local0 = SizeOf (\_SB.CP00._PSS)
+ Local0--
Return (Local0)
} Else {
Return (0)
diff --git a/src/soc/intel/skylake/acpi/dptf/dptf.asl b/src/soc/intel/skylake/acpi/dptf/dptf.asl
index 8852e0a9ad..e72437a520 100644
--- a/src/soc/intel/skylake/acpi/dptf/dptf.asl
+++ b/src/soc/intel/skylake/acpi/dptf/dptf.asl
@@ -24,7 +24,7 @@ Device (DPTF)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)
@@ -41,7 +41,7 @@ Device (DPTF)
Method (_OSC, 4, Serialized)
{
/* Check for Passive Policy UUID */
- If (LEqual (DeRefOf (Index (IDSP, 0)), Arg0)) {
+ If (DeRefOf (IDSP [0]) == Arg0) {
/* Initialize Thermal Devices */
^TINI ()
@@ -73,10 +73,10 @@ Device (DPTF)
/* 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)
}
diff --git a/src/soc/intel/skylake/acpi/dptf/fan.asl b/src/soc/intel/skylake/acpi/dptf/fan.asl
index 6d60c63136..eb75ba94ab 100644
--- a/src/soc/intel/skylake/acpi/dptf/fan.asl
+++ b/src/soc/intel/skylake/acpi/dptf/fan.asl
@@ -32,19 +32,19 @@ Device (TFN1)
Method (_FST, 0, Serialized,,PkgObj)
{
/* Fill in TFST with current control. */
- Store (\_SB.PCI0.LPCB.EC0.FAND, Index (TFST, 1))
+ TFST [1] = \_SB.PCI0.LPCB.EC0.FAND
Return (TFST)
}
/* _FSL: Fan Speed Level */
Method (_FSL, 1, Serialized)
{
- Store (Arg0, \_SB.PCI0.LPCB.EC0.FAND)
+ \_SB.PCI0.LPCB.EC0.FAND = Arg0
}
Method (_STA)
{
- If (LEqual (\DPTE, One))
+ If (\DPTE == 1)
{
Return (0xF)
} Else {
diff --git a/src/soc/intel/skylake/acpi/dptf/thermal.asl b/src/soc/intel/skylake/acpi/dptf/thermal.asl
index 3aead2bf43..95912a47fa 100644
--- a/src/soc/intel/skylake/acpi/dptf/thermal.asl
+++ b/src/soc/intel/skylake/acpi/dptf/thermal.asl
@@ -8,22 +8,22 @@ Method (TEVT, 1, NotSerialized)
{
#ifdef DPTF_TSR0_SENSOR_ID
- If (LEqual (ToInteger (Arg0), DPTF_TSR0_SENSOR_ID)) {
+ If (ToInteger (Arg0) == DPTF_TSR0_SENSOR_ID) {
Notify (^TSR0, 0x90)
}
#endif
#ifdef DPTF_TSR1_SENSOR_ID
- If (LEqual (ToInteger (Arg0), DPTF_TSR1_SENSOR_ID)) {
+ If (ToInteger (Arg0) == DPTF_TSR1_SENSOR_ID) {
Notify (^TSR1, 0x90)
}
#endif
#ifdef DPTF_TSR2_SENSOR_ID
- If (LEqual (ToInteger (Arg0), DPTF_TSR2_SENSOR_ID)) {
+ If (ToInteger (Arg0) == DPTF_TSR2_SENSOR_ID) {
Notify (^TSR2, 0x90)
}
#endif
#ifdef DPTF_TSR3_SENSOR_ID
- If (LEqual (ToInteger (Arg0), DPTF_TSR3_SENSOR_ID)) {
+ If (ToInteger (Arg0) == DPTF_TSR3_SENSOR_ID) {
Notify (^TSR3, 0x90)
}
#endif
@@ -78,7 +78,7 @@ External (\_SB.PCI0.LPCB.EC0.RCDP, MethodObj)
Method (DTRP, 2, Serialized)
{
If (CondRefOf (\_SB.PCI0.LPCB.EC0.RCDP)) {
- If (LEqual (\_SB.PCI0.LPCB.EC0.RCDP, One)) {
+ If (\_SB.PCI0.LPCB.EC0.RCDP == 1) {
Return (CTOK (Arg0))
}
}
@@ -106,7 +106,7 @@ Device (TSR0)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)
@@ -215,7 +215,7 @@ Device (TSR1)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)
@@ -312,7 +312,7 @@ Device (TSR2)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)
@@ -376,7 +376,7 @@ Device (TSR3)
Method (_STA)
{
- If (LEqual (\DPTE, One)) {
+ If (\DPTE == 1) {
Return (0xF)
} Else {
Return (0x0)