Angel Pons | 182dbde | 2020-04-02 23:49:05 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 2 | |
| 3 | Scope(\) { |
| 4 | /* PCI IRQ mapping registers, C00h-C01h. */ |
| 5 | OperationRegion(PRQM, SystemIO, 0x00000C00, 0x00000002) |
| 6 | Field(PRQM, ByteAcc, NoLock, Preserve) { |
| 7 | PRQI, 0x00000008, |
| 8 | PRQD, 0x00000008, /* Offset: 1h */ |
| 9 | } |
| 10 | IndexField(PRQI, PRQD, ByteAcc, NoLock, Preserve) { |
| 11 | PIRA, 0x00000008, /* Index 0 */ |
| 12 | PIRB, 0x00000008, /* Index 1 */ |
| 13 | PIRC, 0x00000008, /* Index 2 */ |
| 14 | PIRD, 0x00000008, /* Index 3 */ |
| 15 | PIRE, 0x00000008, /* Index 4 */ |
| 16 | PIRF, 0x00000008, /* Index 5 */ |
| 17 | PIRG, 0x00000008, /* Index 6 */ |
| 18 | PIRH, 0x00000008, /* Index 7 */ |
| 19 | } |
| 20 | |
| 21 | /* PCI Error control register */ |
| 22 | OperationRegion(PERC, SystemIO, 0x00000C14, 0x00000001) |
| 23 | Field(PERC, ByteAcc, NoLock, Preserve) { |
| 24 | SENS, 0x00000001, |
| 25 | PENS, 0x00000001, |
| 26 | SENE, 0x00000001, |
| 27 | PENE, 0x00000001, |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | Scope(\_SB) { |
| 32 | /* PCIe Configuration Space for 16 busses */ |
| 33 | OperationRegion(PCFG, SystemMemory, PCBA, 0x01000000) /* Each bus consumes 1MB */ |
| 34 | Field(PCFG, ByteAcc, NoLock, Preserve) { |
| 35 | /* Byte offsets are computed using the following technique: |
| 36 | * ((bus number + 1) * ((device number * 8) * 4096)) + register offset |
| 37 | * The 8 comes from 8 functions per device, and 4096 bytes per function config space |
| 38 | */ |
| 39 | Offset(0x00088024), /* SATA reg 24h Bus 0, Device 17, Function 0 */ |
| 40 | STB5, 32, |
| 41 | Offset(0x00098042), /* OHCI0 reg 42h - Bus 0, Device 19, Function 0 */ |
| 42 | PT0D, 1, |
| 43 | PT1D, 1, |
| 44 | PT2D, 1, |
| 45 | PT3D, 1, |
| 46 | PT4D, 1, |
| 47 | PT5D, 1, |
| 48 | PT6D, 1, |
| 49 | PT7D, 1, |
| 50 | PT8D, 1, |
| 51 | PT9D, 1, |
| 52 | Offset(0x000A0004), /* SMBUS reg 4h - Bus 0, Device 20, Function 0 */ |
| 53 | SBIE, 1, |
| 54 | SBME, 1, |
| 55 | Offset(0x000A0008), /* SMBUS reg 8h - Bus 0, Device 20, Function 0 */ |
| 56 | SBRI, 8, |
| 57 | Offset(0x000A0014), /* SMBUS reg 14h - Bus 0, Device 20, Function 0 */ |
| 58 | SBB1, 32, |
| 59 | Offset(0x000A0078), /* SMBUS reg 78h - Bus 0, Device 20, Function 0 */ |
| 60 | ,14, |
| 61 | P92E, 1, /* Port92 decode enable */ |
| 62 | } |
| 63 | |
| 64 | OperationRegion(SB5, SystemMemory, STB5, 0x1000) |
| 65 | Field(SB5, AnyAcc, NoLock, Preserve){ |
| 66 | /* Port 0 */ |
| 67 | Offset(0x120), /* Port 0 Task file status */ |
| 68 | P0ER, 1, |
| 69 | , 2, |
| 70 | P0DQ, 1, |
| 71 | , 3, |
| 72 | P0BY, 1, |
| 73 | Offset(0x128), /* Port 0 Serial ATA status */ |
| 74 | P0DD, 4, |
| 75 | , 4, |
| 76 | P0IS, 4, |
| 77 | Offset(0x12C), /* Port 0 Serial ATA control */ |
| 78 | P0DI, 4, |
| 79 | Offset(0x130), /* Port 0 Serial ATA error */ |
| 80 | , 16, |
| 81 | P0PR, 1, |
| 82 | |
| 83 | /* Port 1 */ |
| 84 | offset(0x1A0), /* Port 1 Task file status */ |
| 85 | P1ER, 1, |
| 86 | , 2, |
| 87 | P1DQ, 1, |
| 88 | , 3, |
| 89 | P1BY, 1, |
| 90 | Offset(0x1A8), /* Port 1 Serial ATA status */ |
| 91 | P1DD, 4, |
| 92 | , 4, |
| 93 | P1IS, 4, |
| 94 | Offset(0x1AC), /* Port 1 Serial ATA control */ |
| 95 | P1DI, 4, |
| 96 | Offset(0x1B0), /* Port 1 Serial ATA error */ |
| 97 | , 16, |
| 98 | P1PR, 1, |
| 99 | |
| 100 | /* Port 2 */ |
| 101 | Offset(0x220), /* Port 2 Task file status */ |
| 102 | P2ER, 1, |
| 103 | , 2, |
| 104 | P2DQ, 1, |
| 105 | , 3, |
| 106 | P2BY, 1, |
| 107 | Offset(0x228), /* Port 2 Serial ATA status */ |
| 108 | P2DD, 4, |
| 109 | , 4, |
| 110 | P2IS, 4, |
| 111 | Offset(0x22C), /* Port 2 Serial ATA control */ |
| 112 | P2DI, 4, |
| 113 | Offset(0x230), /* Port 2 Serial ATA error */ |
| 114 | , 16, |
| 115 | P2PR, 1, |
| 116 | |
| 117 | /* Port 3 */ |
| 118 | Offset(0x2A0), /* Port 3 Task file status */ |
| 119 | P3ER, 1, |
| 120 | , 2, |
| 121 | P3DQ, 1, |
| 122 | , 3, |
| 123 | P3BY, 1, |
| 124 | Offset(0x2A8), /* Port 3 Serial ATA status */ |
| 125 | P3DD, 4, |
| 126 | , 4, |
| 127 | P3IS, 4, |
| 128 | Offset(0x2AC), /* Port 3 Serial ATA control */ |
| 129 | P3DI, 4, |
| 130 | Offset(0x2B0), /* Port 3 Serial ATA error */ |
| 131 | , 16, |
| 132 | P3PR, 1, |
| 133 | } |
| 134 | |
| 135 | Method(_PIC, 0x01, NotSerialized) |
| 136 | { |
| 137 | If (Arg0) |
| 138 | { |
| 139 | \_SB.CIRQ() |
| 140 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 141 | PICM = Arg0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | Method(CIRQ, 0x00, NotSerialized){ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 145 | PIRA = 0 |
| 146 | PIRB = 0 |
| 147 | PIRC = 0 |
| 148 | PIRD = 0 |
| 149 | PIRE = 0 |
| 150 | PIRF = 0 |
| 151 | PIRG = 0 |
| 152 | PIRH = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 153 | } |
| 154 | |
| 155 | Name(IRQB, ResourceTemplate(){ |
| 156 | IRQ(Level,ActiveLow,Shared){15} |
| 157 | }) |
| 158 | |
| 159 | Name(IRQP, ResourceTemplate(){ |
| 160 | IRQ(Level,ActiveLow,Exclusive){3, 4, 5, 7, 10, 11, 12, 15} |
| 161 | }) |
| 162 | |
| 163 | Name(PITF, ResourceTemplate(){ |
| 164 | IRQ(Level,ActiveLow,Exclusive){9} |
| 165 | }) |
| 166 | |
| 167 | Device(INTA) { |
| 168 | Name(_HID, EISAID("PNP0C0F")) |
| 169 | Name(_UID, 1) |
| 170 | |
| 171 | Method(_STA, 0) { |
| 172 | if (PIRA) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 173 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 174 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 175 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 176 | } |
| 177 | } /* End Method(_SB.INTA._STA) */ |
| 178 | |
| 179 | Method(_DIS ,0) { |
| 180 | /* DBGO("\\_SB\\LNKA\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 181 | PIRA = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 182 | } /* End Method(_SB.INTA._DIS) */ |
| 183 | |
| 184 | Method(_PRS ,0) { |
| 185 | /* DBGO("\\_SB\\LNKA\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 186 | Return (IRQP) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 187 | } /* Method(_SB.INTA._PRS) */ |
| 188 | |
| 189 | Method(_CRS ,0) { |
| 190 | /* DBGO("\\_SB\\LNKA\\_CRS\n") */ |
| 191 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 192 | IRQN = 1 << PIRA |
| 193 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 194 | } /* Method(_SB.INTA._CRS) */ |
| 195 | |
| 196 | Method(_SRS, 1) { |
| 197 | /* DBGO("\\_SB\\LNKA\\_SRS\n") */ |
| 198 | CreateWordField(ARG0, 1, IRQM) |
| 199 | |
| 200 | /* Use lowest available IRQ */ |
| 201 | FindSetRightBit(IRQM, Local0) |
| 202 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 203 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 204 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 205 | PIRA = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 206 | } /* End Method(_SB.INTA._SRS) */ |
| 207 | } /* End Device(INTA) */ |
| 208 | |
| 209 | Device(INTB) { |
| 210 | Name(_HID, EISAID("PNP0C0F")) |
| 211 | Name(_UID, 2) |
| 212 | |
| 213 | Method(_STA, 0) { |
| 214 | if (PIRB) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 215 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 216 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 217 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 218 | } |
| 219 | } /* End Method(_SB.INTB._STA) */ |
| 220 | |
| 221 | Method(_DIS ,0) { |
| 222 | /* DBGO("\\_SB\\LNKB\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 223 | PIRB = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 224 | } /* End Method(_SB.INTB._DIS) */ |
| 225 | |
| 226 | Method(_PRS ,0) { |
| 227 | /* DBGO("\\_SB\\LNKB\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 228 | Return (IRQP) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 229 | } /* Method(_SB.INTB._PRS) */ |
| 230 | |
| 231 | Method(_CRS ,0) { |
| 232 | /* DBGO("\\_SB\\LNKB\\_CRS\n") */ |
| 233 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 234 | IRQN = 1 << PIRB |
| 235 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 236 | } /* Method(_SB.INTB._CRS) */ |
| 237 | |
| 238 | Method(_SRS, 1) { |
| 239 | /* DBGO("\\_SB\\LNKB\\_CRS\n") */ |
| 240 | CreateWordField(ARG0, 1, IRQM) |
| 241 | |
| 242 | /* Use lowest available IRQ */ |
| 243 | FindSetRightBit(IRQM, Local0) |
| 244 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 245 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 246 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 247 | PIRB = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 248 | } /* End Method(_SB.INTB._SRS) */ |
| 249 | } /* End Device(INTB) */ |
| 250 | |
| 251 | Device(INTC) { |
| 252 | Name(_HID, EISAID("PNP0C0F")) |
| 253 | Name(_UID, 3) |
| 254 | |
| 255 | Method(_STA, 0) { |
| 256 | if (PIRC) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 257 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 258 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 259 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 260 | } |
| 261 | } /* End Method(_SB.INTC._STA) */ |
| 262 | |
| 263 | Method(_DIS ,0) { |
| 264 | /* DBGO("\\_SB\\LNKC\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 265 | PIRC = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 266 | } /* End Method(_SB.INTC._DIS) */ |
| 267 | |
| 268 | Method(_PRS ,0) { |
| 269 | /* DBGO("\\_SB\\LNKC\\_PRS\n") */ |
| 270 | Return(IRQP) |
| 271 | } /* Method(_SB.INTC._PRS) */ |
| 272 | |
| 273 | Method(_CRS ,0) { |
| 274 | /* DBGO("\\_SB\\LNKC\\_CRS\n") */ |
| 275 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 276 | IRQN = 1 << PIRC |
| 277 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 278 | } /* Method(_SB.INTC._CRS) */ |
| 279 | |
| 280 | Method(_SRS, 1) { |
| 281 | /* DBGO("\\_SB\\LNKC\\_CRS\n") */ |
| 282 | CreateWordField(ARG0, 1, IRQM) |
| 283 | |
| 284 | /* Use lowest available IRQ */ |
| 285 | FindSetRightBit(IRQM, Local0) |
| 286 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 287 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 288 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 289 | PIRC = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 290 | } /* End Method(_SB.INTC._SRS) */ |
| 291 | } /* End Device(INTC) */ |
| 292 | |
| 293 | Device(INTD) { |
| 294 | Name(_HID, EISAID("PNP0C0F")) |
| 295 | Name(_UID, 4) |
| 296 | |
| 297 | Method(_STA, 0) { |
| 298 | if (PIRD) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 299 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 300 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 301 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 302 | } |
| 303 | } /* End Method(_SB.INTD._STA) */ |
| 304 | |
| 305 | Method(_DIS ,0) { |
| 306 | /* DBGO("\\_SB\\LNKD\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 307 | PIRD = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 308 | } /* End Method(_SB.INTD._DIS) */ |
| 309 | |
| 310 | Method(_PRS ,0) { |
| 311 | /* DBGO("\\_SB\\LNKD\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 312 | Return (IRQP) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 313 | } /* Method(_SB.INTD._PRS) */ |
| 314 | |
| 315 | Method(_CRS ,0) { |
| 316 | /* DBGO("\\_SB\\LNKD\\_CRS\n") */ |
| 317 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 318 | IRQN = 1 << PIRD |
| 319 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 320 | } /* Method(_SB.INTD._CRS) */ |
| 321 | |
| 322 | Method(_SRS, 1) { |
| 323 | /* DBGO("\\_SB\\LNKD\\_CRS\n") */ |
| 324 | CreateWordField(ARG0, 1, IRQM) |
| 325 | |
| 326 | /* Use lowest available IRQ */ |
| 327 | FindSetRightBit(IRQM, Local0) |
| 328 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 329 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 330 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 331 | PIRD = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 332 | } /* End Method(_SB.INTD._SRS) */ |
| 333 | } /* End Device(INTD) */ |
| 334 | |
| 335 | Device(INTE) { |
| 336 | Name(_HID, EISAID("PNP0C0F")) |
| 337 | Name(_UID, 5) |
| 338 | |
| 339 | Method(_STA, 0) { |
| 340 | if (PIRE) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 341 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 342 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 343 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 344 | } |
| 345 | } /* End Method(_SB.INTE._STA) */ |
| 346 | |
| 347 | Method(_DIS ,0) { |
| 348 | /* DBGO("\\_SB\\LNKE\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 349 | PIRE = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 350 | } /* End Method(_SB.INTE._DIS) */ |
| 351 | |
| 352 | Method(_PRS ,0) { |
| 353 | /* DBGO("\\_SB\\LNKE\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 354 | Return (IRQP) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 355 | } /* Method(_SB.INTE._PRS) */ |
| 356 | |
| 357 | Method(_CRS ,0) { |
| 358 | /* DBGO("\\_SB\\LNKE\\_CRS\n") */ |
| 359 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 360 | IRQN = 1 << PIRE |
| 361 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 362 | } /* Method(_SB.INTE._CRS) */ |
| 363 | |
| 364 | Method(_SRS, 1) { |
| 365 | /* DBGO("\\_SB\\LNKE\\_CRS\n") */ |
| 366 | CreateWordField(ARG0, 1, IRQM) |
| 367 | |
| 368 | /* Use lowest available IRQ */ |
| 369 | FindSetRightBit(IRQM, Local0) |
| 370 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 371 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 372 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 373 | PIRE = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 374 | } /* End Method(_SB.INTE._SRS) */ |
| 375 | } /* End Device(INTE) */ |
| 376 | |
| 377 | Device(INTF) { |
| 378 | Name(_HID, EISAID("PNP0C0F")) |
| 379 | Name(_UID, 6) |
| 380 | |
| 381 | Method(_STA, 0) { |
| 382 | if (PIRF) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 383 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 384 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 385 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 386 | } |
| 387 | } /* End Method(_SB.INTF._STA) */ |
| 388 | |
| 389 | Method(_DIS ,0) { |
| 390 | /* DBGO("\\_SB\\LNKF\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 391 | PIRF = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 392 | } /* End Method(_SB.INTF._DIS) */ |
| 393 | |
| 394 | Method(_PRS ,0) { |
| 395 | /* DBGO("\\_SB\\LNKF\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 396 | Return (PITF) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 397 | } /* Method(_SB.INTF._PRS) */ |
| 398 | |
| 399 | Method(_CRS ,0) { |
| 400 | /* DBGO("\\_SB\\LNKF\\_CRS\n") */ |
| 401 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 402 | IRQN = 1 << PIRF |
| 403 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 404 | } /* Method(_SB.INTF._CRS) */ |
| 405 | |
| 406 | Method(_SRS, 1) { |
| 407 | /* DBGO("\\_SB\\LNKF\\_CRS\n") */ |
| 408 | CreateWordField(ARG0, 1, IRQM) |
| 409 | |
| 410 | /* Use lowest available IRQ */ |
| 411 | FindSetRightBit(IRQM, Local0) |
| 412 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 413 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 414 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 415 | PIRF = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 416 | } /* End Method(_SB.INTF._SRS) */ |
| 417 | } /* End Device(INTF) */ |
| 418 | |
| 419 | Device(INTG) { |
| 420 | Name(_HID, EISAID("PNP0C0F")) |
| 421 | Name(_UID, 7) |
| 422 | |
| 423 | Method(_STA, 0) { |
| 424 | if (PIRG) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 425 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 426 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 427 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 428 | } |
| 429 | } /* End Method(_SB.INTG._STA) */ |
| 430 | |
| 431 | Method(_DIS ,0) { |
| 432 | /* DBGO("\\_SB\\LNKG\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 433 | PIRG = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 434 | } /* End Method(_SB.INTG._DIS) */ |
| 435 | |
| 436 | Method(_PRS ,0) { |
| 437 | /* DBGO("\\_SB\\LNKG\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 438 | Return (IRQP) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 439 | } /* Method(_SB.INTG._CRS) */ |
| 440 | |
| 441 | Method(_CRS ,0) { |
| 442 | /* DBGO("\\_SB\\LNKG\\_CRS\n") */ |
| 443 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 444 | IRQN = 1 << PIRG |
| 445 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 446 | } /* Method(_SB.INTG._CRS) */ |
| 447 | |
| 448 | Method(_SRS, 1) { |
| 449 | /* DBGO("\\_SB\\LNKG\\_CRS\n") */ |
| 450 | CreateWordField(ARG0, 1, IRQM) |
| 451 | |
| 452 | /* Use lowest available IRQ */ |
| 453 | FindSetRightBit(IRQM, Local0) |
| 454 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 455 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 456 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 457 | PIRG = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 458 | } /* End Method(_SB.INTG._SRS) */ |
| 459 | } /* End Device(INTG) */ |
| 460 | |
| 461 | Device(INTH) { |
| 462 | Name(_HID, EISAID("PNP0C0F")) |
| 463 | Name(_UID, 8) |
| 464 | |
| 465 | Method(_STA, 0) { |
| 466 | if (PIRH) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 467 | Return (0x0b) /* sata is invisible */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 468 | } else { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 469 | Return (0x09) /* sata is disabled */ |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 470 | } |
| 471 | } /* End Method(_SB.INTH._STA) */ |
| 472 | |
| 473 | Method(_DIS ,0) { |
| 474 | /* DBGO("\\_SB\\LNKH\\_DIS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 475 | PIRH = 0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 476 | } /* End Method(_SB.INTH._DIS) */ |
| 477 | |
| 478 | Method(_PRS ,0) { |
| 479 | /* DBGO("\\_SB\\LNKH\\_PRS\n") */ |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 480 | Return (IRQP) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 481 | } /* Method(_SB.INTH._CRS) */ |
| 482 | |
| 483 | Method(_CRS ,0) { |
| 484 | /* DBGO("\\_SB\\LNKH\\_CRS\n") */ |
| 485 | CreateWordField(IRQB, 0x1, IRQN) |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 486 | IRQN = 1 << PIRH |
| 487 | Return (IRQB) |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 488 | } /* Method(_SB.INTH._CRS) */ |
| 489 | |
| 490 | Method(_SRS, 1) { |
| 491 | /* DBGO("\\_SB\\LNKH\\_CRS\n") */ |
| 492 | CreateWordField(ARG0, 1, IRQM) |
| 493 | |
| 494 | /* Use lowest available IRQ */ |
| 495 | FindSetRightBit(IRQM, Local0) |
| 496 | if (Local0) { |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 497 | Local0-- |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 498 | } |
Elyes HAOUAS | 6564842 | 2021-01-27 12:18:42 +0100 | [diff] [blame^] | 499 | PIRH = Local0 |
Mike Loptien | 573a1d6 | 2013-03-18 11:19:26 -0600 | [diff] [blame] | 500 | } /* End Method(_SB.INTH._SRS) */ |
| 501 | } /* End Device(INTH) */ |
| 502 | |
| 503 | } /* End Scope(_SB) */ |