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+
11 * Intel chipset PIRQ routing control ASL description
13 * The programming interface is common to most Intel chipsets. But the PRTx
14 * registers may be mapped to different blocks. Some chipsets map them to LPC
15 * device (00:1f:00) PCI configuration space (like TunnelCreek, Quark), while
16 * some newer Atom SoCs (like BayTrail, Braswell) map them to Intel Legacy
17 * Block (ILB) memory space.
19 * This file defines 8 PCI IRQ link devices which corresponds to 8 PIRQ lines
20 * PIRQ A/B/C/D/E/F/G/H. To incorperate this file, the PRTx registers must be
21 * defined somewhere else in the platform's ASL files.
26 Name(_HID, EISAID("PNP0C0F"))
30 Method(_DIS, 0, Serialized)
35 /* Possible Resource Settings for this Link */
36 Name(_PRS, ResourceTemplate()
38 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
41 /* Current Resource Settings for this link */
42 Method(_CRS, 0, Serialized)
44 Name(RTLA, ResourceTemplate()
46 IRQ(Level, ActiveLow, Shared) {}
48 CreateWordField(RTLA, 1, IRQ0)
50 /* Clear the WordField */
53 /* Set the bit from PRTA */
54 ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
59 /* Set Resource Setting for this IRQ link */
60 Method(_SRS, 1, Serialized)
62 CreateWordField(Arg0, 1, IRQ0)
64 /* Which bit is set? */
65 FindSetRightBit(IRQ0, Local0)
72 Method(_STA, 0, Serialized)
74 If (And(PRTA, 0x80)) {
77 Return (STA_INVISIBLE)
84 Name(_HID, EISAID("PNP0C0F"))
88 Method(_DIS, 0, Serialized)
93 /* Possible Resource Settings for this Link */
94 Name(_PRS, ResourceTemplate()
96 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
99 /* Current Resource Settings for this link */
100 Method(_CRS, 0, Serialized)
102 Name(RTLB, ResourceTemplate()
104 IRQ(Level, ActiveLow, Shared) {}
106 CreateWordField(RTLB, 1, IRQ0)
108 /* Clear the WordField */
111 /* Set the bit from PRTB */
112 ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
117 /* Set Resource Setting for this IRQ link */
118 Method(_SRS, 1, Serialized)
120 CreateWordField(Arg0, 1, IRQ0)
122 /* Which bit is set? */
123 FindSetRightBit(IRQ0, Local0)
130 Method(_STA, 0, Serialized)
132 If (And(PRTB, 0x80)) {
133 Return (STA_DISABLED)
135 Return (STA_INVISIBLE)
142 Name(_HID, EISAID("PNP0C0F"))
146 Method(_DIS, 0, Serialized)
151 /* Possible Resource Settings for this Link */
152 Name(_PRS, ResourceTemplate()
154 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
157 /* Current Resource Settings for this link */
158 Method(_CRS, 0, Serialized)
160 Name(RTLC, ResourceTemplate()
162 IRQ(Level, ActiveLow, Shared) {}
164 CreateWordField(RTLC, 1, IRQ0)
166 /* Clear the WordField */
169 /* Set the bit from PRTC */
170 ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
175 /* Set Resource Setting for this IRQ link */
176 Method(_SRS, 1, Serialized)
178 CreateWordField(Arg0, 1, IRQ0)
180 /* Which bit is set? */
181 FindSetRightBit(IRQ0, Local0)
188 Method(_STA, 0, Serialized)
190 If (And(PRTC, 0x80)) {
191 Return (STA_DISABLED)
193 Return (STA_INVISIBLE)
200 Name(_HID, EISAID("PNP0C0F"))
204 Method(_DIS, 0, Serialized)
209 /* Possible Resource Settings for this Link */
210 Name(_PRS, ResourceTemplate()
212 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
215 /* Current Resource Settings for this link */
216 Method(_CRS, 0, Serialized)
218 Name(RTLD, ResourceTemplate()
220 IRQ(Level, ActiveLow, Shared) {}
222 CreateWordField(RTLD, 1, IRQ0)
224 /* Clear the WordField */
227 /* Set the bit from PRTD */
228 ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
233 /* Set Resource Setting for this IRQ link */
234 Method(_SRS, 1, Serialized)
236 CreateWordField(Arg0, 1, IRQ0)
238 /* Which bit is set? */
239 FindSetRightBit(IRQ0, Local0)
246 Method(_STA, 0, Serialized)
248 If (And(PRTD, 0x80)) {
249 Return (STA_DISABLED)
251 Return (STA_INVISIBLE)
258 Name(_HID, EISAID("PNP0C0F"))
262 Method(_DIS, 0, Serialized)
267 /* Possible Resource Settings for this Link */
268 Name(_PRS, ResourceTemplate()
270 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
273 /* Current Resource Settings for this link */
274 Method(_CRS, 0, Serialized)
276 Name(RTLE, ResourceTemplate()
278 IRQ(Level, ActiveLow, Shared) {}
280 CreateWordField(RTLE, 1, IRQ0)
282 /* Clear the WordField */
285 /* Set the bit from PRTE */
286 ShiftLeft(1, And(PRTE, 0x0f), IRQ0)
291 /* Set Resource Setting for this IRQ link */
292 Method(_SRS, 1, Serialized)
294 CreateWordField(Arg0, 1, IRQ0)
296 /* Which bit is set? */
297 FindSetRightBit(IRQ0, Local0)
304 Method(_STA, 0, Serialized)
306 If (And(PRTE, 0x80)) {
307 Return (STA_DISABLED)
309 Return (STA_INVISIBLE)
316 Name(_HID, EISAID("PNP0C0F"))
320 Method(_DIS, 0, Serialized)
325 /* Possible Resource Settings for this Link */
326 Name(_PRS, ResourceTemplate()
328 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
331 /* Current Resource Settings for this link */
332 Method(_CRS, 0, Serialized)
334 Name(RTLF, ResourceTemplate()
336 IRQ(Level, ActiveLow, Shared) {}
338 CreateWordField(RTLF, 1, IRQ0)
340 /* Clear the WordField */
343 /* Set the bit from PRTF */
344 ShiftLeft(1, And(PRTF, 0x0f), IRQ0)
349 /* Set Resource Setting for this IRQ link */
350 Method(_SRS, 1, Serialized)
352 CreateWordField(Arg0, 1, IRQ0)
354 /* Which bit is set? */
355 FindSetRightBit(IRQ0, Local0)
362 Method(_STA, 0, Serialized)
364 If (And(PRTF, 0x80)) {
365 Return (STA_DISABLED)
367 Return (STA_INVISIBLE)
374 Name(_HID, EISAID("PNP0C0F"))
378 Method(_DIS, 0, Serialized)
383 /* Possible Resource Settings for this Link */
384 Name(_PRS, ResourceTemplate()
386 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
389 /* Current Resource Settings for this link */
390 Method(_CRS, 0, Serialized)
392 Name(RTLG, ResourceTemplate()
394 IRQ(Level, ActiveLow, Shared) {}
396 CreateWordField(RTLG, 1, IRQ0)
398 /* Clear the WordField */
401 /* Set the bit from PRTG */
402 ShiftLeft(1, And(PRTG, 0x0f), IRQ0)
407 /* Set Resource Setting for this IRQ link */
408 Method(_SRS, 1, Serialized)
410 CreateWordField(Arg0, 1, IRQ0)
412 /* Which bit is set? */
413 FindSetRightBit(IRQ0, Local0)
420 Method(_STA, 0, Serialized)
422 If (And(PRTG, 0x80)) {
423 Return (STA_DISABLED)
425 Return (STA_INVISIBLE)
432 Name(_HID, EISAID("PNP0C0F"))
436 Method(_DIS, 0, Serialized)
441 /* Possible Resource Settings for this Link */
442 Name(_PRS, ResourceTemplate()
444 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
447 /* Current Resource Settings for this link */
448 Method(_CRS, 0, Serialized)
450 Name(RTLH, ResourceTemplate()
452 IRQ(Level, ActiveLow, Shared) {}
454 CreateWordField(RTLH, 1, IRQ0)
456 /* Clear the WordField */
459 /* Set the bit from PRTH */
460 ShiftLeft(1, And(PRTH, 0x0f), IRQ0)
465 /* Set Resource Setting for this IRQ link */
466 Method(_SRS, 1, Serialized)
468 CreateWordField(Arg0, 1, IRQ0)
470 /* Which bit is set? */
471 FindSetRightBit(IRQ0, Local0)
478 Method(_STA, 0, Serialized)
480 If (And(PRTH, 0x80)) {
481 Return (STA_DISABLED)
483 Return (STA_INVISIBLE)