diff options
author | Duncan Laurie <dlaurie@chromium.org> | 2013-10-12 11:50:05 +0800 |
---|---|---|
committer | Isaac Christensen <isaac.christensen@se-eng.com> | 2014-09-08 19:02:51 +0200 |
commit | 1eca1d4e15c254b1f63336b991bf1a81b70712c0 (patch) | |
tree | d07088b8fc026ed15a7b9238f98c77ffbbcd78a7 /src/mainboard/google/samus/acpi | |
parent | 51edd54738b2248e92580caa317aa4e8e1694d40 (diff) |
samus: Change thermal behavior to match other haswell platforms
Change-Id: Ia835f16b156949f1841210c4a469223d5df28a54
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174087
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry picked from commit 8e51d1d74cdcadde9cbf10e8321d601b099c46bc)
Signed-off-by: Isaac Christensen <isaac.christensen@se-eng.com>
Reviewed-on: http://review.coreboot.org/6825
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/mainboard/google/samus/acpi')
-rw-r--r-- | src/mainboard/google/samus/acpi/thermal.asl | 100 |
1 files changed, 32 insertions, 68 deletions
diff --git a/src/mainboard/google/samus/acpi/thermal.asl b/src/mainboard/google/samus/acpi/thermal.asl index b61baeb261..a622d6cba6 100644 --- a/src/mainboard/google/samus/acpi/thermal.asl +++ b/src/mainboard/google/samus/acpi/thermal.asl @@ -21,6 +21,20 @@ Scope (\_TZ) { + // Handler for throttle requests on this platform + // 0 = Stop throttling + // 1 = Start throttling + Method (THRT, 1, Serialized) + { + If (LEqual (Arg0, 0)) { + /* Disable Power Limit */ + \_SB.PCI0.MCHC.CTLD () + } Else { + /* Enable Power Limit */ + \_SB.PCI0.MCHC.CTLE (\F0PW) + } + } + ThermalZone (THRM) { Name (_TC1, 0x02) @@ -61,7 +75,7 @@ Scope (\_TZ) Return (\PPKG ()) } - Method (_TMP, 0, Serialized) + Method (TCHK, 0, Serialized) { // Get Temperature from TIN# set in NVS Store (\_SB.PCI0.LPCB.EC0.TINS (TMPS), Local0) @@ -94,79 +108,29 @@ Scope (\_TZ) Return (Local0) } - /* CTDP Down */ - Method (_AC0) { - If (LLessEqual (\FLVL, 0)) { - Return (CTOK (\F0OF)) - } Else { - Return (CTOK (\F0ON)) - } - } + Method (_TMP, 0, Serialized) + { + // Get temperature from EC in deci-kelvin + Store (TCHK (), Local0) - /* CTDP Nominal */ - Method (_AC1) { - If (LLessEqual (\FLVL, 1)) { - Return (CTOK (\F1OF)) - } Else { - Return (CTOK (\F1ON)) - } - } + // Critical temperature in deci-kelvin + Store (CTOK (\TCRT), Local1) - Name (_AL0, Package () { TDP0 }) - Name (_AL1, Package () { TDP1 }) + If (LGreaterEqual (Local0, Local1)) { + Store ("CRITICAL TEMPERATURE", Debug) + Store (Local0, Debug) - PowerResource (TNP0, 0, 0) - { - Method (_STA) { - If (LLessEqual (\FLVL, 0)) { - Return (One) - } Else { - Return (Zero) - } - } - Method (_ON) { - Store (0, \FLVL) - \_SB.PCI0.MCHC.STND () - Notify (\_TZ.THRM, 0x81) - } - Method (_OFF) { - Store (1, \FLVL) - \_SB.PCI0.MCHC.STDN () - Notify (\_TZ.THRM, 0x81) - } - } + // Wait 1 second for EC to re-poll + Sleep (1000) - PowerResource (TNP1, 0, 0) - { - Method (_STA) { - If (LLessEqual (\FLVL, 1)) { - Return (One) - } Else { - Return (Zero) - } - } - Method (_ON) { - Store (1, \FLVL) - Notify (\_TZ.THRM, 0x81) - } - Method (_OFF) { - Store (1, \FLVL) - Notify (\_TZ.THRM, 0x81) - } - } + // Re-read temperature from EC + Store (TCHK (), Local0) - Device (TDP0) - { - Name (_HID, EISAID ("PNP0C0B")) - Name (_UID, 0) - Name (_PR0, Package () { TNP0 }) - } + Store ("RE-READ TEMPERATURE", Debug) + Store (Local0, Debug) + } - Device (TDP1) - { - Name (_HID, EISAID ("PNP0C0B")) - Name (_UID, 1) - Name (_PR0, Package () { TNP1 }) + Return (Local0) } } } |