1 /* SPDX-License-Identifier: GPL-2.0-only */
4 * PIRQ routing control is in PCR ITSS region.
6 * Due to what appears to be an ACPI interpreter bug we do not use
7 * the PCRB() method here as it may not be defined yet because the method
8 * definition depends on the order of the include files in pch.asl.
10 * https://bugs.acpica.org/show_bug.cgi?id=1201
12 OperationRegion (ITSS, SystemMemory,
13 PCR_ITSS_PIRQA_ROUT + CONFIG_PCR_BASE_ADDRESS + (PID_ITSS << PCR_PORTID_SHIFT),
15 Field (ITSS, ByteAcc, NoLock, Preserve)
17 PIRA, 8, /* PIRQA Routing Control */
18 PIRB, 8, /* PIRQB Routing Control */
19 PIRC, 8, /* PIRQC Routing Control */
20 PIRD, 8, /* PIRQD Routing Control */
21 PIRE, 8, /* PIRQE Routing Control */
22 PIRF, 8, /* PIRQF Routing Control */
23 PIRG, 8, /* PIRQG Routing Control */
24 PIRH, 8, /* PIRQH Routing Control */
27 Name (IREN, 0x80) /* Interrupt Routing Enable */
28 Name (IREM, 0x0f) /* Interrupt Routing Mask */
32 Name (_HID, EISAID ("PNP0C0F"))
35 Name (_PRS, ResourceTemplate ()
37 IRQ (Level, ActiveLow, Shared)
38 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
41 Method (_CRS, 0, Serialized)
43 Name (RTLA, ResourceTemplate ()
45 IRQ (Level, ActiveLow, Shared) {}
47 CreateWordField (RTLA, 1, IRQ0)
50 /* Set the bit from PIRQ Routing Register */
51 IRQ0 = 1 << (^^PIRA & ^^IREM)
56 Method (_SRS, 1, Serialized)
58 CreateWordField (Arg0, 1, IRQ0)
59 FindSetRightBit (IRQ0, Local0)
64 Method (_STA, 0, Serialized)
66 If (^^PIRA & ^^IREN) {
73 Method (_DIS, 0, Serialized)
81 Name (_HID, EISAID ("PNP0C0F"))
84 Name (_PRS, ResourceTemplate ()
86 IRQ (Level, ActiveLow, Shared)
87 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
90 Method (_CRS, 0, Serialized)
92 Name (RTLA, ResourceTemplate ()
94 IRQ (Level, ActiveLow, Shared) {}
96 CreateWordField (RTLA, 1, IRQ0)
99 /* Set the bit from PIRQ Routing Register */
100 IRQ0 = 1 << (^^PIRB & ^^IREM)
105 Method (_SRS, 1, Serialized)
107 CreateWordField (Arg0, 1, IRQ0)
108 FindSetRightBit (IRQ0, Local0)
113 Method (_STA, 0, Serialized)
115 If (^^PIRB & ^^IREN) {
122 Method (_DIS, 0, Serialized)
130 Name (_HID, EISAID ("PNP0C0F"))
133 Name (_PRS, ResourceTemplate ()
135 IRQ (Level, ActiveLow, Shared)
136 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
139 Method (_CRS, 0, Serialized)
141 Name (RTLA, ResourceTemplate ()
143 IRQ (Level, ActiveLow, Shared) {}
145 CreateWordField (RTLA, 1, IRQ0)
148 /* Set the bit from PIRQ Routing Register */
149 IRQ0 = 1 << (^^PIRC & ^^IREM)
154 Method (_SRS, 1, Serialized)
156 CreateWordField (Arg0, 1, IRQ0)
157 FindSetRightBit (IRQ0, Local0)
162 Method (_STA, 0, Serialized)
164 If (^^PIRC & ^^IREN) {
171 Method (_DIS, 0, Serialized)
179 Name (_HID, EISAID ("PNP0C0F"))
182 Name (_PRS, ResourceTemplate ()
184 IRQ (Level, ActiveLow, Shared)
185 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
188 Method (_CRS, 0, Serialized)
190 Name (RTLA, ResourceTemplate ()
192 IRQ (Level, ActiveLow, Shared) {}
194 CreateWordField (RTLA, 1, IRQ0)
197 /* Set the bit from PIRQ Routing Register */
198 IRQ0 = 1 << (^^PIRD & ^^IREM)
203 Method (_SRS, 1, Serialized)
205 CreateWordField (Arg0, 1, IRQ0)
206 FindSetRightBit (IRQ0, Local0)
211 Method (_STA, 0, Serialized)
213 If (^^PIRD & ^^IREN) {
220 Method (_DIS, 0, Serialized)
228 Name (_HID, EISAID ("PNP0C0F"))
231 Name (_PRS, ResourceTemplate ()
233 IRQ (Level, ActiveLow, Shared)
234 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
237 Method (_CRS, 0, Serialized)
239 Name (RTLA, ResourceTemplate ()
241 IRQ (Level, ActiveLow, Shared) {}
243 CreateWordField (RTLA, 1, IRQ0)
246 /* Set the bit from PIRQ Routing Register */
247 IRQ0 = 1 << (^^PIRE & ^^IREM)
252 Method (_SRS, 1, Serialized)
254 CreateWordField (Arg0, 1, IRQ0)
255 FindSetRightBit (IRQ0, Local0)
260 Method (_STA, 0, Serialized)
262 If (^^PIRE & ^^IREN) {
269 Method (_DIS, 0, Serialized)
277 Name (_HID, EISAID ("PNP0C0F"))
280 Name (_PRS, ResourceTemplate ()
282 IRQ (Level, ActiveLow, Shared)
283 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
286 Method (_CRS, 0, Serialized)
288 Name (RTLA, ResourceTemplate ()
290 IRQ (Level, ActiveLow, Shared) {}
292 CreateWordField (RTLA, 1, IRQ0)
295 /* Set the bit from PIRQ Routing Register */
296 IRQ0 = 1 << (^^PIRF & ^^IREM)
301 Method (_SRS, 1, Serialized)
303 CreateWordField (Arg0, 1, IRQ0)
304 FindSetRightBit (IRQ0, Local0)
309 Method (_STA, 0, Serialized)
311 If (^^PIRF & ^^IREN) {
318 Method (_DIS, 0, Serialized)
326 Name (_HID, EISAID ("PNP0C0F"))
329 Name (_PRS, ResourceTemplate ()
331 IRQ (Level, ActiveLow, Shared)
332 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
335 Method (_CRS, 0, Serialized)
337 Name (RTLA, ResourceTemplate ()
339 IRQ (Level, ActiveLow, Shared) {}
341 CreateWordField (RTLA, 1, IRQ0)
344 /* Set the bit from PIRQ Routing Register */
345 IRQ0 = 1 << (^^PIRG & ^^IREM)
350 Method (_SRS, 1, Serialized)
352 CreateWordField (Arg0, 1, IRQ0)
353 FindSetRightBit (IRQ0, Local0)
358 Method (_STA, 0, Serialized)
360 If (^^PIRG & ^^IREN) {
367 Method (_DIS, 0, Serialized)
375 Name (_HID, EISAID ("PNP0C0F"))
378 Name (_PRS, ResourceTemplate ()
380 IRQ (Level, ActiveLow, Shared)
381 { 3, 4, 5, 6, 10, 11, 12, 14, 15 }
384 Method (_CRS, 0, Serialized)
386 Name (RTLA, ResourceTemplate ()
388 IRQ (Level, ActiveLow, Shared) {}
390 CreateWordField (RTLA, 1, IRQ0)
393 /* Set the bit from PIRQ Routing Register */
394 IRQ0 = 1 << (^^PIRH & ^^IREM)
399 Method (_SRS, 1, Serialized)
401 CreateWordField (Arg0, 1, IRQ0)
402 FindSetRightBit (IRQ0, Local0)
407 Method (_STA, 0, Serialized)
409 If (^^PIRH & ^^IREN) {
416 Method (_DIS, 0, Serialized)