Angel Pons | ba38f37 | 2020-04-05 15:46:45 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 2 | |
| 3 | Device (LNKA) |
| 4 | { |
| 5 | Name (_HID, EISAID("PNP0C0F")) |
| 6 | Name (_UID, 1) |
| 7 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 8 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 9 | Method (_DIS, 0, Serialized) |
| 10 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 11 | PRTA = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 12 | } |
| 13 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 14 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 15 | Name (_PRS, ResourceTemplate() |
| 16 | { |
| 17 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 18 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 19 | }) |
| 20 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 21 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 30 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 31 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 32 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 33 | /* Set the bit from PRTA */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 34 | IRQ0 = 1 << (PRTA & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 35 | |
| 36 | Return (RTLA) |
| 37 | } |
| 38 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 39 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 40 | Method (_SRS, 1, Serialized) |
| 41 | { |
| 42 | CreateWordField(Arg0, 1, IRQ0) |
| 43 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 44 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 45 | FindSetRightBit(IRQ0, Local0) |
| 46 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 47 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 48 | PRTA = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 49 | } |
| 50 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 51 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 52 | Method (_STA, 0, Serialized) |
| 53 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 54 | If (PRTA & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 67 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 68 | Method (_DIS, 0, Serialized) |
| 69 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 70 | PRTB = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 71 | } |
| 72 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 73 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 74 | Name (_PRS, ResourceTemplate() |
| 75 | { |
| 76 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 77 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 78 | }) |
| 79 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 80 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 89 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 90 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 91 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 92 | /* Set the bit from PRTB */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 93 | IRQ0 = 1 << (PRTB & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 94 | |
| 95 | Return (RTLB) |
| 96 | } |
| 97 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 98 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 99 | Method (_SRS, 1, Serialized) |
| 100 | { |
| 101 | CreateWordField(Arg0, 1, IRQ0) |
| 102 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 103 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 104 | FindSetRightBit(IRQ0, Local0) |
| 105 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 106 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 107 | PRTB = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 108 | } |
| 109 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 110 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 111 | Method (_STA, 0, Serialized) |
| 112 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 113 | If (PRTB & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 126 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 127 | Method (_DIS, 0, Serialized) |
| 128 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 129 | PRTC = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 130 | } |
| 131 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 132 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 133 | Name (_PRS, ResourceTemplate() |
| 134 | { |
| 135 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 136 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 137 | }) |
| 138 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 139 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 148 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 149 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 150 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 151 | /* Set the bit from PRTC */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 152 | IRQ0 = 1 << (PRTC & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 153 | |
| 154 | Return (RTLC) |
| 155 | } |
| 156 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 157 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 158 | Method (_SRS, 1, Serialized) |
| 159 | { |
| 160 | CreateWordField(Arg0, 1, IRQ0) |
| 161 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 162 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 163 | FindSetRightBit(IRQ0, Local0) |
| 164 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 165 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 166 | PRTC = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 167 | } |
| 168 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 169 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 170 | Method (_STA, 0, Serialized) |
| 171 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 172 | If (PRTC & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 185 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 186 | Method (_DIS, 0, Serialized) |
| 187 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 188 | PRTD = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 189 | } |
| 190 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 191 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 192 | Name (_PRS, ResourceTemplate() |
| 193 | { |
| 194 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 195 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 196 | }) |
| 197 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 198 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 207 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 208 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 209 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 210 | /* Set the bit from PRTD */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 211 | IRQ0 = 1 << (PRTD & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 212 | |
| 213 | Return (RTLD) |
| 214 | } |
| 215 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 216 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 217 | Method (_SRS, 1, Serialized) |
| 218 | { |
| 219 | CreateWordField(Arg0, 1, IRQ0) |
| 220 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 221 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 222 | FindSetRightBit(IRQ0, Local0) |
| 223 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 224 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 225 | PRTD = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 226 | } |
| 227 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 228 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 229 | Method (_STA, 0, Serialized) |
| 230 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 231 | If (PRTD & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 244 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 245 | Method (_DIS, 0, Serialized) |
| 246 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 247 | PRTE = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 248 | } |
| 249 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 250 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 251 | Name (_PRS, ResourceTemplate() |
| 252 | { |
| 253 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 254 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 255 | }) |
| 256 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 257 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 266 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 267 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 268 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 269 | /* Set the bit from PRTE */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 270 | IRQ0 = 1 << (PRTE & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 271 | |
| 272 | Return (RTLE) |
| 273 | } |
| 274 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 275 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 276 | Method (_SRS, 1, Serialized) |
| 277 | { |
| 278 | CreateWordField(Arg0, 1, IRQ0) |
| 279 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 280 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 281 | FindSetRightBit(IRQ0, Local0) |
| 282 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 283 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 284 | PRTE = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 285 | } |
| 286 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 287 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 288 | Method (_STA, 0, Serialized) |
| 289 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 290 | If (PRTE & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 303 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 304 | Method (_DIS, 0, Serialized) |
| 305 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 306 | PRTF = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 307 | } |
| 308 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 309 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 310 | Name (_PRS, ResourceTemplate() |
| 311 | { |
| 312 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 313 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 314 | }) |
| 315 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 316 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 325 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 326 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 327 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 328 | /* Set the bit from PRTF */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 329 | IRQ0 = 1 << (PRTF & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 330 | |
| 331 | Return (RTLF) |
| 332 | } |
| 333 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 334 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 335 | Method (_SRS, 1, Serialized) |
| 336 | { |
| 337 | CreateWordField(Arg0, 1, IRQ0) |
| 338 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 339 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 340 | FindSetRightBit(IRQ0, Local0) |
| 341 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 342 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 343 | PRTF = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 344 | } |
| 345 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 346 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 347 | Method (_STA, 0, Serialized) |
| 348 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 349 | If (PRTF & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 362 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 363 | Method (_DIS, 0, Serialized) |
| 364 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 365 | PRTG = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 366 | } |
| 367 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 368 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 369 | Name (_PRS, ResourceTemplate() |
| 370 | { |
| 371 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 372 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 373 | }) |
| 374 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 375 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 384 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 385 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 386 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 387 | /* Set the bit from PRTG */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 388 | IRQ0 = 1 << (PRTG & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 389 | |
| 390 | Return (RTLG) |
| 391 | } |
| 392 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 393 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 394 | Method (_SRS, 1, Serialized) |
| 395 | { |
| 396 | CreateWordField(Arg0, 1, IRQ0) |
| 397 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 398 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 399 | FindSetRightBit(IRQ0, Local0) |
| 400 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 401 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 402 | PRTG = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 403 | } |
| 404 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 405 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 406 | Method (_STA, 0, Serialized) |
| 407 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 408 | If (PRTG & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 421 | /* Disable method */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 422 | Method (_DIS, 0, Serialized) |
| 423 | { |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 424 | PRTH = 0x80 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 425 | } |
| 426 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 427 | /* Possible Resource Settings for this Link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 428 | Name (_PRS, ResourceTemplate() |
| 429 | { |
| 430 | IRQ(Level, ActiveLow, Shared) |
Frans Hendriks | 3e8504a | 2018-10-26 12:29:28 +0200 | [diff] [blame] | 431 | { 1, 3, 4, 5, 6, 7, 10, 11, 12, 14, 15 } |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 432 | }) |
| 433 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 434 | /* Current Resource Settings for this link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [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 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 443 | /* Clear the WordField */ |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 444 | IRQ0 = Zero |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 445 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 446 | /* Set the bit from PRTH */ |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 447 | IRQ0 = 1 << (PRTH & 0x0f) |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 448 | |
| 449 | Return (RTLH) |
| 450 | } |
| 451 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 452 | /* Set Resource Setting for this IRQ link */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 453 | Method (_SRS, 1, Serialized) |
| 454 | { |
| 455 | CreateWordField(Arg0, 1, IRQ0) |
| 456 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 457 | /* Which bit is set? */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 458 | FindSetRightBit(IRQ0, Local0) |
| 459 | |
Felix Singer | 43b5730 | 2022-12-11 21:46:42 +0100 | [diff] [blame] | 460 | Local0-- |
Felix Singer | 84e6123 | 2022-12-12 07:39:15 +0100 | [diff] [blame] | 461 | PRTH = Local0 |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 462 | } |
| 463 | |
Lee Leahy | 3247172 | 2015-04-20 15:20:28 -0700 | [diff] [blame] | 464 | /* Status */ |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 465 | Method (_STA, 0, Serialized) |
| 466 | { |
Felix Singer | d252776 | 2022-12-16 07:54:16 +0100 | [diff] [blame] | 467 | If (PRTH & 0x80) { |
Lee Leahy | 77ff0b1 | 2015-05-05 15:07:29 -0700 | [diff] [blame] | 468 | Return (0x9) |
| 469 | } Else { |
| 470 | Return (0xb) |
| 471 | } |
| 472 | } |
| 473 | } |