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