Angel Pons | 08da24e | 2020-04-03 01:21:24 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Sergej Ivanov | d777c78 | 2015-04-03 18:10:27 +0300 | [diff] [blame] | 2 | |
| 3 | // Scope is \_SB.PCI0.LPCB |
| 4 | |
| 5 | // Values, defined here, must match settings in devicetree.cb |
| 6 | |
| 7 | Device (PS2M) { |
| 8 | Name (_HID, EisaId ("PNP0F13")) |
| 9 | Name (_CRS, ResourceTemplate () { |
| 10 | IO (Decode16, 0x0060, 0x0060, 0x00, 0x01) |
| 11 | IO (Decode16, 0x0064, 0x0064, 0x00, 0x01) |
| 12 | IRQNoFlags () {12} |
| 13 | }) |
| 14 | Method (_STA, 0, NotSerialized) { |
Elyes HAOUAS | 635ac11 | 2020-10-08 09:17:27 +0200 | [diff] [blame] | 15 | Local0 = FLG0 & 0x04 |
| 16 | If (Local0 == 0x04) { |
Sergej Ivanov | d777c78 | 2015-04-03 18:10:27 +0300 | [diff] [blame] | 17 | Return (0x0F) |
| 18 | } Else { |
| 19 | Return (0x00) |
| 20 | } |
| 21 | } |
| 22 | } |
| 23 | |
| 24 | Device (PS2K) { |
| 25 | Name (_HID, EisaId ("PNP0303")) |
| 26 | Method (_STA, 0, NotSerialized) { |
Elyes HAOUAS | 635ac11 | 2020-10-08 09:17:27 +0200 | [diff] [blame] | 27 | Local0 = FLG0 & 0x04 |
| 28 | If (Local0 == 0x04) { |
Sergej Ivanov | d777c78 | 2015-04-03 18:10:27 +0300 | [diff] [blame] | 29 | Return (0x0F) |
| 30 | } Else { |
| 31 | Return (0x00) |
| 32 | } |
| 33 | } |
| 34 | Name (_CRS, ResourceTemplate () { |
| 35 | IO (Decode16, 0x0060, 0x0060, 0x00, 0x01) |
| 36 | IO (Decode16, 0x0064, 0x0064, 0x00, 0x01) |
| 37 | IRQNoFlags () {1} |
| 38 | }) |
| 39 | } |
| 40 | |
| 41 | Device (COM1) { |
| 42 | Name (_HID, EISAID ("PNP0501")) |
| 43 | Name (_UID, 1) |
| 44 | Method (_STA, 0, NotSerialized) { |
Elyes HAOUAS | 635ac11 | 2020-10-08 09:17:27 +0200 | [diff] [blame] | 45 | Local0 = FLG0 & 0x04 |
| 46 | If (Local0 == 0x04) { |
Sergej Ivanov | d777c78 | 2015-04-03 18:10:27 +0300 | [diff] [blame] | 47 | Return (0x0F) |
| 48 | } Else { |
| 49 | Return (0x00) |
| 50 | } |
| 51 | } |
| 52 | Name (_CRS, ResourceTemplate () |
| 53 | { |
| 54 | IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08) |
| 55 | IRQNoFlags () {4} |
| 56 | }) |
| 57 | Name (_PRS, ResourceTemplate () |
| 58 | { |
| 59 | IO (Decode16, 0x03F8, 0x03F8, 0x08, 0x08) |
| 60 | IRQNoFlags () {4} |
| 61 | }) |
| 62 | } |
| 63 | |
| 64 | Device (LPT1) { |
| 65 | Name (_HID, EISAID ("PNP0400")) |
| 66 | Name (_UID, 1) |
| 67 | Method (_STA, 0, NotSerialized) { |
Elyes HAOUAS | 635ac11 | 2020-10-08 09:17:27 +0200 | [diff] [blame] | 68 | Local0 = FLG0 & 0x04 |
| 69 | If (Local0 == 0x04) { |
Sergej Ivanov | d777c78 | 2015-04-03 18:10:27 +0300 | [diff] [blame] | 70 | Return (0x0F) |
| 71 | } Else { |
| 72 | Return (0x00) |
| 73 | } |
| 74 | } |
| 75 | Name (_CRS, ResourceTemplate () |
| 76 | { |
| 77 | IO (Decode16, 0x0378, 0x0378, 0x04, 0x08) |
| 78 | IRQNoFlags () {5} |
| 79 | }) |
| 80 | Name (_PRS, ResourceTemplate () |
| 81 | { |
| 82 | IO (Decode16, 0x0378, 0x0378, 0x04, 0x08) |
| 83 | IRQNoFlags () {5} |
| 84 | }) |
| 85 | } |