soc/intel/xeon_sp/skx: Use Kconfig symbol
[coreboot2.git] / src / soc / amd / stoneyridge / acpi / pci_int.asl
blobe905c9738c25a201040431837f31e030b30a9a8d
1 /* SPDX-License-Identifier: GPL-2.0-only */
3         Field(PCFG, ByteAcc, NoLock, Preserve) {
4                 /* Byte offsets are computed using the following technique:
5                  * ((bus number + 1) * ((device number * 8) * 4096)) + register offset
6                  * The 8 comes from 8 functions per device, and 4096 bytes per function config space
7                 */
8                 Offset(0x00088024),     /* Byte offset to SATA register 24h - Bus 0, Device 17, Function 0 */
9                 STB5, 32,
10                 Offset(0x00098042),     /* Byte offset to OHCI0 register 42h - Bus 0, Device 19, Function 0 */
11                 PT0D, 1,
12                 PT1D, 1,
13                 PT2D, 1,
14                 PT3D, 1,
15                 PT4D, 1,
16                 PT5D, 1,
17                 PT6D, 1,
18                 PT7D, 1,
19                 PT8D, 1,
20                 PT9D, 1,
21                 Offset(0x000a0004),     /* Byte offset to SMBUS register 4h - Bus 0, Device 20, Function 0 */
22                 SBIE, 1,
23                 SBME, 1,
24                 Offset(0x000a0008),     /* Byte offset to SMBUS register 8h - Bus 0, Device 20, Function 0 */
25                 SBRI, 8,
26                 Offset(0x000a0014),     /* Byte offset to SMBUS register 14h - Bus 0, Device 20, Function 0 */
27                 SBB1, 32,
28                 Offset(0x000a0078),     /* Byte offset to SMBUS register 78h - Bus 0, Device 20, Function 0 */
29                 ,14,
30                 P92E, 1,                /* Port92 decode enable */
31         }
33         OperationRegion(SB5, SystemMemory, STB5, 0x1000)
34                 Field(SB5, AnyAcc, NoLock, Preserve){
35                 /* Port 0 */
36                 Offset(0x120),          /* Port 0 Task file status */
37                 P0ER, 1,
38                 , 2,
39                 P0DQ, 1,
40                 , 3,
41                 P0BY, 1,
42                 Offset(0x128),          /* Port 0 Serial ATA status */
43                 P0DD, 4,
44                 , 4,
45                 P0IS, 4,
46                 Offset(0x12c),          /* Port 0 Serial ATA control */
47                 P0DI, 4,
48                 Offset(0x130),          /* Port 0 Serial ATA error */
49                 , 16,
50                 P0PR, 1,
52                 /* Port 1 */
53                 offset(0x1a0),          /* Port 1 Task file status */
54                 P1ER, 1,
55                 , 2,
56                 P1DQ, 1,
57                 , 3,
58                 P1BY, 1,
59                 Offset(0x1a8),          /* Port 1 Serial ATA status */
60                 P1DD, 4,
61                 , 4,
62                 P1IS, 4,
63                 Offset(0x1ac),          /* Port 1 Serial ATA control */
64                 P1DI, 4,
65                 Offset(0x1b0),          /* Port 1 Serial ATA error */
66                 , 16,
67                 P1PR, 1,
69                 /* Port 2 */
70                 Offset(0x220),          /* Port 2 Task file status */
71                 P2ER, 1,
72                 , 2,
73                 P2DQ, 1,
74                 , 3,
75                 P2BY, 1,
76                 Offset(0x228),          /* Port 2 Serial ATA status */
77                 P2DD, 4,
78                 , 4,
79                 P2IS, 4,
80                 Offset(0x22c),          /* Port 2 Serial ATA control */
81                 P2DI, 4,
82                 Offset(0x230),          /* Port 2 Serial ATA error */
83                 , 16,
84                 P2PR, 1,
86                 /* Port 3 */
87                 Offset(0x2a0),          /* Port 3 Task file status */
88                 P3ER, 1,
89                 , 2,
90                 P3DQ, 1,
91                 , 3,
92                 P3BY, 1,
93                 Offset(0x2a8),          /* Port 3 Serial ATA status */
94                 P3DD, 4,
95                 , 4,
96                 P3IS, 4,
97                 Offset(0x2aC),          /* Port 3 Serial ATA control */
98                 P3DI, 4,
99                 Offset(0x2b0),          /* Port 3 Serial ATA error */
100                 , 16,
101                 P3PR, 1,
102         }
104         Name(IRQB, ResourceTemplate(){
105                 IRQ(Level,ActiveLow,Shared){15}
106         })
108         Name(IRQP, ResourceTemplate(){
109                 IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15}
110         })
112         Name(PITF, ResourceTemplate(){
113                 IRQ(Level,ActiveLow,Exclusive){9}
114         })
116         Device(INTA) {
117                 Name(_HID, EISAID("PNP0C0F"))
118                 Name(_UID, 1)
120                 Method(_STA, 0) {
121                         if (PIRA) {
122                                 Return (0x0b) /* sata is invisible */
123                         } else {
124                                 Return (0x09) /* sata is disabled */
125                         }
126                 } /* End Method(_SB.INTA._STA) */
128                 Method(_DIS ,0) {
129                         /* DBGO("\\_SB\\LNKA\\_DIS\n") */
130                 } /* End Method(_SB.INTA._DIS) */
132                 Method(_PRS ,0) {
133                         /* DBGO("\\_SB\\LNKA\\_PRS\n") */
134                         Return (IRQP)
135                 } /* Method(_SB.INTA._PRS) */
137                 Method(_CRS ,0) {
138                         /* DBGO("\\_SB\\LNKA\\_CRS\n") */
139                         CreateWordField(IRQB, 0x1, IRQN)
140                         IRQN = 1 << PIRA
141                         Return (IRQB)
142                 } /* Method(_SB.INTA._CRS) */
144                 Method(_SRS, 1) {
145                         /* DBGO("\\_SB\\LNKA\\_SRS\n") */
146                         CreateWordField(ARG0, 1, IRQM)
148                         /* Use lowest available IRQ */
149                         FindSetRightBit(IRQM, Local0)
150                         if (Local0) {
151                                 Local0--
152                         }
153                         PIRA = Local0
154                 } /* End Method(_SB.INTA._SRS) */
155         } /* End Device(INTA) */
157         Device(INTB) {
158                 Name(_HID, EISAID("PNP0C0F"))
159                 Name(_UID, 2)
161                 Method(_STA, 0) {
162                         if (PIRB) {
163                                 Return (0x0b) /* sata is invisible */
164                         } else {
165                                 Return (0x09) /* sata is disabled */
166                         }
167                 } /* End Method(_SB.INTB._STA) */
169                 Method(_DIS ,0) {
170                         /* DBGO("\\_SB\\LNKB\\_DIS\n") */
171                 } /* End Method(_SB.INTB._DIS) */
173                 Method(_PRS ,0) {
174                         /* DBGO("\\_SB\\LNKB\\_PRS\n") */
175                         Return (IRQP)
176                 } /* Method(_SB.INTB._PRS) */
178                 Method(_CRS ,0) {
179                         /* DBGO("\\_SB\\LNKB\\_CRS\n") */
180                         CreateWordField(IRQB, 0x1, IRQN)
181                         IRQN = 1 << PIRB
182                         Return (IRQB)
183                 } /* Method(_SB.INTB._CRS) */
185                 Method(_SRS, 1) {
186                         /* DBGO("\\_SB\\LNKB\\_CRS\n") */
187                         CreateWordField(ARG0, 1, IRQM)
189                         /* Use lowest available IRQ */
190                         FindSetRightBit(IRQM, Local0)
191                         if (Local0) {
192                                 Local0--
193                         }
194                         PIRB = Local0
195                 } /* End Method(_SB.INTB._SRS) */
196         } /* End Device(INTB)  */
198         Device(INTC) {
199                 Name(_HID, EISAID("PNP0C0F"))
200                 Name(_UID, 3)
202                 Method(_STA, 0) {
203                         if (PIRC) {
204                                 Return (0x0b) /* sata is invisible */
205                         } else {
206                                 Return (0x09) /* sata is disabled */
207                         }
208                 } /* End Method(_SB.INTC._STA) */
210                 Method(_DIS ,0) {
211                         /* DBGO("\\_SB\\LNKC\\_DIS\n") */
212                 } /* End Method(_SB.INTC._DIS) */
214                 Method(_PRS ,0) {
215                         /* DBGO("\\_SB\\LNKC\\_PRS\n") */
216                         Return (IRQP)
217                 } /* Method(_SB.INTC._PRS) */
219                 Method(_CRS ,0) {
220                         /* DBGO("\\_SB\\LNKC\\_CRS\n") */
221                         CreateWordField(IRQB, 0x1, IRQN)
222                         IRQN = 1 << PIRC
223                         Return (IRQB)
224                 } /* Method(_SB.INTC._CRS) */
226                 Method(_SRS, 1) {
227                         /* DBGO("\\_SB\\LNKC\\_CRS\n") */
228                         CreateWordField(ARG0, 1, IRQM)
230                         /* Use lowest available IRQ */
231                         FindSetRightBit(IRQM, Local0)
232                         if (Local0) {
233                                 Local0--
234                         }
235                         PIRC = Local0
236                 } /* End Method(_SB.INTC._SRS) */
237         } /* End Device(INTC)  */
239         Device(INTD) {
240                 Name(_HID, EISAID("PNP0C0F"))
241                 Name(_UID, 4)
243                 Method(_STA, 0) {
244                         if (PIRD) {
245                                 Return (0x0b) /* sata is invisible */
246                         } else {
247                                 Return (0x09) /* sata is disabled */
248                         }
249                 } /* End Method(_SB.INTD._STA) */
251                 Method(_DIS ,0) {
252                         /* DBGO("\\_SB\\LNKD\\_DIS\n") */
253                 } /* End Method(_SB.INTD._DIS) */
255                 Method(_PRS ,0) {
256                         /* DBGO("\\_SB\\LNKD\\_PRS\n") */
257                         Return (IRQP)
258                 } /* Method(_SB.INTD._PRS) */
260                 Method(_CRS ,0) {
261                         /* DBGO("\\_SB\\LNKD\\_CRS\n") */
262                         CreateWordField(IRQB, 0x1, IRQN)
263                         IRQN = 1 << PIRD
264                         Return (IRQB)
265                 } /* Method(_SB.INTD._CRS) */
267                 Method(_SRS, 1) {
268                         /* DBGO("\\_SB\\LNKD\\_CRS\n") */
269                         CreateWordField(ARG0, 1, IRQM)
271                         /* Use lowest available IRQ */
272                         FindSetRightBit(IRQM, Local0)
273                         if (Local0) {
274                                 Local0--
275                         }
276                         PIRD = Local0
277                 } /* End Method(_SB.INTD._SRS) */
278         } /* End Device(INTD)  */
280         Device(INTE) {
281                 Name(_HID, EISAID("PNP0C0F"))
282                 Name(_UID, 5)
284                 Method(_STA, 0) {
285                         if (PIRE) {
286                                 Return (0x0b) /* sata is invisible */
287                         } else {
288                                 Return (0x09) /* sata is disabled */
289                         }
290                 } /* End Method(_SB.INTE._STA) */
292                 Method(_DIS ,0) {
293                         /* DBGO("\\_SB\\LNKE\\_DIS\n") */
294                 } /* End Method(_SB.INTE._DIS) */
296                 Method(_PRS ,0) {
297                         /* DBGO("\\_SB\\LNKE\\_PRS\n") */
298                         Return (IRQP)
299                 } /* Method(_SB.INTE._PRS) */
301                 Method(_CRS ,0) {
302                         /* DBGO("\\_SB\\LNKE\\_CRS\n") */
303                         CreateWordField(IRQB, 0x1, IRQN)
304                         IRQN = 1 << PIRE
305                         Return (IRQB)
306                 } /* Method(_SB.INTE._CRS) */
308                 Method(_SRS, 1) {
309                         /* DBGO("\\_SB\\LNKE\\_CRS\n") */
310                         CreateWordField(ARG0, 1, IRQM)
312                         /* Use lowest available IRQ */
313                         FindSetRightBit(IRQM, Local0)
314                         if (Local0) {
315                                 Local0--
316                         }
317                         PIRE = Local0
318                 } /* End Method(_SB.INTE._SRS) */
319         } /* End Device(INTE)  */
321         Device(INTF) {
322                 Name(_HID, EISAID("PNP0C0F"))
323                 Name(_UID, 6)
325                 Method(_STA, 0) {
326                         if (PIRF) {
327                                 Return (0x0b) /* sata is invisible */
328                         } else {
329                                 Return (0x09) /* sata is disabled */
330                         }
331                 } /* End Method(_SB.INTF._STA) */
333                 Method(_DIS ,0) {
334                         /* DBGO("\\_SB\\LNKF\\_DIS\n") */
335                 } /* End Method(_SB.INTF._DIS) */
337                 Method(_PRS ,0) {
338                         /* DBGO("\\_SB\\LNKF\\_PRS\n") */
339                         Return (PITF)
340                 } /* Method(_SB.INTF._PRS) */
342                 Method(_CRS ,0) {
343                         /* DBGO("\\_SB\\LNKF\\_CRS\n") */
344                         CreateWordField(IRQB, 0x1, IRQN)
345                         IRQN = 1 << PIRF
346                         Return (IRQB)
347                 } /* Method(_SB.INTF._CRS) */
349                 Method(_SRS, 1) {
350                         /* DBGO("\\_SB\\LNKF\\_CRS\n") */
351                         CreateWordField(ARG0, 1, IRQM)
353                         /* Use lowest available IRQ */
354                         FindSetRightBit(IRQM, Local0)
355                         if (Local0) {
356                                 Local0--
357                         }
358                         PIRF = Local0
359                 } /*  End Method(_SB.INTF._SRS) */
360         } /* End Device(INTF)  */
362         Device(INTG) {
363                 Name(_HID, EISAID("PNP0C0F"))
364                 Name(_UID, 7)
366                 Method(_STA, 0) {
367                         if (PIRG) {
368                                 Return (0x0b) /* sata is invisible */
369                         } else {
370                                 Return (0x09) /* sata is disabled */
371                         }
372                 } /* End Method(_SB.INTG._STA)  */
374                 Method(_DIS ,0) {
375                         /* DBGO("\\_SB\\LNKG\\_DIS\n") */
376                 } /* End Method(_SB.INTG._DIS)  */
378                 Method(_PRS ,0) {
379                         /* DBGO("\\_SB\\LNKG\\_PRS\n") */
380                         Return (IRQP)
381                 } /* Method(_SB.INTG._CRS)  */
383                 Method(_CRS ,0) {
384                         /* DBGO("\\_SB\\LNKG\\_CRS\n") */
385                         CreateWordField(IRQB, 0x1, IRQN)
386                         IRQN = 1 << PIRG
387                         Return (IRQB)
388                 } /* Method(_SB.INTG._CRS)  */
390                 Method(_SRS, 1) {
391                         /* DBGO("\\_SB\\LNKG\\_CRS\n") */
392                         CreateWordField(ARG0, 1, IRQM)
394                         /* Use lowest available IRQ */
395                         FindSetRightBit(IRQM, Local0)
396                         if (Local0) {
397                                 Local0--
398                         }
399                         PIRG= Local0
400                 } /* End Method(_SB.INTG._SRS)  */
401         } /* End Device(INTG)  */
403         Device(INTH) {
404                 Name(_HID, EISAID("PNP0C0F"))
405                 Name(_UID, 8)
407                 Method(_STA, 0) {
408                         if (PIRH) {
409                                 Return (0x0b) /* sata is invisible */
410                         } else {
411                                 Return (0x09) /* sata is disabled */
412                         }
413                 } /* End Method(_SB.INTH._STA)  */
415                 Method(_DIS ,0) {
416                         /* DBGO("\\_SB\\LNKH\\_DIS\n") */
417                 } /* End Method(_SB.INTH._DIS)  */
419                 Method(_PRS ,0) {
420                         /* DBGO("\\_SB\\LNKH\\_PRS\n") */
421                         Return (IRQP)
422                 } /* Method(_SB.INTH._CRS)  */
424                 Method(_CRS ,0) {
425                         /* DBGO("\\_SB\\LNKH\\_CRS\n") */
426                         CreateWordField(IRQB, 0x1, IRQN)
427                         IRQN = 1 << PIRH
428                         Return (IRQB)
429                 } /* Method(_SB.INTH._CRS)  */
431                 Method(_SRS, 1) {
432                         /* DBGO("\\_SB\\LNKH\\_CRS\n") */
433                         CreateWordField(ARG0, 1, IRQM)
435                         /* Use lowest available IRQ */
436                         FindSetRightBit(IRQM, Local0)
437                         if (Local0) {
438                                 Local0--
439                         }
440                         PIRH = Local0
441                 } /* End Method(_SB.INTH._SRS)  */
442         } /* End Device(INTH)   */