Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame^] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* This file is part of the coreboot project. */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 3 | |
| 4 | Device (LNKA) |
| 5 | { |
| 6 | Name (_HID, EISAID("PNP0C0F")) |
| 7 | Name (_UID, 1) |
| 8 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 9 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 10 | Method (_DIS, 0, Serialized) |
| 11 | { |
| 12 | Store (0x80, PRTA) |
| 13 | } |
| 14 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 15 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 16 | Name (_PRS, ResourceTemplate() |
| 17 | { |
| 18 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 19 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 20 | }) |
| 21 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 22 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 23 | Method (_CRS, 0, Serialized) |
| 24 | { |
| 25 | Name (RTLA, ResourceTemplate() |
| 26 | { |
| 27 | IRQ(Level, ActiveLow, Shared) {} |
| 28 | }) |
| 29 | CreateWordField(RTLA, 1, IRQ0) |
| 30 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 31 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 32 | Store (Zero, IRQ0) |
| 33 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 34 | /* Set the bit from PRTA */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 35 | ShiftLeft(1, And(PRTA, 0x0f), IRQ0) |
| 36 | |
| 37 | Return (RTLA) |
| 38 | } |
| 39 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 40 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 41 | Method (_SRS, 1, Serialized) |
| 42 | { |
| 43 | CreateWordField(Arg0, 1, IRQ0) |
| 44 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 45 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 46 | FindSetRightBit(IRQ0, Local0) |
| 47 | |
| 48 | Decrement(Local0) |
| 49 | Store(Local0, PRTA) |
| 50 | } |
| 51 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 52 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 53 | Method (_STA, 0, Serialized) |
| 54 | { |
| 55 | If(And(PRTA, 0x80)) { |
| 56 | Return (0x9) |
| 57 | } Else { |
| 58 | Return (0xb) |
| 59 | } |
| 60 | } |
| 61 | } |
| 62 | |
| 63 | Device (LNKB) |
| 64 | { |
| 65 | Name (_HID, EISAID("PNP0C0F")) |
| 66 | Name (_UID, 2) |
| 67 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 68 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 69 | Method (_DIS, 0, Serialized) |
| 70 | { |
| 71 | Store (0x80, PRTB) |
| 72 | } |
| 73 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 74 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 75 | Name (_PRS, ResourceTemplate() |
| 76 | { |
| 77 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 78 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 79 | }) |
| 80 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 81 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 82 | Method (_CRS, 0, Serialized) |
| 83 | { |
| 84 | Name (RTLB, ResourceTemplate() |
| 85 | { |
| 86 | IRQ(Level, ActiveLow, Shared) {} |
| 87 | }) |
| 88 | CreateWordField(RTLB, 1, IRQ0) |
| 89 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 90 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 91 | Store (Zero, IRQ0) |
| 92 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 93 | /* Set the bit from PRTB */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 94 | ShiftLeft(1, And(PRTB, 0x0f), IRQ0) |
| 95 | |
| 96 | Return (RTLB) |
| 97 | } |
| 98 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 99 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 100 | Method (_SRS, 1, Serialized) |
| 101 | { |
| 102 | CreateWordField(Arg0, 1, IRQ0) |
| 103 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 104 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 105 | FindSetRightBit(IRQ0, Local0) |
| 106 | |
| 107 | Decrement(Local0) |
| 108 | Store(Local0, PRTB) |
| 109 | } |
| 110 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 111 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 112 | Method (_STA, 0, Serialized) |
| 113 | { |
| 114 | If(And(PRTB, 0x80)) { |
| 115 | Return (0x9) |
| 116 | } Else { |
| 117 | Return (0xb) |
| 118 | } |
| 119 | } |
| 120 | } |
| 121 | |
| 122 | Device (LNKC) |
| 123 | { |
| 124 | Name (_HID, EISAID("PNP0C0F")) |
| 125 | Name (_UID, 3) |
| 126 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 127 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 128 | Method (_DIS, 0, Serialized) |
| 129 | { |
| 130 | Store (0x80, PRTC) |
| 131 | } |
| 132 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 133 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 134 | Name (_PRS, ResourceTemplate() |
| 135 | { |
| 136 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 137 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 138 | }) |
| 139 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 140 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 141 | Method (_CRS, 0, Serialized) |
| 142 | { |
| 143 | Name (RTLC, ResourceTemplate() |
| 144 | { |
| 145 | IRQ(Level, ActiveLow, Shared) {} |
| 146 | }) |
| 147 | CreateWordField(RTLC, 1, IRQ0) |
| 148 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 149 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 150 | Store (Zero, IRQ0) |
| 151 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 152 | /* Set the bit from PRTC */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 153 | ShiftLeft(1, And(PRTC, 0x0f), IRQ0) |
| 154 | |
| 155 | Return (RTLC) |
| 156 | } |
| 157 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 158 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 159 | Method (_SRS, 1, Serialized) |
| 160 | { |
| 161 | CreateWordField(Arg0, 1, IRQ0) |
| 162 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 163 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 164 | FindSetRightBit(IRQ0, Local0) |
| 165 | |
| 166 | Decrement(Local0) |
| 167 | Store(Local0, PRTC) |
| 168 | } |
| 169 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 170 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 171 | Method (_STA, 0, Serialized) |
| 172 | { |
| 173 | If(And(PRTC, 0x80)) { |
| 174 | Return (0x9) |
| 175 | } Else { |
| 176 | Return (0xb) |
| 177 | } |
| 178 | } |
| 179 | } |
| 180 | |
| 181 | Device (LNKD) |
| 182 | { |
| 183 | Name (_HID, EISAID("PNP0C0F")) |
| 184 | Name (_UID, 4) |
| 185 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 186 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 187 | Method (_DIS, 0, Serialized) |
| 188 | { |
| 189 | Store (0x80, PRTD) |
| 190 | } |
| 191 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 192 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 193 | Name (_PRS, ResourceTemplate() |
| 194 | { |
| 195 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 196 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 197 | }) |
| 198 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 199 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 200 | Method (_CRS, 0, Serialized) |
| 201 | { |
| 202 | Name (RTLD, ResourceTemplate() |
| 203 | { |
| 204 | IRQ(Level, ActiveLow, Shared) {} |
| 205 | }) |
| 206 | CreateWordField(RTLD, 1, IRQ0) |
| 207 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 208 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 209 | Store (Zero, IRQ0) |
| 210 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 211 | /* Set the bit from PRTD */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 212 | ShiftLeft(1, And(PRTD, 0x0f), IRQ0) |
| 213 | |
| 214 | Return (RTLD) |
| 215 | } |
| 216 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 217 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 218 | Method (_SRS, 1, Serialized) |
| 219 | { |
| 220 | CreateWordField(Arg0, 1, IRQ0) |
| 221 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 222 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 223 | FindSetRightBit(IRQ0, Local0) |
| 224 | |
| 225 | Decrement(Local0) |
| 226 | Store(Local0, PRTD) |
| 227 | } |
| 228 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 229 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 230 | Method (_STA, 0, Serialized) |
| 231 | { |
| 232 | If(And(PRTD, 0x80)) { |
| 233 | Return (0x9) |
| 234 | } Else { |
| 235 | Return (0xb) |
| 236 | } |
| 237 | } |
| 238 | } |
| 239 | |
| 240 | Device (LNKE) |
| 241 | { |
| 242 | Name (_HID, EISAID("PNP0C0F")) |
| 243 | Name (_UID, 5) |
| 244 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 245 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 246 | Method (_DIS, 0, Serialized) |
| 247 | { |
| 248 | Store (0x80, PRTE) |
| 249 | } |
| 250 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 251 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 252 | Name (_PRS, ResourceTemplate() |
| 253 | { |
| 254 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 255 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 256 | }) |
| 257 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 258 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 259 | Method (_CRS, 0, Serialized) |
| 260 | { |
| 261 | Name (RTLE, ResourceTemplate() |
| 262 | { |
| 263 | IRQ(Level, ActiveLow, Shared) {} |
| 264 | }) |
| 265 | CreateWordField(RTLE, 1, IRQ0) |
| 266 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 267 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 268 | Store (Zero, IRQ0) |
| 269 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 270 | /* Set the bit from PRTE */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 271 | ShiftLeft(1, And(PRTE, 0x0f), IRQ0) |
| 272 | |
| 273 | Return (RTLE) |
| 274 | } |
| 275 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 276 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 277 | Method (_SRS, 1, Serialized) |
| 278 | { |
| 279 | CreateWordField(Arg0, 1, IRQ0) |
| 280 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 281 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 282 | FindSetRightBit(IRQ0, Local0) |
| 283 | |
| 284 | Decrement(Local0) |
| 285 | Store(Local0, PRTE) |
| 286 | } |
| 287 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 288 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 289 | Method (_STA, 0, Serialized) |
| 290 | { |
| 291 | If(And(PRTE, 0x80)) { |
| 292 | Return (0x9) |
| 293 | } Else { |
| 294 | Return (0xb) |
| 295 | } |
| 296 | } |
| 297 | } |
| 298 | |
| 299 | Device (LNKF) |
| 300 | { |
| 301 | Name (_HID, EISAID("PNP0C0F")) |
| 302 | Name (_UID, 6) |
| 303 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 304 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 305 | Method (_DIS, 0, Serialized) |
| 306 | { |
| 307 | Store (0x80, PRTF) |
| 308 | } |
| 309 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 310 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 311 | Name (_PRS, ResourceTemplate() |
| 312 | { |
| 313 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 314 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 315 | }) |
| 316 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 317 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 318 | Method (_CRS, 0, Serialized) |
| 319 | { |
| 320 | Name (RTLF, ResourceTemplate() |
| 321 | { |
| 322 | IRQ(Level, ActiveLow, Shared) {} |
| 323 | }) |
| 324 | CreateWordField(RTLF, 1, IRQ0) |
| 325 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 326 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 327 | Store (Zero, IRQ0) |
| 328 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 329 | /* Set the bit from PRTF */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 330 | ShiftLeft(1, And(PRTF, 0x0f), IRQ0) |
| 331 | |
| 332 | Return (RTLF) |
| 333 | } |
| 334 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 335 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 336 | Method (_SRS, 1, Serialized) |
| 337 | { |
| 338 | CreateWordField(Arg0, 1, IRQ0) |
| 339 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 340 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 341 | FindSetRightBit(IRQ0, Local0) |
| 342 | |
| 343 | Decrement(Local0) |
| 344 | Store(Local0, PRTF) |
| 345 | } |
| 346 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 347 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 348 | Method (_STA, 0, Serialized) |
| 349 | { |
| 350 | If(And(PRTF, 0x80)) { |
| 351 | Return (0x9) |
| 352 | } Else { |
| 353 | Return (0xb) |
| 354 | } |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | Device (LNKG) |
| 359 | { |
| 360 | Name (_HID, EISAID("PNP0C0F")) |
| 361 | Name (_UID, 7) |
| 362 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 363 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 364 | Method (_DIS, 0, Serialized) |
| 365 | { |
| 366 | Store (0x80, PRTG) |
| 367 | } |
| 368 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 369 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 370 | Name (_PRS, ResourceTemplate() |
| 371 | { |
| 372 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 373 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 374 | }) |
| 375 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 376 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 377 | Method (_CRS, 0, Serialized) |
| 378 | { |
| 379 | Name (RTLG, ResourceTemplate() |
| 380 | { |
| 381 | IRQ(Level, ActiveLow, Shared) {} |
| 382 | }) |
| 383 | CreateWordField(RTLG, 1, IRQ0) |
| 384 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 385 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 386 | Store (Zero, IRQ0) |
| 387 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 388 | /* Set the bit from PRTG */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 389 | ShiftLeft(1, And(PRTG, 0x0f), IRQ0) |
| 390 | |
| 391 | Return (RTLG) |
| 392 | } |
| 393 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 394 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 395 | Method (_SRS, 1, Serialized) |
| 396 | { |
| 397 | CreateWordField(Arg0, 1, IRQ0) |
| 398 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 399 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 400 | FindSetRightBit(IRQ0, Local0) |
| 401 | |
| 402 | Decrement(Local0) |
| 403 | Store(Local0, PRTG) |
| 404 | } |
| 405 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 406 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 407 | Method (_STA, 0, Serialized) |
| 408 | { |
| 409 | If(And(PRTG, 0x80)) { |
| 410 | Return (0x9) |
| 411 | } Else { |
| 412 | Return (0xb) |
| 413 | } |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | Device (LNKH) |
| 418 | { |
| 419 | Name (_HID, EISAID("PNP0C0F")) |
| 420 | Name (_UID, 8) |
| 421 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 422 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 423 | Method (_DIS, 0, Serialized) |
| 424 | { |
| 425 | Store (0x80, PRTH) |
| 426 | } |
| 427 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 428 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 429 | Name (_PRS, ResourceTemplate() |
| 430 | { |
| 431 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 432 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 433 | }) |
| 434 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 435 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 436 | Method (_CRS, 0, Serialized) |
| 437 | { |
| 438 | Name (RTLH, ResourceTemplate() |
| 439 | { |
| 440 | IRQ(Level, ActiveLow, Shared) {} |
| 441 | }) |
| 442 | CreateWordField(RTLH, 1, IRQ0) |
| 443 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 444 | /* Clear the WordField */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 445 | Store (Zero, IRQ0) |
| 446 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 447 | /* Set the bit from PRTH */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 448 | ShiftLeft(1, And(PRTH, 0x0f), IRQ0) |
| 449 | |
| 450 | Return (RTLH) |
| 451 | } |
| 452 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 453 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 454 | Method (_SRS, 1, Serialized) |
| 455 | { |
| 456 | CreateWordField(Arg0, 1, IRQ0) |
| 457 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 458 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 459 | FindSetRightBit(IRQ0, Local0) |
| 460 | |
| 461 | Decrement(Local0) |
| 462 | Store(Local0, PRTH) |
| 463 | } |
| 464 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 465 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 466 | Method (_STA, 0, Serialized) |
| 467 | { |
| 468 | If(And(PRTH, 0x80)) { |
| 469 | Return (0x9) |
| 470 | } Else { |
| 471 | Return (0xb) |
| 472 | } |
| 473 | } |
| 474 | } |