tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / mainboard / google / stout / acpi / thermal.asl
blob01f62296277528d09fe08263a061ab7e4fc2bc58
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2011 The Chromium OS Authors. All rights reserved.
5  *
6  * This program is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; version 2 of the License.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13  * GNU General Public License for more details.
14  */
16 // Thermal Zone
18 Scope (\_TZ)
20         ThermalZone (THRM)
21         {
22                 Name (_TC1, 0x02)
23                 Name (_TC2, 0x03)
25                 // Thermal zone polling frequency: 10 seconds
26                 Name (_TZP, 100)
28                 // Thermal sampling period for passive cooling: 10 seconds
29                 Name (_TSP, 100)
31                 // Convert from Degrees C to 1/10 Kelvin for ACPI
32                 Method (CTOK, 1)
33                 {
34                         // 10th of Degrees C
35                         Multiply (Arg0, 10, Local0)
37                         // Convert to Kelvin
38                         Add (Local0, 2732, Local0)
40                         Return (Local0)
41                 }
43                 // Threshold for OS to shutdown
44                 Method (_CRT, 0, Serialized)
45                 {
46                         Return (CTOK (\TCRT))
47                 }
49                 // Threshold for passive cooling
50                 Method (_PSV, 0, Serialized)
51                 {
52                         Return (CTOK (\TPSV))
53                 }
55                 // Processors used for passive cooling
56                 Method (_PSL, 0, Serialized)
57                 {
58                         Return (\PPKG ())
59                 }
61                 Method (_TMP, 0, Serialized)
62                 {
63                         // Returns Higher of the two readings for CPU & VGA Temperature
64                         If (LGreater (\_SB.PCI0.LPCB.EC0.TMP2, \_SB.PCI0.LPCB.EC0.TMP1))
65                         {
66                                 // CPU high temperature
67                                 Store (\_SB.PCI0.LPCB.EC0.TMP2, Local0)
68                         }
69                         Else
70                         {
71                                 // VGA high temperature
72                                 Store (\_SB.PCI0.LPCB.EC0.TMP1, Local0)
73                         }
75                         // If temp less 35 or great then 115, set default 35
76                         If (Or (LLess (Local0, 35), LGreater (Local0, 115)))
77                         {
78                                 Store (35, Local0)
79                         }
81                         Return (CTOK (Local0))
82                 }
83         }