2 * Copyright (C) 2007-2009 coresystems GmbH
3 * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com>
5 * Modified from coreboot src/soc/intel/baytrail/acpi/irqlinks.asl
7 * SPDX-License-Identifier: GPL-2.0+
12 /* Intel Legacy Block */
13 OperationRegion(ILBS, SystemMemory, ILB_BASE_ADDRESS, ILB_BASE_SIZE)
14 Field(ILBS, AnyAcc, NoLock, Preserve) {
29 Name(_HID, EISAID("PNP0C0F"))
33 Method(_DIS, 0, Serialized)
38 /* Possible Resource Settings for this Link */
39 Name(_PRS, ResourceTemplate()
41 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
44 /* Current Resource Settings for this link */
45 Method(_CRS, 0, Serialized)
47 Name(RTLA, ResourceTemplate()
49 IRQ(Level, ActiveLow, Shared) {}
51 CreateWordField(RTLA, 1, IRQ0)
53 /* Clear the WordField */
56 /* Set the bit from PRTA */
57 ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
62 /* Set Resource Setting for this IRQ link */
63 Method(_SRS, 1, Serialized)
65 CreateWordField(Arg0, 1, IRQ0)
67 /* Which bit is set? */
68 FindSetRightBit(IRQ0, Local0)
75 Method(_STA, 0, Serialized)
77 If (And(PRTA, 0x80)) {
80 Return (STA_INVISIBLE)
87 Name(_HID, EISAID("PNP0C0F"))
91 Method(_DIS, 0, Serialized)
96 /* Possible Resource Settings for this Link */
97 Name(_PRS, ResourceTemplate()
99 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
102 /* Current Resource Settings for this link */
103 Method(_CRS, 0, Serialized)
105 Name(RTLB, ResourceTemplate()
107 IRQ(Level, ActiveLow, Shared) {}
109 CreateWordField(RTLB, 1, IRQ0)
111 /* Clear the WordField */
114 /* Set the bit from PRTB */
115 ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
120 /* Set Resource Setting for this IRQ link */
121 Method(_SRS, 1, Serialized)
123 CreateWordField(Arg0, 1, IRQ0)
125 /* Which bit is set? */
126 FindSetRightBit(IRQ0, Local0)
133 Method(_STA, 0, Serialized)
135 If (And(PRTB, 0x80)) {
136 Return (STA_DISABLED)
138 Return (STA_INVISIBLE)
145 Name(_HID, EISAID("PNP0C0F"))
149 Method(_DIS, 0, Serialized)
154 /* Possible Resource Settings for this Link */
155 Name(_PRS, ResourceTemplate()
157 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
160 /* Current Resource Settings for this link */
161 Method(_CRS, 0, Serialized)
163 Name(RTLC, ResourceTemplate()
165 IRQ(Level, ActiveLow, Shared) {}
167 CreateWordField(RTLC, 1, IRQ0)
169 /* Clear the WordField */
172 /* Set the bit from PRTC */
173 ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
178 /* Set Resource Setting for this IRQ link */
179 Method(_SRS, 1, Serialized)
181 CreateWordField(Arg0, 1, IRQ0)
183 /* Which bit is set? */
184 FindSetRightBit(IRQ0, Local0)
191 Method(_STA, 0, Serialized)
193 If (And(PRTC, 0x80)) {
194 Return (STA_DISABLED)
196 Return (STA_INVISIBLE)
203 Name(_HID, EISAID("PNP0C0F"))
207 Method(_DIS, 0, Serialized)
212 /* Possible Resource Settings for this Link */
213 Name(_PRS, ResourceTemplate()
215 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
218 /* Current Resource Settings for this link */
219 Method(_CRS, 0, Serialized)
221 Name(RTLD, ResourceTemplate()
223 IRQ(Level, ActiveLow, Shared) {}
225 CreateWordField(RTLD, 1, IRQ0)
227 /* Clear the WordField */
230 /* Set the bit from PRTD */
231 ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
236 /* Set Resource Setting for this IRQ link */
237 Method(_SRS, 1, Serialized)
239 CreateWordField(Arg0, 1, IRQ0)
241 /* Which bit is set? */
242 FindSetRightBit(IRQ0, Local0)
249 Method(_STA, 0, Serialized)
251 If (And(PRTD, 0x80)) {
252 Return (STA_DISABLED)
254 Return (STA_INVISIBLE)
261 Name(_HID, EISAID("PNP0C0F"))
265 Method(_DIS, 0, Serialized)
270 /* Possible Resource Settings for this Link */
271 Name(_PRS, ResourceTemplate()
273 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
276 /* Current Resource Settings for this link */
277 Method(_CRS, 0, Serialized)
279 Name(RTLE, ResourceTemplate()
281 IRQ(Level, ActiveLow, Shared) {}
283 CreateWordField(RTLE, 1, IRQ0)
285 /* Clear the WordField */
288 /* Set the bit from PRTE */
289 ShiftLeft(1, And(PRTE, 0x0f), IRQ0)
294 /* Set Resource Setting for this IRQ link */
295 Method(_SRS, 1, Serialized)
297 CreateWordField(Arg0, 1, IRQ0)
299 /* Which bit is set? */
300 FindSetRightBit(IRQ0, Local0)
307 Method(_STA, 0, Serialized)
309 If (And(PRTE, 0x80)) {
310 Return (STA_DISABLED)
312 Return (STA_INVISIBLE)
319 Name(_HID, EISAID("PNP0C0F"))
323 Method(_DIS, 0, Serialized)
328 /* Possible Resource Settings for this Link */
329 Name(_PRS, ResourceTemplate()
331 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
334 /* Current Resource Settings for this link */
335 Method(_CRS, 0, Serialized)
337 Name(RTLF, ResourceTemplate()
339 IRQ(Level, ActiveLow, Shared) {}
341 CreateWordField(RTLF, 1, IRQ0)
343 /* Clear the WordField */
346 /* Set the bit from PRTF */
347 ShiftLeft(1, And(PRTF, 0x0f), IRQ0)
352 /* Set Resource Setting for this IRQ link */
353 Method(_SRS, 1, Serialized)
355 CreateWordField(Arg0, 1, IRQ0)
357 /* Which bit is set? */
358 FindSetRightBit(IRQ0, Local0)
365 Method(_STA, 0, Serialized)
367 If (And(PRTF, 0x80)) {
368 Return (STA_DISABLED)
370 Return (STA_INVISIBLE)
377 Name(_HID, EISAID("PNP0C0F"))
381 Method(_DIS, 0, Serialized)
386 /* Possible Resource Settings for this Link */
387 Name(_PRS, ResourceTemplate()
389 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
392 /* Current Resource Settings for this link */
393 Method(_CRS, 0, Serialized)
395 Name(RTLG, ResourceTemplate()
397 IRQ(Level, ActiveLow, Shared) {}
399 CreateWordField(RTLG, 1, IRQ0)
401 /* Clear the WordField */
404 /* Set the bit from PRTG */
405 ShiftLeft(1, And(PRTG, 0x0f), IRQ0)
410 /* Set Resource Setting for this IRQ link */
411 Method(_SRS, 1, Serialized)
413 CreateWordField(Arg0, 1, IRQ0)
415 /* Which bit is set? */
416 FindSetRightBit(IRQ0, Local0)
423 Method(_STA, 0, Serialized)
425 If (And(PRTG, 0x80)) {
426 Return (STA_DISABLED)
428 Return (STA_INVISIBLE)
435 Name(_HID, EISAID("PNP0C0F"))
439 Method(_DIS, 0, Serialized)
444 /* Possible Resource Settings for this Link */
445 Name(_PRS, ResourceTemplate()
447 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
450 /* Current Resource Settings for this link */
451 Method(_CRS, 0, Serialized)
453 Name(RTLH, ResourceTemplate()
455 IRQ(Level, ActiveLow, Shared) {}
457 CreateWordField(RTLH, 1, IRQ0)
459 /* Clear the WordField */
462 /* Set the bit from PRTH */
463 ShiftLeft(1, And(PRTH, 0x0f), IRQ0)
468 /* Set Resource Setting for this IRQ link */
469 Method(_SRS, 1, Serialized)
471 CreateWordField(Arg0, 1, IRQ0)
473 /* Which bit is set? */
474 FindSetRightBit(IRQ0, Local0)
481 Method(_STA, 0, Serialized)
483 If (And(PRTH, 0x80)) {
484 Return (STA_DISABLED)
486 Return (STA_INVISIBLE)