1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * Copyright (C) 2007-2009 coresystems GmbH
4 * Copyright (C) 2016 Bin Meng <bmeng.cn@gmail.com>
6 * Modified from coreboot src/soc/intel/baytrail/acpi/irqlinks.asl
10 * Intel chipset PIRQ routing control ASL description
12 * The programming interface is common to most Intel chipsets. But the PRTx
13 * registers may be mapped to different blocks. Some chipsets map them to LPC
14 * device (00:1f:00) PCI configuration space (like TunnelCreek, Quark), while
15 * some newer Atom SoCs (like BayTrail, Braswell) map them to Intel Legacy
16 * Block (ILB) memory space.
18 * This file defines 8 PCI IRQ link devices which corresponds to 8 PIRQ lines
19 * PIRQ A/B/C/D/E/F/G/H. To incorperate this file, the PRTx registers must be
20 * defined somewhere else in the platform's ASL files.
25 Name(_HID, EISAID("PNP0C0F"))
29 Method(_DIS, 0, Serialized)
34 /* Possible Resource Settings for this Link */
35 Name(_PRS, ResourceTemplate()
37 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
40 /* Current Resource Settings for this link */
41 Method(_CRS, 0, Serialized)
43 Name(RTLA, ResourceTemplate()
45 IRQ(Level, ActiveLow, Shared) {}
47 CreateWordField(RTLA, 1, IRQ0)
49 /* Clear the WordField */
52 /* Set the bit from PRTA */
53 ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
58 /* Set Resource Setting for this IRQ link */
59 Method(_SRS, 1, Serialized)
61 CreateWordField(Arg0, 1, IRQ0)
63 /* Which bit is set? */
64 FindSetRightBit(IRQ0, Local0)
71 Method(_STA, 0, Serialized)
73 If (And(PRTA, 0x80)) {
76 Return (STA_INVISIBLE)
83 Name(_HID, EISAID("PNP0C0F"))
87 Method(_DIS, 0, Serialized)
92 /* Possible Resource Settings for this Link */
93 Name(_PRS, ResourceTemplate()
95 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
98 /* Current Resource Settings for this link */
99 Method(_CRS, 0, Serialized)
101 Name(RTLB, ResourceTemplate()
103 IRQ(Level, ActiveLow, Shared) {}
105 CreateWordField(RTLB, 1, IRQ0)
107 /* Clear the WordField */
110 /* Set the bit from PRTB */
111 ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
116 /* Set Resource Setting for this IRQ link */
117 Method(_SRS, 1, Serialized)
119 CreateWordField(Arg0, 1, IRQ0)
121 /* Which bit is set? */
122 FindSetRightBit(IRQ0, Local0)
129 Method(_STA, 0, Serialized)
131 If (And(PRTB, 0x80)) {
132 Return (STA_DISABLED)
134 Return (STA_INVISIBLE)
141 Name(_HID, EISAID("PNP0C0F"))
145 Method(_DIS, 0, Serialized)
150 /* Possible Resource Settings for this Link */
151 Name(_PRS, ResourceTemplate()
153 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
156 /* Current Resource Settings for this link */
157 Method(_CRS, 0, Serialized)
159 Name(RTLC, ResourceTemplate()
161 IRQ(Level, ActiveLow, Shared) {}
163 CreateWordField(RTLC, 1, IRQ0)
165 /* Clear the WordField */
168 /* Set the bit from PRTC */
169 ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
174 /* Set Resource Setting for this IRQ link */
175 Method(_SRS, 1, Serialized)
177 CreateWordField(Arg0, 1, IRQ0)
179 /* Which bit is set? */
180 FindSetRightBit(IRQ0, Local0)
187 Method(_STA, 0, Serialized)
189 If (And(PRTC, 0x80)) {
190 Return (STA_DISABLED)
192 Return (STA_INVISIBLE)
199 Name(_HID, EISAID("PNP0C0F"))
203 Method(_DIS, 0, Serialized)
208 /* Possible Resource Settings for this Link */
209 Name(_PRS, ResourceTemplate()
211 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
214 /* Current Resource Settings for this link */
215 Method(_CRS, 0, Serialized)
217 Name(RTLD, ResourceTemplate()
219 IRQ(Level, ActiveLow, Shared) {}
221 CreateWordField(RTLD, 1, IRQ0)
223 /* Clear the WordField */
226 /* Set the bit from PRTD */
227 ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
232 /* Set Resource Setting for this IRQ link */
233 Method(_SRS, 1, Serialized)
235 CreateWordField(Arg0, 1, IRQ0)
237 /* Which bit is set? */
238 FindSetRightBit(IRQ0, Local0)
245 Method(_STA, 0, Serialized)
247 If (And(PRTD, 0x80)) {
248 Return (STA_DISABLED)
250 Return (STA_INVISIBLE)
257 Name(_HID, EISAID("PNP0C0F"))
261 Method(_DIS, 0, Serialized)
266 /* Possible Resource Settings for this Link */
267 Name(_PRS, ResourceTemplate()
269 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
272 /* Current Resource Settings for this link */
273 Method(_CRS, 0, Serialized)
275 Name(RTLE, ResourceTemplate()
277 IRQ(Level, ActiveLow, Shared) {}
279 CreateWordField(RTLE, 1, IRQ0)
281 /* Clear the WordField */
284 /* Set the bit from PRTE */
285 ShiftLeft(1, And(PRTE, 0x0f), IRQ0)
290 /* Set Resource Setting for this IRQ link */
291 Method(_SRS, 1, Serialized)
293 CreateWordField(Arg0, 1, IRQ0)
295 /* Which bit is set? */
296 FindSetRightBit(IRQ0, Local0)
303 Method(_STA, 0, Serialized)
305 If (And(PRTE, 0x80)) {
306 Return (STA_DISABLED)
308 Return (STA_INVISIBLE)
315 Name(_HID, EISAID("PNP0C0F"))
319 Method(_DIS, 0, Serialized)
324 /* Possible Resource Settings for this Link */
325 Name(_PRS, ResourceTemplate()
327 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
330 /* Current Resource Settings for this link */
331 Method(_CRS, 0, Serialized)
333 Name(RTLF, ResourceTemplate()
335 IRQ(Level, ActiveLow, Shared) {}
337 CreateWordField(RTLF, 1, IRQ0)
339 /* Clear the WordField */
342 /* Set the bit from PRTF */
343 ShiftLeft(1, And(PRTF, 0x0f), IRQ0)
348 /* Set Resource Setting for this IRQ link */
349 Method(_SRS, 1, Serialized)
351 CreateWordField(Arg0, 1, IRQ0)
353 /* Which bit is set? */
354 FindSetRightBit(IRQ0, Local0)
361 Method(_STA, 0, Serialized)
363 If (And(PRTF, 0x80)) {
364 Return (STA_DISABLED)
366 Return (STA_INVISIBLE)
373 Name(_HID, EISAID("PNP0C0F"))
377 Method(_DIS, 0, Serialized)
382 /* Possible Resource Settings for this Link */
383 Name(_PRS, ResourceTemplate()
385 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
388 /* Current Resource Settings for this link */
389 Method(_CRS, 0, Serialized)
391 Name(RTLG, ResourceTemplate()
393 IRQ(Level, ActiveLow, Shared) {}
395 CreateWordField(RTLG, 1, IRQ0)
397 /* Clear the WordField */
400 /* Set the bit from PRTG */
401 ShiftLeft(1, And(PRTG, 0x0f), IRQ0)
406 /* Set Resource Setting for this IRQ link */
407 Method(_SRS, 1, Serialized)
409 CreateWordField(Arg0, 1, IRQ0)
411 /* Which bit is set? */
412 FindSetRightBit(IRQ0, Local0)
419 Method(_STA, 0, Serialized)
421 If (And(PRTG, 0x80)) {
422 Return (STA_DISABLED)
424 Return (STA_INVISIBLE)
431 Name(_HID, EISAID("PNP0C0F"))
435 Method(_DIS, 0, Serialized)
440 /* Possible Resource Settings for this Link */
441 Name(_PRS, ResourceTemplate()
443 IRQ(Level, ActiveLow, Shared) { 5, 6, 7, 10, 11, 12, 14, 15 }
446 /* Current Resource Settings for this link */
447 Method(_CRS, 0, Serialized)
449 Name(RTLH, ResourceTemplate()
451 IRQ(Level, ActiveLow, Shared) {}
453 CreateWordField(RTLH, 1, IRQ0)
455 /* Clear the WordField */
458 /* Set the bit from PRTH */
459 ShiftLeft(1, And(PRTH, 0x0f), IRQ0)
464 /* Set Resource Setting for this IRQ link */
465 Method(_SRS, 1, Serialized)
467 CreateWordField(Arg0, 1, IRQ0)
469 /* Which bit is set? */
470 FindSetRightBit(IRQ0, Local0)
477 Method(_STA, 0, Serialized)
479 If (And(PRTH, 0x80)) {
480 Return (STA_DISABLED)
482 Return (STA_INVISIBLE)