Angel Pons | c3f58f6 | 2020-04-05 15:46:41 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Duncan Laurie | 430bf0d | 2013-12-10 14:37:42 -0800 | [diff] [blame] | 2 | |
| 3 | Device (EMMC) |
| 4 | { |
| 5 | Name (_HID, "80860F14") |
| 6 | Name (_CID, "PNP0D40") |
| 7 | Name (_UID, 1) |
| 8 | Name (_DDN, "eMMC Controller 4.5") |
| 9 | |
| 10 | Name (RBUF, ResourceTemplate() |
| 11 | { |
| 12 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 13 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 14 | { |
| 15 | SCC_EMMC_IRQ |
| 16 | } |
| 17 | }) |
| 18 | |
| 19 | Method (_CRS) |
| 20 | { |
| 21 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 22 | Store (\C0B0, RBAS) |
| 23 | Return (^RBUF) |
| 24 | } |
| 25 | |
| 26 | Method (_STA) |
| 27 | { |
| 28 | If (LEqual (\C0EN, 1)) { |
| 29 | Return (0xF) |
| 30 | } Else { |
| 31 | Return (0x0) |
| 32 | } |
| 33 | } |
| 34 | |
| 35 | OperationRegion (KEYS, SystemMemory, C0B1, 0x100) |
| 36 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 37 | { |
| 38 | Offset (0x84), |
| 39 | PSAT, 32, |
| 40 | } |
| 41 | |
| 42 | Method (_PS3) |
| 43 | { |
| 44 | Or (PSAT, 0x00000003, PSAT) |
| 45 | Or (PSAT, 0x00000000, PSAT) |
| 46 | } |
| 47 | |
| 48 | Method (_PS0) |
| 49 | { |
| 50 | And (PSAT, 0xfffffffc, PSAT) |
| 51 | Or (PSAT, 0x00000000, PSAT) |
| 52 | } |
| 53 | |
| 54 | Device (EM45) |
| 55 | { |
| 56 | /* Slot 0, Function 8 */ |
| 57 | Name (_ADR, 0x8) |
| 58 | |
| 59 | Method (_RMV, 0, NotSerialized) |
| 60 | { |
| 61 | Return (0) |
| 62 | } |
| 63 | } |
| 64 | } |
| 65 | |
| 66 | Device (SDIO) |
| 67 | { |
| 68 | Name (_HID, "INT33BB") |
| 69 | Name (_CID, "PNP0D40") |
| 70 | Name (_UID, 2) |
| 71 | Name (_DDN, "SDIO Controller") |
| 72 | |
| 73 | Name (RBUF, ResourceTemplate() |
| 74 | { |
| 75 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 76 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 77 | { |
| 78 | SCC_SDIO_IRQ |
| 79 | } |
| 80 | }) |
| 81 | |
| 82 | Method (_CRS) |
| 83 | { |
| 84 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 85 | Store (\C1B0, RBAS) |
| 86 | Return (^RBUF) |
| 87 | } |
| 88 | |
| 89 | Method (_STA) |
| 90 | { |
| 91 | If (LEqual (\C1EN, 1)) { |
| 92 | Return (0xF) |
| 93 | } Else { |
| 94 | Return (0x0) |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | OperationRegion (KEYS, SystemMemory, C1B1, 0x100) |
| 99 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 100 | { |
| 101 | Offset (0x84), |
| 102 | PSAT, 32, |
| 103 | } |
| 104 | |
| 105 | Method (_PS3) |
| 106 | { |
| 107 | Or (PSAT, 0x00000003, PSAT) |
| 108 | Or (PSAT, 0x00000000, PSAT) |
| 109 | } |
| 110 | |
| 111 | Method (_PS0) |
| 112 | { |
| 113 | And (PSAT, 0xfffffffc, PSAT) |
| 114 | Or (PSAT, 0x00000000, PSAT) |
| 115 | } |
| 116 | } |
| 117 | |
| 118 | Device (SDCD) |
| 119 | { |
| 120 | Name (_HID, "80860F16") |
| 121 | Name (_CID, "PNP0D40") |
| 122 | Name (_UID, 3) |
| 123 | Name (_DDN, "SD Card Controller") |
| 124 | |
| 125 | Name (RBUF, ResourceTemplate() |
| 126 | { |
| 127 | Memory32Fixed (ReadWrite, 0, 0x1000, BAR0) |
| 128 | Interrupt (ResourceConsumer, Level, ActiveLow, Exclusive,,,) |
| 129 | { |
| 130 | SCC_SD_IRQ |
| 131 | } |
| 132 | }) |
| 133 | |
| 134 | Method (_CRS) |
| 135 | { |
| 136 | CreateDwordField (^RBUF, ^BAR0._BAS, RBAS) |
| 137 | Store (\C2B0, RBAS) |
| 138 | Return (^RBUF) |
| 139 | } |
| 140 | |
| 141 | Method (_STA) |
| 142 | { |
| 143 | If (LEqual (\C2EN, 1)) { |
| 144 | Return (0xF) |
| 145 | } Else { |
| 146 | Return (0x0) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | OperationRegion (KEYS, SystemMemory, C2B1, 0x100) |
| 151 | Field (KEYS, DWordAcc, NoLock, WriteAsZeros) |
| 152 | { |
| 153 | Offset (0x84), |
| 154 | PSAT, 32, |
| 155 | } |
| 156 | |
| 157 | Method (_PS3) |
| 158 | { |
| 159 | Or (PSAT, 0x00000003, PSAT) |
| 160 | Or (PSAT, 0x00000000, PSAT) |
| 161 | } |
| 162 | |
| 163 | Method (_PS0) |
| 164 | { |
| 165 | And (PSAT, 0xfffffffc, PSAT) |
| 166 | Or (PSAT, 0x00000000, PSAT) |
| 167 | } |
| 168 | } |