Lines Matching refs:mmc
172 timeout /= host->mmc->bus_width; in dwmci_get_drto()
174 timeout /= (host->mmc->clock / 1000); /* counting in msec */ in dwmci_get_drto()
192 host->mmc->clock); in dwmci_get_cto()
357 struct mmc *mmc = mmc_get_mmc_dev(dev); local
359 static int dwmci_send_cmd(struct mmc *mmc, struct mmc_cmd *cmd,
363 struct dwmci_host *host = mmc->priv;
502 struct mmc *mmc = mmc_get_mmc_dev(dev); local
504 static int dwmci_send_cmd_prepare(struct mmc *mmc, struct mmc_cmd *cmd,
508 struct dwmci_host *host = mmc->priv;
517 mmc_idmac = dev_read_u32_default(mmc->dev, "mmc-idmac", 0);
701 struct mmc *mmc = mmc_get_mmc_dev(dev); local
703 static bool dwmci_card_busy(struct mmc *mmc)
707 struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
721 struct mmc *mmc = mmc_get_mmc_dev(dev); local
723 static int dwmci_execute_tuning(struct mmc *mmc, u32 opcode)
726 struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
737 struct mmc *mmc = mmc_get_mmc_dev(dev); local
739 static int dwmci_set_ios(struct mmc *mmc)
742 struct dwmci_host *host = (struct dwmci_host *)mmc->priv;
745 debug("Buswidth = %d, clock: %d\n", mmc->bus_width, mmc->clock);
747 dwmci_setup_bus(host, mmc->clock);
748 switch (mmc->bus_width) {
763 if (mmc_card_ddr(mmc))
776 static int dwmci_init(struct mmc *mmc) argument
778 struct dwmci_host *host = mmc->priv;
786 if (mmc_getcd(mmc) == 1 &&
787 !gpio_request_by_name(mmc->dev, "pwr-en-gpios", 0, &pwr_en_gpio, GPIOD_IS_OUT)) {
789 pinctrl_select_state(mmc->dev, "idle");
790 delay_ms = dev_read_u32_default(mmc->dev, "power-off-delay-ms", 200);
793 pinctrl_select_state(mmc->dev, "default");
794 dm_gpio_free(mmc->dev, &pwr_en_gpio);
828 dwmci_setup_bus(host, mmc->cfg->f_min);
858 struct mmc *mmc = mmc_get_mmc_dev(dev); local
859 struct dwmci_host *host = mmc->priv;
882 struct mmc *mmc = mmc_get_mmc_dev(dev); local
884 return dwmci_init(mmc);
945 int dwmci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg) argument
947 return mmc_bind(dev, mmc, cfg);
954 host->mmc = mmc_create(&host->cfg, host);
955 if (host->mmc == NULL)