Tom Rini | 83d290c | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 2 | /* |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 3 | * (C) Copyright 2013 - 2015 Xilinx, Inc. |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 4 | * |
| 5 | * Xilinx Zynq SD Host Controller Interface |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 6 | */ |
| 7 | |
Stefan Herbrechtsmeier | e0f4de1 | 2017-01-17 16:27:32 +0100 | [diff] [blame] | 8 | #include <clk.h> |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 9 | #include <common.h> |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 10 | #include <dm.h> |
Michal Simek | 345d3c0 | 2014-02-24 11:16:31 +0100 | [diff] [blame] | 11 | #include <fdtdec.h> |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 12 | #include "mmc_private.h" |
Simon Glass | 336d461 | 2020-02-03 07:36:16 -0700 | [diff] [blame] | 13 | #include <dm/device_compat.h> |
Simon Glass | 61b29b8 | 2020-02-03 07:36:15 -0700 | [diff] [blame] | 14 | #include <linux/err.h> |
Masahiro Yamada | b08c8c4 | 2018-03-05 01:20:11 +0900 | [diff] [blame] | 15 | #include <linux/libfdt.h> |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 16 | #include <malloc.h> |
| 17 | #include <sdhci.h> |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 18 | #include <zynqmp_tap_delay.h> |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 19 | |
Stefan Herbrechtsmeier | 61e745d | 2017-01-17 16:27:33 +0100 | [diff] [blame] | 20 | DECLARE_GLOBAL_DATA_PTR; |
| 21 | |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 22 | struct arasan_sdhci_plat { |
| 23 | struct mmc_config cfg; |
| 24 | struct mmc mmc; |
Stefan Herbrechtsmeier | 61e745d | 2017-01-17 16:27:33 +0100 | [diff] [blame] | 25 | unsigned int f_max; |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 26 | }; |
| 27 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 28 | struct arasan_sdhci_priv { |
| 29 | struct sdhci_host *host; |
| 30 | u8 deviceid; |
| 31 | u8 bank; |
| 32 | u8 no_1p8; |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 33 | }; |
| 34 | |
| 35 | #if defined(CONFIG_ARCH_ZYNQMP) |
Siva Durga Prasad Paladugu | 8433370 | 2018-05-29 20:03:11 +0530 | [diff] [blame] | 36 | #define MMC_HS200_BUS_SPEED 5 |
| 37 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 38 | static const u8 mode2timing[] = { |
Siva Durga Prasad Paladugu | 8433370 | 2018-05-29 20:03:11 +0530 | [diff] [blame] | 39 | [MMC_LEGACY] = UHS_SDR12_BUS_SPEED, |
Siva Durga Prasad Paladugu | 8433370 | 2018-05-29 20:03:11 +0530 | [diff] [blame] | 40 | [MMC_HS] = HIGH_SPEED_BUS_SPEED, |
| 41 | [SD_HS] = HIGH_SPEED_BUS_SPEED, |
| 42 | [MMC_HS_52] = HIGH_SPEED_BUS_SPEED, |
| 43 | [MMC_DDR_52] = HIGH_SPEED_BUS_SPEED, |
| 44 | [UHS_SDR12] = UHS_SDR12_BUS_SPEED, |
| 45 | [UHS_SDR25] = UHS_SDR25_BUS_SPEED, |
| 46 | [UHS_SDR50] = UHS_SDR50_BUS_SPEED, |
| 47 | [UHS_DDR50] = UHS_DDR50_BUS_SPEED, |
| 48 | [UHS_SDR104] = UHS_SDR104_BUS_SPEED, |
| 49 | [MMC_HS_200] = MMC_HS200_BUS_SPEED, |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 50 | }; |
| 51 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 52 | #define SDHCI_TUNING_LOOP_COUNT 40 |
| 53 | |
| 54 | static void arasan_zynqmp_dll_reset(struct sdhci_host *host, u8 deviceid) |
| 55 | { |
| 56 | u16 clk; |
| 57 | unsigned long timeout; |
| 58 | |
| 59 | clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL); |
| 60 | clk &= ~(SDHCI_CLOCK_CARD_EN); |
| 61 | sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); |
| 62 | |
| 63 | /* Issue DLL Reset */ |
| 64 | zynqmp_dll_reset(deviceid); |
| 65 | |
| 66 | /* Wait max 20 ms */ |
| 67 | timeout = 100; |
| 68 | while (!((clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL)) |
| 69 | & SDHCI_CLOCK_INT_STABLE)) { |
| 70 | if (timeout == 0) { |
| 71 | dev_err(mmc_dev(host->mmc), |
| 72 | ": Internal clock never stabilised.\n"); |
| 73 | return; |
| 74 | } |
| 75 | timeout--; |
| 76 | udelay(1000); |
| 77 | } |
| 78 | |
| 79 | clk |= SDHCI_CLOCK_CARD_EN; |
| 80 | sdhci_writew(host, clk, SDHCI_CLOCK_CONTROL); |
| 81 | } |
| 82 | |
| 83 | static int arasan_sdhci_execute_tuning(struct mmc *mmc, u8 opcode) |
| 84 | { |
| 85 | struct mmc_cmd cmd; |
| 86 | struct mmc_data data; |
| 87 | u32 ctrl; |
| 88 | struct sdhci_host *host; |
| 89 | struct arasan_sdhci_priv *priv = dev_get_priv(mmc->dev); |
Michal Simek | b691178 | 2018-06-13 09:12:29 +0200 | [diff] [blame] | 90 | char tuning_loop_counter = SDHCI_TUNING_LOOP_COUNT; |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 91 | u8 deviceid; |
| 92 | |
| 93 | debug("%s\n", __func__); |
| 94 | |
| 95 | host = priv->host; |
| 96 | deviceid = priv->deviceid; |
| 97 | |
Faiz Abbas | d1c0a22 | 2019-06-11 00:43:40 +0530 | [diff] [blame] | 98 | ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 99 | ctrl |= SDHCI_CTRL_EXEC_TUNING; |
Faiz Abbas | d1c0a22 | 2019-06-11 00:43:40 +0530 | [diff] [blame] | 100 | sdhci_writew(host, ctrl, SDHCI_HOST_CONTROL2); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 101 | |
| 102 | mdelay(1); |
| 103 | |
| 104 | arasan_zynqmp_dll_reset(host, deviceid); |
| 105 | |
| 106 | sdhci_writel(host, SDHCI_INT_DATA_AVAIL, SDHCI_INT_ENABLE); |
| 107 | sdhci_writel(host, SDHCI_INT_DATA_AVAIL, SDHCI_SIGNAL_ENABLE); |
| 108 | |
| 109 | do { |
| 110 | cmd.cmdidx = opcode; |
| 111 | cmd.resp_type = MMC_RSP_R1; |
| 112 | cmd.cmdarg = 0; |
| 113 | |
| 114 | data.blocksize = 64; |
| 115 | data.blocks = 1; |
| 116 | data.flags = MMC_DATA_READ; |
| 117 | |
| 118 | if (tuning_loop_counter-- == 0) |
| 119 | break; |
| 120 | |
| 121 | if (cmd.cmdidx == MMC_CMD_SEND_TUNING_BLOCK_HS200 && |
| 122 | mmc->bus_width == 8) |
| 123 | data.blocksize = 128; |
| 124 | |
| 125 | sdhci_writew(host, SDHCI_MAKE_BLKSZ(SDHCI_DEFAULT_BOUNDARY_ARG, |
| 126 | data.blocksize), |
| 127 | SDHCI_BLOCK_SIZE); |
| 128 | sdhci_writew(host, data.blocks, SDHCI_BLOCK_COUNT); |
| 129 | sdhci_writew(host, SDHCI_TRNS_READ, SDHCI_TRANSFER_MODE); |
| 130 | |
| 131 | mmc_send_cmd(mmc, &cmd, NULL); |
Faiz Abbas | d1c0a22 | 2019-06-11 00:43:40 +0530 | [diff] [blame] | 132 | ctrl = sdhci_readw(host, SDHCI_HOST_CONTROL2); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 133 | |
| 134 | if (cmd.cmdidx == MMC_CMD_SEND_TUNING_BLOCK) |
| 135 | udelay(1); |
| 136 | |
| 137 | } while (ctrl & SDHCI_CTRL_EXEC_TUNING); |
| 138 | |
| 139 | if (tuning_loop_counter < 0) { |
| 140 | ctrl &= ~SDHCI_CTRL_TUNED_CLK; |
Faiz Abbas | d1c0a22 | 2019-06-11 00:43:40 +0530 | [diff] [blame] | 141 | sdhci_writel(host, ctrl, SDHCI_HOST_CONTROL2); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 142 | } |
| 143 | |
| 144 | if (!(ctrl & SDHCI_CTRL_TUNED_CLK)) { |
| 145 | printf("%s:Tuning failed\n", __func__); |
| 146 | return -1; |
| 147 | } |
| 148 | |
| 149 | udelay(1); |
| 150 | arasan_zynqmp_dll_reset(host, deviceid); |
| 151 | |
| 152 | /* Enable only interrupts served by the SD controller */ |
| 153 | sdhci_writel(host, SDHCI_INT_DATA_MASK | SDHCI_INT_CMD_MASK, |
| 154 | SDHCI_INT_ENABLE); |
| 155 | /* Mask all sdhci interrupt sources */ |
| 156 | sdhci_writel(host, 0x0, SDHCI_SIGNAL_ENABLE); |
| 157 | |
| 158 | return 0; |
| 159 | } |
| 160 | |
| 161 | static void arasan_sdhci_set_tapdelay(struct sdhci_host *host) |
| 162 | { |
| 163 | struct arasan_sdhci_priv *priv = dev_get_priv(host->mmc->dev); |
| 164 | struct mmc *mmc = (struct mmc *)host->mmc; |
| 165 | u8 uhsmode; |
| 166 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 167 | uhsmode = mode2timing[mmc->selected_mode]; |
| 168 | |
| 169 | if (uhsmode >= UHS_SDR25_BUS_SPEED) |
| 170 | arasan_zynqmp_set_tapdelay(priv->deviceid, uhsmode, |
| 171 | priv->bank); |
| 172 | } |
| 173 | |
| 174 | static void arasan_sdhci_set_control_reg(struct sdhci_host *host) |
| 175 | { |
| 176 | struct mmc *mmc = (struct mmc *)host->mmc; |
| 177 | u32 reg; |
| 178 | |
Siva Durga Prasad Paladugu | 8433370 | 2018-05-29 20:03:11 +0530 | [diff] [blame] | 179 | if (!IS_SD(mmc)) |
| 180 | return; |
| 181 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 182 | if (mmc->signal_voltage == MMC_SIGNAL_VOLTAGE_180) { |
Faiz Abbas | d1c0a22 | 2019-06-11 00:43:40 +0530 | [diff] [blame] | 183 | reg = sdhci_readw(host, SDHCI_HOST_CONTROL2); |
| 184 | reg |= SDHCI_CTRL_VDD_180; |
| 185 | sdhci_writew(host, reg, SDHCI_HOST_CONTROL2); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 186 | } |
| 187 | |
| 188 | if (mmc->selected_mode > SD_HS && |
Faiz Abbas | d1c0a22 | 2019-06-11 00:43:40 +0530 | [diff] [blame] | 189 | mmc->selected_mode <= UHS_DDR50) |
| 190 | sdhci_set_uhs_timing(host); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 191 | } |
| 192 | #endif |
| 193 | |
Siva Durga Prasad Paladugu | c95b19a | 2019-08-02 16:46:26 +0530 | [diff] [blame] | 194 | #if defined(CONFIG_ARCH_ZYNQMP) |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 195 | const struct sdhci_ops arasan_ops = { |
| 196 | .platform_execute_tuning = &arasan_sdhci_execute_tuning, |
| 197 | .set_delay = &arasan_sdhci_set_tapdelay, |
| 198 | .set_control_reg = &arasan_sdhci_set_control_reg, |
| 199 | }; |
| 200 | #endif |
| 201 | |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 202 | static int arasan_sdhci_probe(struct udevice *dev) |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 203 | { |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 204 | struct arasan_sdhci_plat *plat = dev_get_platdata(dev); |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 205 | struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 206 | struct arasan_sdhci_priv *priv = dev_get_priv(dev); |
| 207 | struct sdhci_host *host; |
Stefan Herbrechtsmeier | e0f4de1 | 2017-01-17 16:27:32 +0100 | [diff] [blame] | 208 | struct clk clk; |
| 209 | unsigned long clock; |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 210 | int ret; |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 211 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 212 | host = priv->host; |
| 213 | |
Stefan Herbrechtsmeier | e0f4de1 | 2017-01-17 16:27:32 +0100 | [diff] [blame] | 214 | ret = clk_get_by_index(dev, 0, &clk); |
| 215 | if (ret < 0) { |
| 216 | dev_err(dev, "failed to get clock\n"); |
| 217 | return ret; |
| 218 | } |
| 219 | |
| 220 | clock = clk_get_rate(&clk); |
| 221 | if (IS_ERR_VALUE(clock)) { |
| 222 | dev_err(dev, "failed to get rate\n"); |
| 223 | return clock; |
| 224 | } |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 225 | |
Stefan Herbrechtsmeier | e0f4de1 | 2017-01-17 16:27:32 +0100 | [diff] [blame] | 226 | debug("%s: CLK %ld\n", __func__, clock); |
| 227 | |
| 228 | ret = clk_enable(&clk); |
| 229 | if (ret && ret != -ENOSYS) { |
| 230 | dev_err(dev, "failed to enable clock\n"); |
| 231 | return ret; |
| 232 | } |
| 233 | |
Siva Durga Prasad Paladugu | eddabd1 | 2014-07-08 15:31:04 +0530 | [diff] [blame] | 234 | host->quirks = SDHCI_QUIRK_WAIT_SEND_CMD | |
Siva Durga Prasad Paladugu | f9ec45d | 2014-01-22 09:17:09 +0100 | [diff] [blame] | 235 | SDHCI_QUIRK_BROKEN_R1B; |
Siva Durga Prasad Paladugu | b215614 | 2016-01-12 15:12:16 +0530 | [diff] [blame] | 236 | |
| 237 | #ifdef CONFIG_ZYNQ_HISPD_BROKEN |
Hannes Schmelzer | 4781921 | 2018-03-07 08:00:57 +0100 | [diff] [blame] | 238 | host->quirks |= SDHCI_QUIRK_BROKEN_HISPD_MODE; |
Siva Durga Prasad Paladugu | b215614 | 2016-01-12 15:12:16 +0530 | [diff] [blame] | 239 | #endif |
| 240 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 241 | if (priv->no_1p8) |
| 242 | host->quirks |= SDHCI_QUIRK_NO_1_8_V; |
| 243 | |
Stefan Herbrechtsmeier | e0f4de1 | 2017-01-17 16:27:32 +0100 | [diff] [blame] | 244 | host->max_clk = clock; |
Stefan Herbrechtsmeier | 6d0e34b | 2017-01-17 15:58:48 +0100 | [diff] [blame] | 245 | |
Matwey V. Kornilov | 3148a3c | 2019-08-01 18:00:05 +0300 | [diff] [blame] | 246 | host->mmc = &plat->mmc; |
| 247 | host->mmc->dev = dev; |
| 248 | host->mmc->priv = host; |
| 249 | |
Stefan Herbrechtsmeier | 61e745d | 2017-01-17 16:27:33 +0100 | [diff] [blame] | 250 | ret = sdhci_setup_cfg(&plat->cfg, host, plat->f_max, |
Jaehoon Chung | 14bed52 | 2016-07-26 19:06:24 +0900 | [diff] [blame] | 251 | CONFIG_ZYNQ_SDHCI_MIN_FREQ); |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 252 | if (ret) |
| 253 | return ret; |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 254 | upriv->mmc = host->mmc; |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 255 | |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 256 | return sdhci_probe(dev); |
Michal Simek | 293eb33 | 2013-04-22 14:56:49 +0200 | [diff] [blame] | 257 | } |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 258 | |
| 259 | static int arasan_sdhci_ofdata_to_platdata(struct udevice *dev) |
| 260 | { |
Stefan Herbrechtsmeier | 61e745d | 2017-01-17 16:27:33 +0100 | [diff] [blame] | 261 | struct arasan_sdhci_plat *plat = dev_get_platdata(dev); |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 262 | struct arasan_sdhci_priv *priv = dev_get_priv(dev); |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 263 | |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 264 | priv->host = calloc(1, sizeof(struct sdhci_host)); |
| 265 | if (!priv->host) |
| 266 | return -1; |
| 267 | |
| 268 | priv->host->name = dev->name; |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 269 | |
Siva Durga Prasad Paladugu | c95b19a | 2019-08-02 16:46:26 +0530 | [diff] [blame] | 270 | #if defined(CONFIG_ARCH_ZYNQMP) |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 271 | priv->host->ops = &arasan_ops; |
| 272 | #endif |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 273 | |
Michal Simek | 458e8d8 | 2018-05-16 10:57:07 +0200 | [diff] [blame] | 274 | priv->host->ioaddr = (void *)dev_read_addr(dev); |
| 275 | if (IS_ERR(priv->host->ioaddr)) |
| 276 | return PTR_ERR(priv->host->ioaddr); |
Stefan Herbrechtsmeier | 61e745d | 2017-01-17 16:27:33 +0100 | [diff] [blame] | 277 | |
Michal Simek | 458e8d8 | 2018-05-16 10:57:07 +0200 | [diff] [blame] | 278 | priv->deviceid = dev_read_u32_default(dev, "xlnx,device_id", -1); |
| 279 | priv->bank = dev_read_u32_default(dev, "xlnx,mio_bank", -1); |
| 280 | priv->no_1p8 = dev_read_bool(dev, "no-1-8-v"); |
| 281 | |
| 282 | plat->f_max = dev_read_u32_default(dev, "max-frequency", |
| 283 | CONFIG_ZYNQ_SDHCI_MAX_FREQ); |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 284 | return 0; |
| 285 | } |
| 286 | |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 287 | static int arasan_sdhci_bind(struct udevice *dev) |
| 288 | { |
| 289 | struct arasan_sdhci_plat *plat = dev_get_platdata(dev); |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 290 | |
Masahiro Yamada | 24f5aec | 2016-09-06 22:17:32 +0900 | [diff] [blame] | 291 | return sdhci_bind(dev, &plat->mmc, &plat->cfg); |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 292 | } |
| 293 | |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 294 | static const struct udevice_id arasan_sdhci_ids[] = { |
| 295 | { .compatible = "arasan,sdhci-8.9a" }, |
| 296 | { } |
| 297 | }; |
| 298 | |
| 299 | U_BOOT_DRIVER(arasan_sdhci_drv) = { |
| 300 | .name = "arasan_sdhci", |
| 301 | .id = UCLASS_MMC, |
| 302 | .of_match = arasan_sdhci_ids, |
| 303 | .ofdata_to_platdata = arasan_sdhci_ofdata_to_platdata, |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 304 | .ops = &sdhci_ops, |
| 305 | .bind = arasan_sdhci_bind, |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 306 | .probe = arasan_sdhci_probe, |
Siva Durga Prasad Paladugu | d1f4e39 | 2018-04-19 12:37:09 +0530 | [diff] [blame] | 307 | .priv_auto_alloc_size = sizeof(struct arasan_sdhci_priv), |
Simon Glass | 329a449 | 2016-07-05 17:10:15 -0600 | [diff] [blame] | 308 | .platdata_auto_alloc_size = sizeof(struct arasan_sdhci_plat), |
Michal Simek | d9ae52c | 2015-11-30 16:13:03 +0100 | [diff] [blame] | 309 | }; |