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) {
33 Name(_HID, EISAID("PNP0C0F"))
37 Method(_DIS, 0, Serialized)
42 /* Possible Resource Settings for this Link */
43 Name(_PRS, ResourceTemplate()
45 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
48 /* Current Resource Settings for this link */
49 Method(_CRS, 0, Serialized)
51 Name(RTLA, ResourceTemplate()
53 IRQ(Level, ActiveLow, Shared) {}
55 CreateWordField(RTLA, 1, IRQ0)
57 /* Clear the WordField */
60 /* Set the bit from PRTA */
61 ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
66 /* Set Resource Setting for this IRQ link */
67 Method(_SRS, 1, Serialized)
69 CreateWordField(Arg0, 1, IRQ0)
71 /* Which bit is set? */
72 FindSetRightBit(IRQ0, Local0)
79 Method(_STA, 0, Serialized)
81 If (And(PRTA, 0x80)) {
84 Return (STA_INVISIBLE)
91 Name(_HID, EISAID("PNP0C0F"))
95 Method(_DIS, 0, Serialized)
100 /* Possible Resource Settings for this Link */
101 Name(_PRS, ResourceTemplate()
103 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
106 /* Current Resource Settings for this link */
107 Method(_CRS, 0, Serialized)
109 Name(RTLB, ResourceTemplate()
111 IRQ(Level, ActiveLow, Shared) {}
113 CreateWordField(RTLB, 1, IRQ0)
115 /* Clear the WordField */
118 /* Set the bit from PRTB */
119 ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
124 /* Set Resource Setting for this IRQ link */
125 Method(_SRS, 1, Serialized)
127 CreateWordField(Arg0, 1, IRQ0)
129 /* Which bit is set? */
130 FindSetRightBit(IRQ0, Local0)
137 Method(_STA, 0, Serialized)
139 If (And(PRTB, 0x80)) {
140 Return (STA_DISABLED)
142 Return (STA_INVISIBLE)
149 Name(_HID, EISAID("PNP0C0F"))
153 Method(_DIS, 0, Serialized)
158 /* Possible Resource Settings for this Link */
159 Name(_PRS, ResourceTemplate()
161 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
164 /* Current Resource Settings for this link */
165 Method(_CRS, 0, Serialized)
167 Name(RTLC, ResourceTemplate()
169 IRQ(Level, ActiveLow, Shared) {}
171 CreateWordField(RTLC, 1, IRQ0)
173 /* Clear the WordField */
176 /* Set the bit from PRTC */
177 ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
182 /* Set Resource Setting for this IRQ link */
183 Method(_SRS, 1, Serialized)
185 CreateWordField(Arg0, 1, IRQ0)
187 /* Which bit is set? */
188 FindSetRightBit(IRQ0, Local0)
195 Method(_STA, 0, Serialized)
197 If (And(PRTC, 0x80)) {
198 Return (STA_DISABLED)
200 Return (STA_INVISIBLE)
207 Name(_HID, EISAID("PNP0C0F"))
211 Method(_DIS, 0, Serialized)
216 /* Possible Resource Settings for this Link */
217 Name(_PRS, ResourceTemplate()
219 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
222 /* Current Resource Settings for this link */
223 Method(_CRS, 0, Serialized)
225 Name(RTLD, ResourceTemplate()
227 IRQ(Level, ActiveLow, Shared) {}
229 CreateWordField(RTLD, 1, IRQ0)
231 /* Clear the WordField */
234 /* Set the bit from PRTD */
235 ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
240 /* Set Resource Setting for this IRQ link */
241 Method(_SRS, 1, Serialized)
243 CreateWordField(Arg0, 1, IRQ0)
245 /* Which bit is set? */
246 FindSetRightBit(IRQ0, Local0)
253 Method(_STA, 0, Serialized)
255 If (And(PRTD, 0x80)) {
256 Return (STA_DISABLED)
258 Return (STA_INVISIBLE)
265 Name(_HID, EISAID("PNP0C0F"))
269 Method(_DIS, 0, Serialized)
274 /* Possible Resource Settings for this Link */
275 Name(_PRS, ResourceTemplate()
277 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
280 /* Current Resource Settings for this link */
281 Method(_CRS, 0, Serialized)
283 Name(RTLE, ResourceTemplate()
285 IRQ(Level, ActiveLow, Shared) {}
287 CreateWordField(RTLE, 1, IRQ0)
289 /* Clear the WordField */
292 /* Set the bit from PRTE */
293 ShiftLeft(1, And(PRTE, 0x0f), IRQ0)
298 /* Set Resource Setting for this IRQ link */
299 Method(_SRS, 1, Serialized)
301 CreateWordField(Arg0, 1, IRQ0)
303 /* Which bit is set? */
304 FindSetRightBit(IRQ0, Local0)
311 Method(_STA, 0, Serialized)
313 If (And(PRTE, 0x80)) {
314 Return (STA_DISABLED)
316 Return (STA_INVISIBLE)
323 Name(_HID, EISAID("PNP0C0F"))
327 Method(_DIS, 0, Serialized)
332 /* Possible Resource Settings for this Link */
333 Name(_PRS, ResourceTemplate()
335 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
338 /* Current Resource Settings for this link */
339 Method(_CRS, 0, Serialized)
341 Name(RTLF, ResourceTemplate()
343 IRQ(Level, ActiveLow, Shared) {}
345 CreateWordField(RTLF, 1, IRQ0)
347 /* Clear the WordField */
350 /* Set the bit from PRTF */
351 ShiftLeft(1, And(PRTF, 0x0f), IRQ0)
356 /* Set Resource Setting for this IRQ link */
357 Method(_SRS, 1, Serialized)
359 CreateWordField(Arg0, 1, IRQ0)
361 /* Which bit is set? */
362 FindSetRightBit(IRQ0, Local0)
369 Method(_STA, 0, Serialized)
371 If (And(PRTF, 0x80)) {
372 Return (STA_DISABLED)
374 Return (STA_INVISIBLE)
381 Name(_HID, EISAID("PNP0C0F"))
385 Method(_DIS, 0, Serialized)
390 /* Possible Resource Settings for this Link */
391 Name(_PRS, ResourceTemplate()
393 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
396 /* Current Resource Settings for this link */
397 Method(_CRS, 0, Serialized)
399 Name(RTLG, ResourceTemplate()
401 IRQ(Level, ActiveLow, Shared) {}
403 CreateWordField(RTLG, 1, IRQ0)
405 /* Clear the WordField */
408 /* Set the bit from PRTG */
409 ShiftLeft(1, And(PRTG, 0x0f), IRQ0)
414 /* Set Resource Setting for this IRQ link */
415 Method(_SRS, 1, Serialized)
417 CreateWordField(Arg0, 1, IRQ0)
419 /* Which bit is set? */
420 FindSetRightBit(IRQ0, Local0)
427 Method(_STA, 0, Serialized)
429 If (And(PRTG, 0x80)) {
430 Return (STA_DISABLED)
432 Return (STA_INVISIBLE)
439 Name(_HID, EISAID("PNP0C0F"))
443 Method(_DIS, 0, Serialized)
448 /* Possible Resource Settings for this Link */
449 Name(_PRS, ResourceTemplate()
451 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
454 /* Current Resource Settings for this link */
455 Method(_CRS, 0, Serialized)
457 Name(RTLH, ResourceTemplate()
459 IRQ(Level, ActiveLow, Shared) {}
461 CreateWordField(RTLH, 1, IRQ0)
463 /* Clear the WordField */
466 /* Set the bit from PRTH */
467 ShiftLeft(1, And(PRTH, 0x0f), IRQ0)
472 /* Set Resource Setting for this IRQ link */
473 Method(_SRS, 1, Serialized)
475 CreateWordField(Arg0, 1, IRQ0)
477 /* Which bit is set? */
478 FindSetRightBit(IRQ0, Local0)
485 Method(_STA, 0, Serialized)
487 If (And(PRTH, 0x80)) {
488 Return (STA_DISABLED)
490 Return (STA_INVISIBLE)