tree: drop last paragraph of GPL copyright header
[coreboot.git] / src / southbridge / intel / bd82x6x / acpi / pcie.asl
blobd7842cd6774c2c4009d83eb201e279ca0860c2a7
1 /*
2  * This file is part of the coreboot project.
3  *
4  * Copyright (C) 2007-2009 coresystems GmbH
5  * Copyright (C) 2012 The Chromium OS Authors.  All Rights Reserved.
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License as
9  * published by the Free Software Foundation; version 2 of
10  * the License.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU General Public License for more details.
16  */
18 /* Intel 6/7 Series PCH PCIe support */
20 // PCI Express Ports
22 Method (IRQM, 1, Serialized) {
24         /* Interrupt Map INTA->INTA, INTB->INTB, INTC->INTC, INTD->INTD */
25         Name (IQAA, Package() {
26                 Package() { 0x0000ffff, 0, 0, 16 },
27                 Package() { 0x0000ffff, 1, 0, 17 },
28                 Package() { 0x0000ffff, 2, 0, 18 },
29                 Package() { 0x0000ffff, 3, 0, 19 } })
30         Name (IQAP, Package() {
31                 Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKA, 0 },
32                 Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKB, 0 },
33                 Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKC, 0 },
34                 Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKD, 0 } })
36         /* Interrupt Map INTA->INTB, INTB->INTC, INTC->INTD, INTD->INTA */
37         Name (IQBA, Package() {
38                 Package() { 0x0000ffff, 0, 0, 17 },
39                 Package() { 0x0000ffff, 1, 0, 18 },
40                 Package() { 0x0000ffff, 2, 0, 19 },
41                 Package() { 0x0000ffff, 3, 0, 16 } })
42         Name (IQBP, Package() {
43                 Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKB, 0 },
44                 Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKC, 0 },
45                 Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKD, 0 },
46                 Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKA, 0 } })
48         /* Interrupt Map INTA->INTC, INTB->INTD, INTC->INTA, INTD->INTB */
49         Name (IQCA, Package() {
50                 Package() { 0x0000ffff, 0, 0, 18 },
51                 Package() { 0x0000ffff, 1, 0, 19 },
52                 Package() { 0x0000ffff, 2, 0, 16 },
53                 Package() { 0x0000ffff, 3, 0, 17 } })
54         Name (IQCP, Package() {
55                 Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKC, 0 },
56                 Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKD, 0 },
57                 Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKA, 0 },
58                 Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKB, 0 } })
60         /* Interrupt Map INTA->INTD, INTB->INTA, INTC->INTB, INTD->INTC */
61         Name (IQDA, Package() {
62                 Package() { 0x0000ffff, 0, 0, 19 },
63                 Package() { 0x0000ffff, 1, 0, 16 },
64                 Package() { 0x0000ffff, 2, 0, 17 },
65                 Package() { 0x0000ffff, 3, 0, 18 } })
66         Name (IQDP, Package() {
67                 Package() { 0x0000ffff, 0, \_SB.PCI0.LPCB.LNKD, 0 },
68                 Package() { 0x0000ffff, 1, \_SB.PCI0.LPCB.LNKA, 0 },
69                 Package() { 0x0000ffff, 2, \_SB.PCI0.LPCB.LNKB, 0 },
70                 Package() { 0x0000ffff, 3, \_SB.PCI0.LPCB.LNKC, 0 } })
72         Switch (ToInteger (Arg0)) {
73                 /* PCIe Root Port 1 and 5 */
74                 Case (Package() { 1, 5 }) {
75                         If (PICM) {
76                                 Return (IQAA)
77                         } Else {
78                                 Return (IQAP)
79                         }
80                 }
82                 /* PCIe Root Port 2 and 6 */
83                 Case (Package() { 2, 6 }) {
84                         If (PICM) {
85                                 Return (IQBA)
86                         } Else {
87                                 Return (IQBP)
88                         }
89                 }
91                 /* PCIe Root Port 3 and 7 */
92                 Case (Package() { 3, 7 }) {
93                         If (PICM) {
94                                 Return (IQCA)
95                         } Else {
96                                 Return (IQCP)
97                         }
98                 }
100                 /* PCIe Root Port 4 and 8 */
101                 Case (Package() { 4, 8 }) {
102                         If (PICM) {
103                                 Return (IQDA)
104                         } Else {
105                                 Return (IQDP)
106                         }
107                 }
109                 Default {
110                         If (PICM) {
111                                 Return (IQDA)
112                         } Else {
113                                 Return (IQDP)
114                         }
115                 }
116         }
119 Device (RP01)
121         Name (_ADR, 0x001c0000)
123         #include "pcie_port.asl"
125         Method (_PRT)
126         {
127                 Return (IRQM (RPPN))
128         }
131 Device (RP02)
133         Name (_ADR, 0x001c0001)
135         #include "pcie_port.asl"
137         Method (_PRT)
138         {
139                 Return (IRQM (RPPN))
140         }
143 Device (RP03)
145         Name (_ADR, 0x001c0002)
147         #include "pcie_port.asl"
149         Method (_PRT)
150         {
151                 Return (IRQM (RPPN))
152         }
155 Device (RP04)
157         Name (_ADR, 0x001c0003)
159         #include "pcie_port.asl"
161         Method (_PRT)
162         {
163                 Return (IRQM (RPPN))
164         }
167 Device (RP05)
169         Name (_ADR, 0x001c0004)
171         #include "pcie_port.asl"
173         Method (_PRT)
174         {
175                 Return (IRQM (RPPN))
176         }
179 Device (RP06)
181         Name (_ADR, 0x001c0005)
183         #include "pcie_port.asl"
185         Method (_PRT)
186         {
187                 Return (IRQM (RPPN))
188         }
191 Device (RP07)
193         Name (_ADR, 0x001c0006)
195         #include "pcie_port.asl"
197         Method (_PRT)
198         {
199                 Return (IRQM (RPPN))
200         }
203 Device (RP08)
205         Name (_ADR, 0x001c0007)
207         #include "pcie_port.asl"
209         Method (_PRT)
210         {
211                 Return (IRQM (RPPN))
212         }