diff options
Diffstat (limited to 'src/soc/intel/baytrail/acpi/dptf/thermal.asl')
-rw-r--r-- | src/soc/intel/baytrail/acpi/dptf/thermal.asl | 147 |
1 files changed, 50 insertions, 97 deletions
diff --git a/src/soc/intel/baytrail/acpi/dptf/thermal.asl b/src/soc/intel/baytrail/acpi/dptf/thermal.asl index 33ec207b70..7113215cd3 100644 --- a/src/soc/intel/baytrail/acpi/dptf/thermal.asl +++ b/src/soc/intel/baytrail/acpi/dptf/thermal.asl @@ -1,18 +1,37 @@ /* Thermal Threshold Event Handler */ -Method (TEVT, 1, Serialized) +Method (TEVT, 1, NotSerialized) { - Switch (ToInteger (Arg0)) - { + Store (ToInteger (Arg0), Local0) + #ifdef DPTF_TSR0_SENSOR_ID - Case (DPTF_TSR0_SENSOR_ID) { Notify (^TSR0, 0x90) } + If (LEqual (Local0, DPTF_TSR0_SENSOR_ID)) { + Notify (^TSR0, 0x90) + } #endif #ifdef DPTF_TSR1_SENSOR_ID - Case (DPTF_TSR1_SENSOR_ID) { Notify (^TSR1, 0x90) } + If (LEqual (Local0, DPTF_TSR1_SENSOR_ID)) { + Notify (^TSR1, 0x90) + } #endif #ifdef DPTF_TSR2_SENSOR_ID - Case (DPTF_TSR2_SENSOR_ID) { Notify (^TSR2, 0x90) } -#endif + If (LEqual (Local0, DPTF_TSR2_SENSOR_ID)) { + Notify (^TSR2, 0x90) } +#endif +} + +/* Thermal device initialization - Disable Aux Trip Points */ +Method (TINI) +{ +#ifdef DPTF_TSR0_SENSOR_ID + ^TSR0.PATD () +#endif +#ifdef DPTF_TSR1_SENSOR_ID + ^TSR1.PATD () +#endif +#ifdef DPTF_TSR2_SENSOR_ID + ^TSR2.PATD () +#endif } #ifdef DPTF_TSR0_SENSOR_ID @@ -24,9 +43,6 @@ Device (TSR0) Name (TMPI, DPTF_TSR0_SENSOR_ID) Name (_STR, Unicode (DPTF_TSR0_SENSOR_NAME)) Name (GTSH, 20) /* 2 degree hysteresis */ - Name (NTTH, 5) /* 5 degree notification threshold */ - Name (LTM0, 0) /* Last recorded temperature */ - Name (CTYP, 0) /* Cooling policy */ Method (_STA) { @@ -47,34 +63,9 @@ Device (TSR0) Return (^^CTOK (DPTF_TSR0_PASSIVE)) } - /* Set Cooling Policy - * Arg0 - Cooling policy mode, 1=active, 0=passive - * Arg1 - Acoustic Limit - * Arg2 - Power Limit - */ - Method (_SCP, 3, Serialized) + Method (_CRT) { - If (LEqual (Arg0, 0)) { - Store (0, CTYP) - } Else { - Store (1, CTYP) - } - - /* DPTF Thermal Trip Points Changed Event */ - Notify (TSR0, 0x91) - } - - /* Device Temperature Indication */ - Method (_DTI, 1) - { - Store (Arg0, LTM0) - Notify (TSR0, 0x91) - } - - /* Notification Temperature Threshold */ - Method (_NTT) - { - Return (^^CTOK (NTTH)) + Return (^^CTOK (DPTF_TSR0_CRITICAL)) } Name (PATC, 2) @@ -90,6 +81,12 @@ Device (TSR0) { \_SB.PCI0.LPCB.EC0.PAT1 (TMPI, Arg0) } + + /* Disable Aux Trip Point */ + Method (PATD, 0, Serialized) + { + \_SB.PCI0.LPCB.EC0.PATD (TMPI) + } } #endif @@ -102,9 +99,6 @@ Device (TSR1) Name (TMPI, DPTF_TSR1_SENSOR_ID) Name (_STR, Unicode (DPTF_TSR1_SENSOR_NAME)) Name (GTSH, 20) /* 2 degree hysteresis */ - Name (NTTH, 5) /* 5 degree notification threshold */ - Name (LTM1, 0) - Name (CTYP, 0) /* Cooling policy */ Method (_STA) { @@ -125,34 +119,9 @@ Device (TSR1) Return (^^CTOK (DPTF_TSR1_PASSIVE)) } - /* Set Cooling Policy - * Arg0 - Cooling policy mode, 1=active, 0=passive - * Arg1 - Acoustic Limit - * Arg2 - Power Limit - */ - Method (_SCP, 3, Serialized) - { - If (LEqual (Arg0, 0)) { - Store (0, CTYP) - } Else { - Store (1, CTYP) - } - - /* DPTF Thermal Trip Points Changed Event */ - Notify (TSR1, 0x91) - } - - /* Device Temperature Indication */ - Method (_DTI, 1) + Method (_CRT) { - Store (Arg0, LTM1) - Notify (TSR1, 0x91) - } - - /* Notification Temperature Threshold */ - Method (_NTT) - { - Return (^^CTOK (NTTH)) + Return (^^CTOK (DPTF_TSR1_CRITICAL)) } Name (PATC, 2) @@ -168,6 +137,12 @@ Device (TSR1) { \_SB.PCI0.LPCB.EC0.PAT1 (TMPI, Arg0) } + + /* Disable Aux Trip Point */ + Method (PATD, 0, Serialized) + { + \_SB.PCI0.LPCB.EC0.PATD (TMPI) + } } #endif @@ -180,9 +155,6 @@ Device (TSR2) Name (TMPI, DPTF_TSR2_SENSOR_ID) Name (_STR, Unicode (DPTF_TSR2_SENSOR_NAME)) Name (GTSH, 20) /* 2 degree hysteresis */ - Name (NTTH, 5) /* 5 degree notification threshold */ - Name (LTM2, 0) - Name (CTYP, 0) /* Cooling policy */ Method (_STA) { @@ -203,34 +175,9 @@ Device (TSR2) Return (^^CTOK (DPTF_TSR2_PASSIVE)) } - /* Set Cooling Policy - * Arg0 - Cooling policy mode, 1=active, 0=passive - * Arg1 - Acoustic Limit - * Arg2 - Power Limit - */ - Method (_SCP, 3, Serialized) + Method (_CRT) { - If (LEqual (Arg0, 0)) { - Store (0, CTYP) - } Else { - Store (1, CTYP) - } - - /* DPTF Thermal Trip Points Changed Event */ - Notify (TSR2, 0x91) - } - - /* Device Temperature Indication */ - Method (_DTI, 1) - { - Store (Arg0, LTM2) - Notify (TSR2, 0x91) - } - - /* Notification Temperature Threshold */ - Method (_NTT) - { - Return (^^CTOK (NTTH)) + Return (^^CTOK (DPTF_TSR2_CRITICAL)) } Name (PATC, 2) @@ -246,5 +193,11 @@ Device (TSR2) { \_SB.PCI0.LPCB.EC0.PAT1 (TMPI, Arg0) } + + /* Disable Aux Trip Point */ + Method (PATD, 0, Serialized) + { + \_SB.PCI0.LPCB.EC0.PATD (TMPI) + } } #endif |