Lines Matching refs:mmc
141 struct mmc *mmc = mmc_get_mmc_dev(dev); local
144 static int sdhci_send_command(struct mmc *mmc, struct mmc_cmd *cmd,
148 struct sdhci_host *host = mmc->priv;
154 int mmc_dev = mmc_get_blk_desc(mmc)->devnum;
446 u32 timing = host->mmc->timing;
480 struct mmc *mmc = mmc_get_mmc_dev(dev); local
482 static bool sdhci_card_busy(struct mmc *mmc)
485 struct sdhci_host *host = mmc->priv;
497 struct mmc *mmc = mmc_get_mmc_dev(dev); local
499 static int sdhci_set_ios(struct mmc *mmc)
503 struct sdhci_host *host = mmc->priv;
508 if (mmc->clock != host->clock) {
510 host->ops->set_clock(host, mmc->clock);
512 sdhci_set_clock(host, mmc->clock);
517 if (mmc->bus_width == 8) {
526 if (mmc->bus_width == 4)
532 if (!(mmc->timing == MMC_TIMING_LEGACY) &&
540 if ((mmc->timing != MMC_TIMING_LEGACY) &&
541 (mmc->timing != MMC_TIMING_MMC_HS) &&
542 (mmc->timing != MMC_TIMING_SD_HS))
554 static int sdhci_init(struct mmc *mmc) argument
556 struct sdhci_host *host = mmc->priv;
569 sdhci_set_power(host, fls(mmc->cfg->voltages) - 1);
596 host->mmc->bus_width == MMC_BUS_WIDTH_8BIT)
610 return sdhci_send_command(host->mmc->dev, &cmd, NULL);
612 return sdhci_send_command(host->mmc, &cmd, NULL);
649 struct mmc *mmc = mmc_get_mmc_dev(dev); local
651 static int sdhci_execute_tuning(struct mmc *mmc, u32 opcode)
654 struct sdhci_host *host = mmc->priv;
664 switch (mmc->timing) {
688 struct mmc *mmc = mmc_get_mmc_dev(dev); local
690 return sdhci_init(mmc);
695 struct mmc *mmc = mmc_get_mmc_dev(dev); local
696 struct sdhci_host *host = mmc->priv;
809 int sdhci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg) argument
811 return mmc_bind(dev, mmc, cfg);
822 host->mmc = mmc_create(&host->cfg, host);
823 if (host->mmc == NULL) {