blob: 1225a627855e0eb2511bb36225e504faaeba91f1 [file] [log] [blame]
Dave Frodinc43bce52014-12-03 08:22:46 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2013 Sage Electronic Engineering, LLC
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.
Dave Frodinc43bce52014-12-03 08:22:46 -070014 */
15
16/* Wake status package */
17Name(WKST,Package(){Zero, Zero})
18
19/*
20* \_PTS - Prepare to Sleep method
21*
22* Entry:
23* Arg0=The value of the sleeping state S1=1, S2=2, etc
24*
25* Exit:
26* -none-
27*
28* The _PTS control method is executed at the beginning of the sleep process
Marshall Dawsona8025db2016-12-16 13:17:34 -050029* for S1-S5. The sleeping value is passed to the _PTS control method. This
Dave Frodinc43bce52014-12-03 08:22:46 -070030* control method may be executed a relatively long time before entering the
Marshall Dawsona8025db2016-12-16 13:17:34 -050031* sleep state and the OS may abort the operation without notification to
Dave Frodinc43bce52014-12-03 08:22:46 -070032* the ACPI driver. This method cannot modify the configuration or power
33* state of any device in the system.
34*/
35
36External(\_SB.APTS, MethodObj)
37External(\_SB.AWAK, MethodObj)
38
39Method(_PTS, 1) {
40 /* DBGO("\\_PTS\n") */
41 /* DBGO("From S0 to S") */
42 /* DBGO(Arg0) */
43 /* DBGO("\n") */
44
45 /* Clear wake status structure. */
46 Store(0, Index(WKST,0))
47 Store(0, Index(WKST,1))
48 Store(7, UPWS)
49 \_SB.APTS(Arg0)
50} /* End Method(\_PTS) */
51
52/*
53* \_BFS OEM Back From Sleep method
54*
55* Entry:
56* Arg0=The value of the sleeping state S1=1, S2=2
57*
58* Exit:
59* -none-
60*/
61Method(\_BFS, 1) {
62 /* DBGO("\\_BFS\n") */
63 /* DBGO("From S") */
64 /* DBGO(Arg0) */
65 /* DBGO(" to S0\n") */
66}
67
68/*
69* \_WAK System Wake method
70*
71* Entry:
72* Arg0=The value of the sleeping state S1=1, S2=2
73*
74* Exit:
75* Return package of 2 DWords
76* Dword 1 - Status
77* 0x00000000 wake succeeded
78* 0x00000001 Wake was signaled but failed due to lack of power
79* 0x00000002 Wake was signaled but failed due to thermal condition
80* Dword 2 - Power Supply state
81* if non-zero the effective S-state the power supply entered
82*/
83Method(\_WAK, 1) {
84 /* DBGO("\\_WAK\n") */
85 /* DBGO("From S") */
86 /* DBGO(Arg0) */
87 /* DBGO(" to S0\n") */
88 Store(1,USBS)
89
90 \_SB.AWAK(Arg0)
91
92 Return(WKST)
93} /* End Method(\_WAK) */