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