1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2009 SAMSUNG Electronics
6 * Portions Copyright 2011-2019 NVIDIA Corporation
17 #include <asm/arch-tegra/tegra_mmc.h>
18 #include <linux/err.h>
19 #if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
20 #include <asm/arch/clock.h>
23 struct tegra_mmc_plat {
24 struct mmc_config cfg;
28 struct tegra_mmc_priv {
29 struct tegra_mmc *reg;
30 struct reset_ctl reset_ctl;
32 struct gpio_desc cd_gpio; /* Change Detect GPIO */
33 struct gpio_desc pwr_gpio; /* Power GPIO */
34 struct gpio_desc wp_gpio; /* Write Protect GPIO */
35 unsigned int version; /* SDHCI spec. version */
36 unsigned int clock; /* Current clock (MHz) */
37 int mmc_id; /* peripheral id */
40 static void tegra_mmc_set_power(struct tegra_mmc_priv *priv,
44 debug("%s: power = %x\n", __func__, power);
46 if (power != (unsigned short)-1) {
49 pwr = TEGRA_MMC_PWRCTL_SD_BUS_VOLTAGE_V1_8;
53 pwr = TEGRA_MMC_PWRCTL_SD_BUS_VOLTAGE_V3_0;
57 pwr = TEGRA_MMC_PWRCTL_SD_BUS_VOLTAGE_V3_3;
61 debug("%s: pwr = %X\n", __func__, pwr);
63 /* Set the bus voltage first (if any) */
64 writeb(pwr, &priv->reg->pwrcon);
68 /* Now enable bus power */
69 pwr |= TEGRA_MMC_PWRCTL_SD_BUS_POWER;
70 writeb(pwr, &priv->reg->pwrcon);
73 static void tegra_mmc_prepare_data(struct tegra_mmc_priv *priv,
74 struct mmc_data *data,
75 struct bounce_buffer *bbstate)
80 debug("buf: %p (%p), data->blocks: %u, data->blocksize: %u\n",
81 bbstate->bounce_buffer, bbstate->user_buffer, data->blocks,
84 writel((u32)(unsigned long)bbstate->bounce_buffer, &priv->reg->sysad);
89 * 10 = Selects 32-bit Address ADMA2
90 * 11 = Selects 64-bit Address ADMA2
92 ctrl = readb(&priv->reg->hostctl);
93 ctrl &= ~TEGRA_MMC_HOSTCTL_DMASEL_MASK;
94 ctrl |= TEGRA_MMC_HOSTCTL_DMASEL_SDMA;
95 writeb(ctrl, &priv->reg->hostctl);
97 /* We do not handle DMA boundaries, so set it to max (512 KiB) */
98 writew((7 << 12) | (data->blocksize & 0xFFF), &priv->reg->blksize);
99 writew(data->blocks, &priv->reg->blkcnt);
102 static void tegra_mmc_set_transfer_mode(struct tegra_mmc_priv *priv,
103 struct mmc_data *data)
106 debug(" mmc_set_transfer_mode called\n");
109 * MUL1SIN0[5] : Multi/Single Block Select
110 * RD1WT0[4] : Data Transfer Direction Select
113 * ENACMD12[2] : Auto CMD12 Enable
114 * ENBLKCNT[1] : Block Count Enable
115 * ENDMA[0] : DMA Enable
117 mode = (TEGRA_MMC_TRNMOD_DMA_ENABLE |
118 TEGRA_MMC_TRNMOD_BLOCK_COUNT_ENABLE);
120 if (data->blocks > 1)
121 mode |= TEGRA_MMC_TRNMOD_MULTI_BLOCK_SELECT;
123 if (data->flags & MMC_DATA_READ)
124 mode |= TEGRA_MMC_TRNMOD_DATA_XFER_DIR_SEL_READ;
126 writew(mode, &priv->reg->trnmod);
129 static int tegra_mmc_wait_inhibit(struct tegra_mmc_priv *priv,
131 struct mmc_data *data,
132 unsigned int timeout)
136 * CMDINHDAT[1] : Command Inhibit (DAT)
137 * CMDINHCMD[0] : Command Inhibit (CMD)
139 unsigned int mask = TEGRA_MMC_PRNSTS_CMD_INHIBIT_CMD;
142 * We shouldn't wait for data inhibit for stop commands, even
143 * though they might use busy signaling
145 if ((data == NULL) && (cmd->resp_type & MMC_RSP_BUSY))
146 mask |= TEGRA_MMC_PRNSTS_CMD_INHIBIT_DAT;
148 while (readl(&priv->reg->prnsts) & mask) {
150 printf("%s: timeout error\n", __func__);
160 static int tegra_mmc_send_cmd_bounced(struct udevice *dev, struct mmc_cmd *cmd,
161 struct mmc_data *data,
162 struct bounce_buffer *bbstate)
164 struct tegra_mmc_priv *priv = dev_get_priv(dev);
167 unsigned int mask = 0;
168 unsigned int retry = 0x100000;
169 debug(" mmc_send_cmd called\n");
171 result = tegra_mmc_wait_inhibit(priv, cmd, data, 10 /* ms */);
177 tegra_mmc_prepare_data(priv, data, bbstate);
179 debug("cmd->arg: %08x\n", cmd->cmdarg);
180 writel(cmd->cmdarg, &priv->reg->argument);
183 tegra_mmc_set_transfer_mode(priv, data);
185 if ((cmd->resp_type & MMC_RSP_136) && (cmd->resp_type & MMC_RSP_BUSY))
190 * CMDIDX[13:8] : Command index
191 * DATAPRNT[5] : Data Present Select
192 * ENCMDIDX[4] : Command Index Check Enable
193 * ENCMDCRC[3] : Command CRC Check Enable
198 * 11 = Length 48 Check busy after response
200 if (!(cmd->resp_type & MMC_RSP_PRESENT))
201 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_NO_RESPONSE;
202 else if (cmd->resp_type & MMC_RSP_136)
203 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_LENGTH_136;
204 else if (cmd->resp_type & MMC_RSP_BUSY)
205 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_LENGTH_48_BUSY;
207 flags = TEGRA_MMC_CMDREG_RESP_TYPE_SELECT_LENGTH_48;
209 if (cmd->resp_type & MMC_RSP_CRC)
210 flags |= TEGRA_MMC_TRNMOD_CMD_CRC_CHECK;
211 if (cmd->resp_type & MMC_RSP_OPCODE)
212 flags |= TEGRA_MMC_TRNMOD_CMD_INDEX_CHECK;
214 flags |= TEGRA_MMC_TRNMOD_DATA_PRESENT_SELECT_DATA_TRANSFER;
216 debug("cmd: %d\n", cmd->cmdidx);
218 writew((cmd->cmdidx << 8) | flags, &priv->reg->cmdreg);
220 for (i = 0; i < retry; i++) {
221 mask = readl(&priv->reg->norintsts);
222 /* Command Complete */
223 if (mask & TEGRA_MMC_NORINTSTS_CMD_COMPLETE) {
225 writel(mask, &priv->reg->norintsts);
231 printf("%s: waiting for status update\n", __func__);
232 writel(mask, &priv->reg->norintsts);
236 if (mask & TEGRA_MMC_NORINTSTS_CMD_TIMEOUT) {
238 debug("timeout: %08x cmd %d\n", mask, cmd->cmdidx);
239 writel(mask, &priv->reg->norintsts);
241 } else if (mask & TEGRA_MMC_NORINTSTS_ERR_INTERRUPT) {
242 /* Error Interrupt */
243 debug("error: %08x cmd %d\n", mask, cmd->cmdidx);
244 writel(mask, &priv->reg->norintsts);
248 if (cmd->resp_type & MMC_RSP_PRESENT) {
249 if (cmd->resp_type & MMC_RSP_136) {
250 /* CRC is stripped so we need to do some shifting. */
251 for (i = 0; i < 4; i++) {
252 unsigned long offset = (unsigned long)
253 (&priv->reg->rspreg3 - i);
254 cmd->response[i] = readl(offset) << 8;
260 debug("cmd->resp[%d]: %08x\n",
261 i, cmd->response[i]);
263 } else if (cmd->resp_type & MMC_RSP_BUSY) {
264 for (i = 0; i < retry; i++) {
265 /* PRNTDATA[23:20] : DAT[3:0] Line Signal */
266 if (readl(&priv->reg->prnsts)
267 & (1 << 20)) /* DAT[0] */
272 printf("%s: card is still busy\n", __func__);
273 writel(mask, &priv->reg->norintsts);
277 cmd->response[0] = readl(&priv->reg->rspreg0);
278 debug("cmd->resp[0]: %08x\n", cmd->response[0]);
280 cmd->response[0] = readl(&priv->reg->rspreg0);
281 debug("cmd->resp[0]: %08x\n", cmd->response[0]);
286 unsigned long start = get_timer(0);
289 mask = readl(&priv->reg->norintsts);
291 if (mask & TEGRA_MMC_NORINTSTS_ERR_INTERRUPT) {
292 /* Error Interrupt */
293 writel(mask, &priv->reg->norintsts);
294 printf("%s: error during transfer: 0x%08x\n",
297 } else if (mask & TEGRA_MMC_NORINTSTS_DMA_INTERRUPT) {
299 * DMA Interrupt, restart the transfer where
300 * it was interrupted.
302 unsigned int address = readl(&priv->reg->sysad);
305 writel(TEGRA_MMC_NORINTSTS_DMA_INTERRUPT,
306 &priv->reg->norintsts);
307 writel(address, &priv->reg->sysad);
308 } else if (mask & TEGRA_MMC_NORINTSTS_XFER_COMPLETE) {
309 /* Transfer Complete */
310 debug("r/w is done\n");
312 } else if (get_timer(start) > 8000UL) {
313 writel(mask, &priv->reg->norintsts);
314 printf("%s: MMC Timeout\n"
315 " Interrupt status 0x%08x\n"
316 " Interrupt status enable 0x%08x\n"
317 " Interrupt signal enable 0x%08x\n"
318 " Present status 0x%08x\n",
320 readl(&priv->reg->norintstsen),
321 readl(&priv->reg->norintsigen),
322 readl(&priv->reg->prnsts));
326 writel(mask, &priv->reg->norintsts);
333 static int tegra_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd,
334 struct mmc_data *data)
337 unsigned int bbflags;
339 struct bounce_buffer bbstate;
343 if (data->flags & MMC_DATA_READ) {
345 bbflags = GEN_BB_WRITE;
347 buf = (void *)data->src;
348 bbflags = GEN_BB_READ;
350 len = data->blocks * data->blocksize;
352 bounce_buffer_start(&bbstate, buf, len, bbflags);
355 ret = tegra_mmc_send_cmd_bounced(dev, cmd, data, &bbstate);
358 bounce_buffer_stop(&bbstate);
363 static void tegra_mmc_change_clock(struct tegra_mmc_priv *priv, uint clock)
368 unsigned long timeout;
370 debug(" mmc_change_clock called\n");
373 * Change Tegra SDMMCx clock divisor here. Source is PLLP_OUT0
378 rate = clk_set_rate(&priv->clk, clock);
379 div = (rate + clock - 1) / clock;
381 #if defined(CONFIG_TEGRA210)
382 if (priv->mmc_id == PERIPH_ID_SDMMC1 && clock <= 400000) {
383 /* clock_adjust_periph_pll_div() chooses a 'bad' clock
384 * on SDMMC1 T210, so skip it here and force a clock
385 * that's been spec'd in the table in the TRM for
386 * card-detect (400KHz).
388 uint effective_rate = clock_adjust_periph_pll_div(priv->mmc_id,
389 CLOCK_ID_PERIPH, 24727273, NULL);
392 debug("%s: WAR: Using SDMMC1 clock of %u, div %d to achieve %dHz card clock ...\n",
393 __func__, effective_rate, div, clock);
395 clock_adjust_periph_pll_div(priv->mmc_id, CLOCK_ID_PERIPH,
399 debug("div = %d\n", div);
401 writew(0, &priv->reg->clkcon);
405 * SELFREQ[15:8] : base clock divided by value
406 * ENSDCLK[2] : SD Clock Enable
407 * STBLINTCLK[1] : Internal Clock Stable
408 * ENINTCLK[0] : Internal Clock Enable
411 clk = ((div << TEGRA_MMC_CLKCON_SDCLK_FREQ_SEL_SHIFT) |
412 TEGRA_MMC_CLKCON_INTERNAL_CLOCK_ENABLE);
413 writew(clk, &priv->reg->clkcon);
417 while (!(readw(&priv->reg->clkcon) &
418 TEGRA_MMC_CLKCON_INTERNAL_CLOCK_STABLE)) {
420 printf("%s: timeout error\n", __func__);
427 clk |= TEGRA_MMC_CLKCON_SD_CLOCK_ENABLE;
428 writew(clk, &priv->reg->clkcon);
430 debug("mmc_change_clock: clkcon = %08X\n", clk);
436 static int tegra_mmc_set_ios(struct udevice *dev)
438 struct tegra_mmc_priv *priv = dev_get_priv(dev);
439 struct mmc *mmc = mmc_get_mmc_dev(dev);
441 debug(" mmc_set_ios called\n");
443 debug("bus_width: %x, clock: %d\n", mmc->bus_width, mmc->clock);
445 /* Change clock first */
446 tegra_mmc_change_clock(priv, mmc->clock);
448 ctrl = readb(&priv->reg->hostctl);
452 * 0 = Depend on WIDE4
458 if (mmc->bus_width == 8)
460 else if (mmc->bus_width == 4)
463 ctrl &= ~(1 << 1 | 1 << 5);
465 writeb(ctrl, &priv->reg->hostctl);
466 debug("mmc_set_ios: hostctl = %08X\n", ctrl);
471 static void tegra_mmc_pad_init(struct tegra_mmc_priv *priv)
473 #if defined(CONFIG_TEGRA30) || defined(CONFIG_TEGRA210)
477 int id = priv->mmc_id;
479 debug("%s: sdmmc address = %p, id = %d\n", __func__,
482 /* Set the pad drive strength for SDMMC1 or 3 only */
483 if (id != PERIPH_ID_SDMMC1 && id != PERIPH_ID_SDMMC3) {
484 debug("%s: settings are only valid for SDMMC1/SDMMC3!\n",
489 val = readl(&priv->reg->sdmemcmppadctl);
491 val |= MEMCOMP_PADCTRL_VREF;
492 writel(val, &priv->reg->sdmemcmppadctl);
494 /* Disable SD Clock Enable before running auto-cal as per TRM */
495 clk_con = readw(&priv->reg->clkcon);
496 debug("%s: CLOCK_CONTROL = 0x%04X\n", __func__, clk_con);
497 clk_con &= ~TEGRA_MMC_CLKCON_SD_CLOCK_ENABLE;
498 writew(clk_con, &priv->reg->clkcon);
500 val = readl(&priv->reg->autocalcfg);
502 val |= AUTO_CAL_PU_OFFSET | AUTO_CAL_PD_OFFSET;
503 writel(val, &priv->reg->autocalcfg);
504 val |= AUTO_CAL_START | AUTO_CAL_ENABLE;
505 writel(val, &priv->reg->autocalcfg);
506 debug("%s: AUTO_CAL_CFG = 0x%08X\n", __func__, val);
508 timeout = 100; /* 10 mSec max (100*100uS) */
510 val = readl(&priv->reg->autocalsts);
512 } while ((val & AUTO_CAL_ACTIVE) && --timeout);
513 val = readl(&priv->reg->autocalsts);
514 debug("%s: Final AUTO_CAL_STATUS = 0x%08X, timeout = %d\n",
515 __func__, val, timeout);
517 /* Re-enable SD Clock Enable when auto-cal is done */
518 clk_con |= TEGRA_MMC_CLKCON_SD_CLOCK_ENABLE;
519 writew(clk_con, &priv->reg->clkcon);
520 clk_con = readw(&priv->reg->clkcon);
521 debug("%s: final CLOCK_CONTROL = 0x%04X\n", __func__, clk_con);
524 printf("%s: Warning: Autocal timed out!\n", __func__);
525 /* TBD: Set CFG2TMC_SDMMC1_PAD_CAL_DRV* regs here */
528 #if defined(CONFIG_TEGRA210)
529 u32 tap_value, trim_value;
531 /* Set tap/trim values for SDMMC1/3 @ <48MHz here */
532 val = readl(&priv->reg->venspictl); /* aka VENDOR_SYS_SW_CNTL */
533 val &= IO_TRIM_BYPASS_MASK;
534 if (id == PERIPH_ID_SDMMC1) {
535 tap_value = 4; /* default */
539 } else { /* SDMMC3 */
544 val = readl(&priv->reg->venclkctl);
545 val &= ~TRIM_VAL_MASK;
546 val |= (trim_value << TRIM_VAL_SHIFT);
547 val &= ~TAP_VAL_MASK;
548 val |= (tap_value << TAP_VAL_SHIFT);
549 writel(val, &priv->reg->venclkctl);
550 debug("%s: VENDOR_CLOCK_CNTRL = 0x%08X\n", __func__, val);
552 #endif /* T30/T210 */
555 static void tegra_mmc_reset(struct tegra_mmc_priv *priv, struct mmc *mmc)
557 unsigned int timeout;
558 debug(" mmc_reset called\n");
561 * RSTALL[0] : Software reset for all
565 writeb(TEGRA_MMC_SWRST_SW_RESET_FOR_ALL, &priv->reg->swrst);
569 /* Wait max 100 ms */
572 /* hw clears the bit when it's done */
573 while (readb(&priv->reg->swrst) & TEGRA_MMC_SWRST_SW_RESET_FOR_ALL) {
575 printf("%s: timeout error\n", __func__);
582 /* Set SD bus voltage & enable bus power */
583 tegra_mmc_set_power(priv, fls(mmc->cfg->voltages) - 1);
584 debug("%s: power control = %02X, host control = %02X\n", __func__,
585 readb(&priv->reg->pwrcon), readb(&priv->reg->hostctl));
587 /* Make sure SDIO pads are set up */
588 tegra_mmc_pad_init(priv);
591 static int tegra_mmc_init(struct udevice *dev)
593 struct tegra_mmc_priv *priv = dev_get_priv(dev);
594 struct mmc *mmc = mmc_get_mmc_dev(dev);
596 debug(" tegra_mmc_init called\n");
598 #if defined(CONFIG_TEGRA210)
599 priv->mmc_id = clock_decode_periph_id(dev);
600 if (priv->mmc_id == PERIPH_ID_NONE) {
601 printf("%s: Missing/invalid peripheral ID\n", __func__);
605 tegra_mmc_reset(priv, mmc);
607 #if defined(CONFIG_TEGRA124_MMC_DISABLE_EXT_LOOPBACK)
609 * Disable the external clock loopback and use the internal one on
610 * SDMMC3 as per the SDMMC_VENDOR_MISC_CNTRL_0 register's SDMMC_SPARE1
611 * bits being set to 0xfffd according to the TRM.
614 * approach once proper kernel integration made it mainline.
616 if (priv->reg == (void *)0x700b0400) {
617 mask = readl(&priv->reg->venmiscctl);
618 mask &= ~TEGRA_MMC_MISCON_ENABLE_EXT_LOOPBACK;
619 writel(mask, &priv->reg->venmiscctl);
623 priv->version = readw(&priv->reg->hcver);
624 debug("host version = %x\n", priv->version);
627 writel(0xffffffff, &priv->reg->norintstsen);
628 writel(0xffffffff, &priv->reg->norintsigen);
630 writeb(0xe, &priv->reg->timeoutcon); /* TMCLK * 2^27 */
632 * NORMAL Interrupt Status Enable Register init
633 * [5] ENSTABUFRDRDY : Buffer Read Ready Status Enable
634 * [4] ENSTABUFWTRDY : Buffer write Ready Status Enable
635 * [3] ENSTADMAINT : DMA boundary interrupt
636 * [1] ENSTASTANSCMPLT : Transfre Complete Status Enable
637 * [0] ENSTACMDCMPLT : Command Complete Status Enable
639 mask = readl(&priv->reg->norintstsen);
641 mask |= (TEGRA_MMC_NORINTSTSEN_CMD_COMPLETE |
642 TEGRA_MMC_NORINTSTSEN_XFER_COMPLETE |
643 TEGRA_MMC_NORINTSTSEN_DMA_INTERRUPT |
644 TEGRA_MMC_NORINTSTSEN_BUFFER_WRITE_READY |
645 TEGRA_MMC_NORINTSTSEN_BUFFER_READ_READY);
646 writel(mask, &priv->reg->norintstsen);
649 * NORMAL Interrupt Signal Enable Register init
650 * [1] ENSTACMDCMPLT : Transfer Complete Signal Enable
652 mask = readl(&priv->reg->norintsigen);
654 mask |= TEGRA_MMC_NORINTSIGEN_XFER_COMPLETE;
655 writel(mask, &priv->reg->norintsigen);
660 static int tegra_mmc_getcd(struct udevice *dev)
662 struct tegra_mmc_priv *priv = dev_get_priv(dev);
664 debug("tegra_mmc_getcd called\n");
666 if (dm_gpio_is_valid(&priv->cd_gpio))
667 return dm_gpio_get_value(&priv->cd_gpio);
672 static const struct dm_mmc_ops tegra_mmc_ops = {
673 .send_cmd = tegra_mmc_send_cmd,
674 .set_ios = tegra_mmc_set_ios,
675 .get_cd = tegra_mmc_getcd,
678 static int tegra_mmc_probe(struct udevice *dev)
680 struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
681 struct tegra_mmc_plat *plat = dev_get_platdata(dev);
682 struct tegra_mmc_priv *priv = dev_get_priv(dev);
683 struct mmc_config *cfg = &plat->cfg;
686 cfg->name = dev->name;
688 bus_width = dev_read_u32_default(dev, "bus-width", 1);
690 cfg->voltages = MMC_VDD_32_33 | MMC_VDD_33_34 | MMC_VDD_165_195;
693 cfg->host_caps |= MMC_MODE_8BIT;
695 cfg->host_caps |= MMC_MODE_4BIT;
696 cfg->host_caps |= MMC_MODE_HS_52MHz | MMC_MODE_HS;
699 * min freq is for card identification, and is the highest
700 * low-speed SDIO card frequency (actually 400KHz)
701 * max freq is highest HS eMMC clock as per the SD/MMC spec
705 cfg->f_max = 48000000;
707 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
709 priv->reg = (void *)dev_read_addr(dev);
711 ret = reset_get_by_name(dev, "sdhci", &priv->reset_ctl);
713 debug("reset_get_by_name() failed: %d\n", ret);
716 ret = clk_get_by_index(dev, 0, &priv->clk);
718 debug("clk_get_by_index() failed: %d\n", ret);
722 ret = reset_assert(&priv->reset_ctl);
725 ret = clk_enable(&priv->clk);
728 ret = clk_set_rate(&priv->clk, 20000000);
729 if (IS_ERR_VALUE(ret))
731 ret = reset_deassert(&priv->reset_ctl);
735 /* These GPIOs are optional */
736 gpio_request_by_name(dev, "cd-gpios", 0, &priv->cd_gpio, GPIOD_IS_IN);
737 gpio_request_by_name(dev, "wp-gpios", 0, &priv->wp_gpio, GPIOD_IS_IN);
738 gpio_request_by_name(dev, "power-gpios", 0, &priv->pwr_gpio,
740 if (dm_gpio_is_valid(&priv->pwr_gpio))
741 dm_gpio_set_value(&priv->pwr_gpio, 1);
743 upriv->mmc = &plat->mmc;
745 return tegra_mmc_init(dev);
748 static int tegra_mmc_bind(struct udevice *dev)
750 struct tegra_mmc_plat *plat = dev_get_platdata(dev);
752 return mmc_bind(dev, &plat->mmc, &plat->cfg);
755 static const struct udevice_id tegra_mmc_ids[] = {
756 { .compatible = "nvidia,tegra20-sdhci" },
757 { .compatible = "nvidia,tegra30-sdhci" },
758 { .compatible = "nvidia,tegra114-sdhci" },
759 { .compatible = "nvidia,tegra124-sdhci" },
760 { .compatible = "nvidia,tegra210-sdhci" },
761 { .compatible = "nvidia,tegra186-sdhci" },
765 U_BOOT_DRIVER(tegra_mmc_drv) = {
768 .of_match = tegra_mmc_ids,
769 .bind = tegra_mmc_bind,
770 .probe = tegra_mmc_probe,
771 .ops = &tegra_mmc_ops,
772 .platdata_auto_alloc_size = sizeof(struct tegra_mmc_plat),
773 .priv_auto_alloc_size = sizeof(struct tegra_mmc_priv),