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