blob: a160f6e7ebc433f4ba110885e01b8f04c7183a09 [file] [log] [blame]
Lee Leahy77ff0b12015-05-05 15:07:29 -07001/*
2 * This file is part of the coreboot project.
3 *
4 * Copyright (C) 2007-2009 coresystems GmbH
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as
8 * published by the Free Software Foundation; version 2 of
9 * the License.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
Lee Leahy77ff0b12015-05-05 15:07:29 -070015 */
16
17Device (LNKA)
18{
19 Name (_HID, EISAID("PNP0C0F"))
20 Name (_UID, 1)
21
Lee Leahy32471722015-04-20 15:20:28 -070022 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -070023 Method (_DIS, 0, Serialized)
24 {
25 Store (0x80, PRTA)
26 }
27
Lee Leahy32471722015-04-20 15:20:28 -070028 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -070029 Name (_PRS, ResourceTemplate()
30 {
31 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -070032 { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -070033 })
34
Lee Leahy32471722015-04-20 15:20:28 -070035 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -070036 Method (_CRS, 0, Serialized)
37 {
38 Name (RTLA, ResourceTemplate()
39 {
40 IRQ(Level, ActiveLow, Shared) {}
41 })
42 CreateWordField(RTLA, 1, IRQ0)
43
Lee Leahy32471722015-04-20 15:20:28 -070044 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -070045 Store (Zero, IRQ0)
46
Lee Leahy32471722015-04-20 15:20:28 -070047 /* Set the bit from PRTA */
Lee Leahy77ff0b12015-05-05 15:07:29 -070048 ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
49
50 Return (RTLA)
51 }
52
Lee Leahy32471722015-04-20 15:20:28 -070053 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -070054 Method (_SRS, 1, Serialized)
55 {
56 CreateWordField(Arg0, 1, IRQ0)
57
Lee Leahy32471722015-04-20 15:20:28 -070058 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -070059 FindSetRightBit(IRQ0, Local0)
60
61 Decrement(Local0)
62 Store(Local0, PRTA)
63 }
64
Lee Leahy32471722015-04-20 15:20:28 -070065 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -070066 Method (_STA, 0, Serialized)
67 {
68 If(And(PRTA, 0x80)) {
69 Return (0x9)
70 } Else {
71 Return (0xb)
72 }
73 }
74}
75
76Device (LNKB)
77{
78 Name (_HID, EISAID("PNP0C0F"))
79 Name (_UID, 2)
80
Lee Leahy32471722015-04-20 15:20:28 -070081 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -070082 Method (_DIS, 0, Serialized)
83 {
84 Store (0x80, PRTB)
85 }
86
Lee Leahy32471722015-04-20 15:20:28 -070087 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -070088 Name (_PRS, ResourceTemplate()
89 {
90 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -070091 { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -070092 })
93
Lee Leahy32471722015-04-20 15:20:28 -070094 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -070095 Method (_CRS, 0, Serialized)
96 {
97 Name (RTLB, ResourceTemplate()
98 {
99 IRQ(Level, ActiveLow, Shared) {}
100 })
101 CreateWordField(RTLB, 1, IRQ0)
102
Lee Leahy32471722015-04-20 15:20:28 -0700103 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700104 Store (Zero, IRQ0)
105
Lee Leahy32471722015-04-20 15:20:28 -0700106 /* Set the bit from PRTB */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700107 ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
108
109 Return (RTLB)
110 }
111
Lee Leahy32471722015-04-20 15:20:28 -0700112 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700113 Method (_SRS, 1, Serialized)
114 {
115 CreateWordField(Arg0, 1, IRQ0)
116
Lee Leahy32471722015-04-20 15:20:28 -0700117 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700118 FindSetRightBit(IRQ0, Local0)
119
120 Decrement(Local0)
121 Store(Local0, PRTB)
122 }
123
Lee Leahy32471722015-04-20 15:20:28 -0700124 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700125 Method (_STA, 0, Serialized)
126 {
127 If(And(PRTB, 0x80)) {
128 Return (0x9)
129 } Else {
130 Return (0xb)
131 }
132 }
133}
134
135Device (LNKC)
136{
137 Name (_HID, EISAID("PNP0C0F"))
138 Name (_UID, 3)
139
Lee Leahy32471722015-04-20 15:20:28 -0700140 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700141 Method (_DIS, 0, Serialized)
142 {
143 Store (0x80, PRTC)
144 }
145
Lee Leahy32471722015-04-20 15:20:28 -0700146 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700147 Name (_PRS, ResourceTemplate()
148 {
149 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -0700150 { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -0700151 })
152
Lee Leahy32471722015-04-20 15:20:28 -0700153 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700154 Method (_CRS, 0, Serialized)
155 {
156 Name (RTLC, ResourceTemplate()
157 {
158 IRQ(Level, ActiveLow, Shared) {}
159 })
160 CreateWordField(RTLC, 1, IRQ0)
161
Lee Leahy32471722015-04-20 15:20:28 -0700162 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700163 Store (Zero, IRQ0)
164
Lee Leahy32471722015-04-20 15:20:28 -0700165 /* Set the bit from PRTC */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700166 ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
167
168 Return (RTLC)
169 }
170
Lee Leahy32471722015-04-20 15:20:28 -0700171 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700172 Method (_SRS, 1, Serialized)
173 {
174 CreateWordField(Arg0, 1, IRQ0)
175
Lee Leahy32471722015-04-20 15:20:28 -0700176 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700177 FindSetRightBit(IRQ0, Local0)
178
179 Decrement(Local0)
180 Store(Local0, PRTC)
181 }
182
Lee Leahy32471722015-04-20 15:20:28 -0700183 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700184 Method (_STA, 0, Serialized)
185 {
186 If(And(PRTC, 0x80)) {
187 Return (0x9)
188 } Else {
189 Return (0xb)
190 }
191 }
192}
193
194Device (LNKD)
195{
196 Name (_HID, EISAID("PNP0C0F"))
197 Name (_UID, 4)
198
Lee Leahy32471722015-04-20 15:20:28 -0700199 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700200 Method (_DIS, 0, Serialized)
201 {
202 Store (0x80, PRTD)
203 }
204
Lee Leahy32471722015-04-20 15:20:28 -0700205 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700206 Name (_PRS, ResourceTemplate()
207 {
208 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -0700209 { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -0700210 })
211
Lee Leahy32471722015-04-20 15:20:28 -0700212 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700213 Method (_CRS, 0, Serialized)
214 {
215 Name (RTLD, ResourceTemplate()
216 {
217 IRQ(Level, ActiveLow, Shared) {}
218 })
219 CreateWordField(RTLD, 1, IRQ0)
220
Lee Leahy32471722015-04-20 15:20:28 -0700221 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700222 Store (Zero, IRQ0)
223
Lee Leahy32471722015-04-20 15:20:28 -0700224 /* Set the bit from PRTD */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700225 ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
226
227 Return (RTLD)
228 }
229
Lee Leahy32471722015-04-20 15:20:28 -0700230 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700231 Method (_SRS, 1, Serialized)
232 {
233 CreateWordField(Arg0, 1, IRQ0)
234
Lee Leahy32471722015-04-20 15:20:28 -0700235 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700236 FindSetRightBit(IRQ0, Local0)
237
238 Decrement(Local0)
239 Store(Local0, PRTD)
240 }
241
Lee Leahy32471722015-04-20 15:20:28 -0700242 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700243 Method (_STA, 0, Serialized)
244 {
245 If(And(PRTD, 0x80)) {
246 Return (0x9)
247 } Else {
248 Return (0xb)
249 }
250 }
251}
252
253Device (LNKE)
254{
255 Name (_HID, EISAID("PNP0C0F"))
256 Name (_UID, 5)
257
Lee Leahy32471722015-04-20 15:20:28 -0700258 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700259 Method (_DIS, 0, Serialized)
260 {
261 Store (0x80, PRTE)
262 }
263
Lee Leahy32471722015-04-20 15:20:28 -0700264 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700265 Name (_PRS, ResourceTemplate()
266 {
267 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -0700268 { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -0700269 })
270
Lee Leahy32471722015-04-20 15:20:28 -0700271 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700272 Method (_CRS, 0, Serialized)
273 {
274 Name (RTLE, ResourceTemplate()
275 {
276 IRQ(Level, ActiveLow, Shared) {}
277 })
278 CreateWordField(RTLE, 1, IRQ0)
279
Lee Leahy32471722015-04-20 15:20:28 -0700280 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700281 Store (Zero, IRQ0)
282
Lee Leahy32471722015-04-20 15:20:28 -0700283 /* Set the bit from PRTE */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700284 ShiftLeft(1, And(PRTE, 0x0f), IRQ0)
285
286 Return (RTLE)
287 }
288
Lee Leahy32471722015-04-20 15:20:28 -0700289 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700290 Method (_SRS, 1, Serialized)
291 {
292 CreateWordField(Arg0, 1, IRQ0)
293
Lee Leahy32471722015-04-20 15:20:28 -0700294 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700295 FindSetRightBit(IRQ0, Local0)
296
297 Decrement(Local0)
298 Store(Local0, PRTE)
299 }
300
Lee Leahy32471722015-04-20 15:20:28 -0700301 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700302 Method (_STA, 0, Serialized)
303 {
304 If(And(PRTE, 0x80)) {
305 Return (0x9)
306 } Else {
307 Return (0xb)
308 }
309 }
310}
311
312Device (LNKF)
313{
314 Name (_HID, EISAID("PNP0C0F"))
315 Name (_UID, 6)
316
Lee Leahy32471722015-04-20 15:20:28 -0700317 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700318 Method (_DIS, 0, Serialized)
319 {
320 Store (0x80, PRTF)
321 }
322
Lee Leahy32471722015-04-20 15:20:28 -0700323 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700324 Name (_PRS, ResourceTemplate()
325 {
326 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -0700327 { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -0700328 })
329
Lee Leahy32471722015-04-20 15:20:28 -0700330 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700331 Method (_CRS, 0, Serialized)
332 {
333 Name (RTLF, ResourceTemplate()
334 {
335 IRQ(Level, ActiveLow, Shared) {}
336 })
337 CreateWordField(RTLF, 1, IRQ0)
338
Lee Leahy32471722015-04-20 15:20:28 -0700339 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700340 Store (Zero, IRQ0)
341
Lee Leahy32471722015-04-20 15:20:28 -0700342 /* Set the bit from PRTF */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700343 ShiftLeft(1, And(PRTF, 0x0f), IRQ0)
344
345 Return (RTLF)
346 }
347
Lee Leahy32471722015-04-20 15:20:28 -0700348 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700349 Method (_SRS, 1, Serialized)
350 {
351 CreateWordField(Arg0, 1, IRQ0)
352
Lee Leahy32471722015-04-20 15:20:28 -0700353 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700354 FindSetRightBit(IRQ0, Local0)
355
356 Decrement(Local0)
357 Store(Local0, PRTF)
358 }
359
Lee Leahy32471722015-04-20 15:20:28 -0700360 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700361 Method (_STA, 0, Serialized)
362 {
363 If(And(PRTF, 0x80)) {
364 Return (0x9)
365 } Else {
366 Return (0xb)
367 }
368 }
369}
370
371Device (LNKG)
372{
373 Name (_HID, EISAID("PNP0C0F"))
374 Name (_UID, 7)
375
Lee Leahy32471722015-04-20 15:20:28 -0700376 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700377 Method (_DIS, 0, Serialized)
378 {
379 Store (0x80, PRTG)
380 }
381
Lee Leahy32471722015-04-20 15:20:28 -0700382 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700383 Name (_PRS, ResourceTemplate()
384 {
385 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -0700386 { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -0700387 })
388
Lee Leahy32471722015-04-20 15:20:28 -0700389 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700390 Method (_CRS, 0, Serialized)
391 {
392 Name (RTLG, ResourceTemplate()
393 {
394 IRQ(Level, ActiveLow, Shared) {}
395 })
396 CreateWordField(RTLG, 1, IRQ0)
397
Lee Leahy32471722015-04-20 15:20:28 -0700398 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700399 Store (Zero, IRQ0)
400
Lee Leahy32471722015-04-20 15:20:28 -0700401 /* Set the bit from PRTG */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700402 ShiftLeft(1, And(PRTG, 0x0f), IRQ0)
403
404 Return (RTLG)
405 }
406
Lee Leahy32471722015-04-20 15:20:28 -0700407 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700408 Method (_SRS, 1, Serialized)
409 {
410 CreateWordField(Arg0, 1, IRQ0)
411
Lee Leahy32471722015-04-20 15:20:28 -0700412 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700413 FindSetRightBit(IRQ0, Local0)
414
415 Decrement(Local0)
416 Store(Local0, PRTG)
417 }
418
Lee Leahy32471722015-04-20 15:20:28 -0700419 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700420 Method (_STA, 0, Serialized)
421 {
422 If(And(PRTG, 0x80)) {
423 Return (0x9)
424 } Else {
425 Return (0xb)
426 }
427 }
428}
429
430Device (LNKH)
431{
432 Name (_HID, EISAID("PNP0C0F"))
433 Name (_UID, 8)
434
Lee Leahy32471722015-04-20 15:20:28 -0700435 /* Disable method */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700436 Method (_DIS, 0, Serialized)
437 {
438 Store (0x80, PRTH)
439 }
440
Lee Leahy32471722015-04-20 15:20:28 -0700441 /* Possible Resource Settings for this Link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700442 Name (_PRS, ResourceTemplate()
443 {
444 IRQ(Level, ActiveLow, Shared)
Lee Leahy32471722015-04-20 15:20:28 -0700445 { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
Lee Leahy77ff0b12015-05-05 15:07:29 -0700446 })
447
Lee Leahy32471722015-04-20 15:20:28 -0700448 /* Current Resource Settings for this link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700449 Method (_CRS, 0, Serialized)
450 {
451 Name (RTLH, ResourceTemplate()
452 {
453 IRQ(Level, ActiveLow, Shared) {}
454 })
455 CreateWordField(RTLH, 1, IRQ0)
456
Lee Leahy32471722015-04-20 15:20:28 -0700457 /* Clear the WordField */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700458 Store (Zero, IRQ0)
459
Lee Leahy32471722015-04-20 15:20:28 -0700460 /* Set the bit from PRTH */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700461 ShiftLeft(1, And(PRTH, 0x0f), IRQ0)
462
463 Return (RTLH)
464 }
465
Lee Leahy32471722015-04-20 15:20:28 -0700466 /* Set Resource Setting for this IRQ link */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700467 Method (_SRS, 1, Serialized)
468 {
469 CreateWordField(Arg0, 1, IRQ0)
470
Lee Leahy32471722015-04-20 15:20:28 -0700471 /* Which bit is set? */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700472 FindSetRightBit(IRQ0, Local0)
473
474 Decrement(Local0)
475 Store(Local0, PRTH)
476 }
477
Lee Leahy32471722015-04-20 15:20:28 -0700478 /* Status */
Lee Leahy77ff0b12015-05-05 15:07:29 -0700479 Method (_STA, 0, Serialized)
480 {
481 If(And(PRTH, 0x80)) {
482 Return (0x9)
483 } Else {
484 Return (0xb)
485 }
486 }
487}