Clean up ACPI:
[coreboot.git] / src / mainboard / amd / pistachio / acpi / usb.asl
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2008 Advanced Micro Devices, Inc.
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  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
18  */
19
20 /* simple name description */
21 /*
22 DefinitionBlock ("DSDT.AML","DSDT",0x01,"XXXXXX","XXXXXXXX",0x00010001
23                 )
24         {
25                 #include "usb.asl"
26         }
27 */
28 Method(UCOC, 0) {
29         Sleep(20)
30         Store(0x13,CMTI)
31         Store(0,GPSL)
32 }
33
34 /* USB Port 0 overcurrent uses Gpm 0 */
35 If(LLessEqual(UOM0,9)) {
36         Scope (\_GPE) {
37                 Method (_L13) {
38                         UCOC()
39                         if(LEqual(GPB0,PLC0)) {
40                                 Not(PLC0,PLC0)
41                                 Store(PLC0, \_SB.PT0D)
42                         }
43                 }
44         }
45 }
46
47 /* USB Port 1 overcurrent uses Gpm 1 */
48 If (LLessEqual(UOM1,9)) {
49         Scope (\_GPE) {
50                 Method (_L14) {
51                         UCOC()
52                         if (LEqual(GPB1,PLC1)) {
53                                 Not(PLC1,PLC1)
54                                 Store(PLC1, \_SB.PT1D)
55                         }
56                 }
57         }
58 }
59
60 /* USB Port 2 overcurrent uses Gpm 2 */
61 If (LLessEqual(UOM2,9)) {
62         Scope (\_GPE) {
63                 Method (_L15) {
64                         UCOC()
65                         if (LEqual(GPB2,PLC2)) {
66                                 Not(PLC2,PLC2)
67                                 Store(PLC2, \_SB.PT2D)
68                         }
69                 }
70         }
71 }
72
73 /* USB Port 3 overcurrent uses Gpm 3 */
74 If (LLessEqual(UOM3,9)) {
75         Scope (\_GPE) {
76                 Method (_L16) {
77                         UCOC()
78                         if (LEqual(GPB3,PLC3)) {
79                                 Not(PLC3,PLC3)
80                                 Store(PLC3, \_SB.PT3D)
81                         }
82                 }
83         }
84 }
85
86 /* USB Port 4 overcurrent uses Gpm 4 */
87 If (LLessEqual(UOM4,9)) {
88         Scope (\_GPE) {
89                 Method (_L19) {
90                         UCOC()
91                         if (LEqual(GPB4,PLC4)) {
92                                 Not(PLC4,PLC4)
93                                 Store(PLC4, \_SB.PT4D)
94                         }
95                 }
96         }
97 }
98
99 /* USB Port 5 overcurrent uses Gpm 5 */
100 /*
101  * If (LLessEqual(UOM5,9)) {
102  *      Scope (\_GPE) {
103  *              Method (_L1A) {
104  *                      UCOC()
105  *                      if (LEqual(GPB5,PLC5)) {
106  *                              Not(PLC5,PLC5)
107  *                              Store(PLC5, \_SB.PT5D)
108  *                      }
109  *              }
110  *      }
111  * }
112  */
113
114 /* USB Port 6 overcurrent uses Gpm 6 */
115 If (LLessEqual(UOM6,9)) {
116         Scope (\_GPE) {
117                 /* Method (_L1C) { */
118                 Method (_L06) {
119                         UCOC()
120                         if (LEqual(GPB6,PLC6)) {
121                                 Not(PLC6,PLC6)
122                                 Store(PLC6, \_SB.PT6D)
123                         }
124                 }
125         }
126 }
127
128 /* USB Port 7 overcurrent uses Gpm 7 */
129 If (LLessEqual(UOM7,9)) {
130         Scope (\_GPE) {
131                 /* Method (_L1D) { */
132                 Method (_L07) {
133                         UCOC()
134                         if (LEqual(GPB7,PLC7)) {
135                                 Not(PLC7,PLC7)
136                                 Store(PLC7, \_SB.PT7D)
137                         }
138                 }
139         }
140 }
141
142 /* USB Port 8 overcurrent uses Gpm 8 */
143 If (LLessEqual(UOM8,9)) {
144         Scope (\_GPE) {
145                 Method (_L17) {
146                         if (LEqual(G8IS,PLC8)) {
147                                 Not(PLC8,PLC8)
148                                 Store(PLC8, \_SB.PT8D)
149                         }
150                 }
151         }
152 }
153
154 /* USB Port 9 overcurrent uses Gpm 9 */
155 If (LLessEqual(UOM9,9)) {
156         Scope (\_GPE) {
157                 Method (_L0E) {
158                         if (LEqual(G9IS,0)) {
159                         Store(1,\_SB.PT9D)
160                         }
161                 }
162         }
163 }