1 /* SPDX-License-Identifier: GPL-2.0-only */
7 Name (_HID, EISAID("PNP0A05"))
10 OperationRegion(SIOR, SystemIO, 0x4e, 0x02)
11 Field (SIOR, ByteAcc, Nolock, Preserve)
21 Acquire (SIOM, 0xffff)
35 Acquire (SIOM, 0xffff)
47 Name(_HID, EISAID("PNP0501"))
50 Name(_PRW, Package() { 0x08, 0x03 })
55 Acquire (SIOM, 0xffff)
57 // Is the hardware enabled?
58 Local0 = READ (0, 0x24, 0xff)
63 Local0 = READ (0, 0x02, 0x08)
77 Local0 = READ (0, 0x28, 0x0f)
80 Local0 = READ (0, 0x02, 0xff)
86 /* Possible Resource Settings */
87 Name(_PRS, ResourceTemplate() {
88 StartDependentFn(0, 1) {
89 IO(Decode16, 0x3f8, 0x3f8, 0x8, 0x8)
94 /* Current Resource Settings */
95 Method(_CRS, 0, Serialized)
97 Name(NONE, ResourceTemplate() {
98 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
102 Name(RSRC, ResourceTemplate() {
103 IO(Decode16, 0x3f8, 0x3f8, 0x8, 0x8, _IOA)
104 IRQNoFlags(_IRA) { 4 }
107 Local0 = (_STA () & 0x02)
112 CreateWordField(RSRC,
113 \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IOA._MIN, IOMN)
114 CreateWordField(RSRC,
115 \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IOA._MAX, IOMX)
116 CreateWordField(RSRC,
117 \_SB.PCI0.LPCB.SIO1.UAR1._CRS._IRA._INT, IRQ)
120 Local0 = READ (0, 0x24, 0xfe)
126 Local0 = READ (0, 0x28, 0xf0)
132 /* Set Resource Settings */
135 CreateByteField(Arg0, 0x02, IOLO)
136 CreateByteField(Arg0, 0x03, IOHI)
137 CreateByteField(Arg0, 0x09, IRQL)
140 FindSetRightBit(IRQL, Local0)
144 Local1 = READ (0, 0x28, 0x0f)
146 WRIT(0, 0x28, Local0)
155 WRIT(0, 0x24, Local0)
157 Local0 = READ (0, 0x02, 0xff)
159 WRIT(0, 0x02, Local0)
161 Local0 = READ (0, 0x07, 0xff)
164 WRIT(0, 0x07, Local0)
168 /* D0 state - Line drivers are on */
171 Local0 = READ (0, 0x02, 0xff)
173 WRIT(0, 0x02, Local0)
175 Local0 = READ (0, 0x07, 0xff)
178 WRIT(0, 0x07, Local0)
181 /* D3 State - Line drivers are off */
184 Local0 = READ (0, 0x02, 0xff)
187 WRIT(0, 0x02, Local0)
193 Name(_HID, EISAID("PNP0501"))
196 Name(_PRW, Package() { 0x08, 0x03 })
202 Local0 = READ(0, 0x0c, 0x38)
207 // Is the hardware enabled?
208 Local0 = READ (0, 0x25, 0xff)
213 Local0 = READ (0, 0x02, 0x80)
227 Local0 = READ (0, 0x28, 0xf0)
228 WRIT(0, 0x28, Local0)
230 Local0 = READ (0, 0x02, 0xff)
233 WRIT(0, 0x02, Local0)
236 /* Possible Resource Settings */
237 Name(_PRS, ResourceTemplate() {
238 StartDependentFn(0, 1) {
239 IO(Decode16, 0x2f8, 0x2f8, 0x8, 0x8)
244 /* Current Resource Settings */
245 Method(_CRS, 0, Serialized)
247 Name(NONE, ResourceTemplate() {
248 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
252 Name(RSRC, ResourceTemplate() {
253 IO(Decode16, 0x2f8, 0x2f8, 0x8, 0x8, _IOB)
254 IRQNoFlags(_IRB) { 3 }
257 Local0 = _STA () & 0x02
262 CreateWordField(RSRC,
263 \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IOB._MIN, IOMN)
264 CreateWordField(RSRC,
265 \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IOB._MAX, IOMX)
266 CreateWordField(RSRC,
267 \_SB.PCI0.LPCB.SIO1.UAR2._CRS._IRB._INT, IRQ)
270 Local0 = READ (0, 0x25, 0xfe)
276 Local0 = READ (0, 0x28, 0x0f)
282 /* Set Resource Settings */
285 CreateByteField(Arg0, 0x02, IOLO)
286 CreateByteField(Arg0, 0x03, IOHI)
287 CreateByteField(Arg0, 0x09, IRQL)
290 FindSetRightBit(IRQL, Local0)
293 Local1 = READ (0x00, 0x28, 0xf0)
295 WRIT(0, 0x28, Local0)
304 WRIT(0, 0x25, Local0)
306 Local0 = READ (0, 0x0c, 0xff)
309 WRIT(0, 0x0c, Local0)
311 Local0 = READ (0, 0x02, 0xff)
313 WRIT(0, 0x02, Local0)
315 Local0 = READ (0, 0x07, 0xff)
318 WRIT(0, 0x07, Local0)
321 /* D0 state - Line drivers are on */
324 Local0 = READ (0, 0x02, 0xff)
326 WRIT(0, 0x02, Local0)
328 Local0 = READ (0, 0x07, 0xff)
331 WRIT(0, 0x07, Local0)
334 /* D3 State - Line drivers are off */
337 Local0 = READ (0, 0x02, 0xff)
340 WRIT(0, 0x02, Local0)
346 Name(_HID, EISAID("PNP0501"))
349 Name(_PRW, Package() { 0x08, 0x03 })
354 Acquire (SIOM, 0xffff)
356 // Is the hardware enabled?
357 Local0 = READ (0, 0x1b, 0xff)
362 Local0 = READ (0, 0x02, 0x02)
376 Local0 = READ (0, 0x1d, 0x0f)
377 WRIT(0, 0x1d, Local0)
379 Local0 = READ (0, 0x02, 0xff)
382 WRIT(0, 0x02, Local0)
385 /* Possible Resource Settings */
386 Name(_PRS, ResourceTemplate() {
387 StartDependentFn(0, 1) {
388 IO(Decode16, 0x3e8, 0x3e8, 0x8, 0x8)
393 /* Current Resource Settings */
394 Method(_CRS, 0, Serialized)
396 Name(NONE, ResourceTemplate() {
397 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
401 Name(RSRC, ResourceTemplate() {
402 IO(Decode16, 0x3e8, 0x3e8, 0x8, 0x8, _IOA)
403 IRQNoFlags(_IRA) { 5 }
406 Local0 = _STA () & 0x02
411 CreateWordField(RSRC,
412 \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IOA._MIN, IOMN)
413 CreateWordField(RSRC,
414 \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IOA._MAX, IOMX)
415 CreateWordField(RSRC,
416 \_SB.PCI0.LPCB.SIO1.UAR3._CRS._IRA._INT, IRQ)
419 Local0 = READ (0x00, 0x1b, 0xfe)
425 Local0 = READ (0, 0x1d, 0xf0)
431 /* Set Resource Settings */
434 CreateByteField(Arg0, 0x02, IOLO)
435 CreateByteField(Arg0, 0x03, IOHI)
436 CreateByteField(Arg0, 0x09, IRQL)
439 FindSetRightBit(IRQL, Local0)
443 Local1 = READ (0, 0x1d, 0x0f)
445 WRIT(0, 0x1d, Local0)
454 WRIT(0, 0x1b, Local0)
456 Local0 = READ (0, 0x02, 0xff)
458 WRIT(0, 0x02, Local0)
460 Local0 = READ (0, 0x07, 0xff)
463 WRIT(0, 0x07, Local0)
467 /* D0 state - Line drivers are on */
470 Local0 = READ (0, 0x02, 0xff)
472 WRIT(0, 0x02, Local0)
474 Local0 = READ (0, 0x07, 0xff)
477 WRIT(0, 0x07, Local0)
480 /* D3 State - Line drivers are off */
483 Local0 = READ (0, 0x02, 0xff)
486 WRIT(0, 0x02, Local0)
493 Name(_HID, EISAID("PNP0501"))
496 Name(_PRW, Package() { 0x08, 0x03 })
501 Acquire (SIOM, 0xffff)
503 // Is the hardware enabled?
504 Local0 = READ (0, 0x1c, 0xff)
509 Local0 = READ (0, 0x02, 0x04)
523 Local0 = READ (0, 0x1d, 0x0f)
524 WRIT(0, 0x1d, Local0)
526 Local0 = READ (0, 0x02, 0xff)
529 WRIT(0, 0x02, Local0)
532 /* Possible Resource Settings */
533 Name(_PRS, ResourceTemplate() {
534 StartDependentFn(0, 1) {
535 IO(Decode16, 0x2e8, 0x2e8, 0x8, 0x8)
540 /* Current Resource Settings */
541 Method(_CRS, 0, Serialized)
543 Name(NONE, ResourceTemplate() {
544 IO(Decode16, 0x000, 0x000, 0x0, 0x1)
548 Name(RSRC, ResourceTemplate() {
549 IO(Decode16, 0x2e8, 0x2e8, 0x8, 0x8, _IOA)
550 IRQNoFlags(_IRA) { 11 }
553 Local0 = _STA () & 0x02
558 CreateWordField(RSRC,
559 \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IOA._MIN, IOMN)
560 CreateWordField(RSRC,
561 \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IOA._MAX, IOMX)
562 CreateWordField(RSRC,
563 \_SB.PCI0.LPCB.SIO1.UAR4._CRS._IRA._INT, IRQ)
566 Local0 = READ (0, 0x1c, 0xfe)
572 Local0 = READ (0, 0x1d, 0xf0)
578 /* Set Resource Settings */
581 CreateByteField(Arg0, 0x02, IOLO)
582 CreateByteField(Arg0, 0x03, IOHI)
583 CreateByteField(Arg0, 0x09, IRQL)
586 FindSetRightBit(IRQL, Local0)
590 Local1 = READ (0x00, 0x1d, 0x0f)
592 WRIT(0, 0x1d, Local0)
601 WRIT(0, 0x1c, Local0)
603 Local0 = READ (0, 0x02, 0xff)
605 WRIT(0, 0x02, Local0)
607 Local0 = READ (0, 0x07, 0xff)
610 WRIT(0, 0x07, Local0)
614 /* D0 state - Line drivers are on */
617 Local0 = READ (0, 0x02, 0xff)
619 WRIT(0, 0x02, Local0)
621 Local0 = READ (0, 0x07, 0xff)
624 WRIT(0, 0x07, Local0)
627 /* D3 State - Line drivers are off */
630 Local0 = READ (0, 0x02, 0xff)
633 WRIT(0, 0x02, Local0)