diff options
| -rw-r--r-- | drivers/mmc/Kconfig | 1 | ||||
| -rw-r--r-- | drivers/mmc/mmc-uclass.c | 9 | ||||
| -rw-r--r-- | drivers/mmc/mmc.c | 13 |
3 files changed, 13 insertions, 10 deletions
diff --git a/drivers/mmc/Kconfig b/drivers/mmc/Kconfig index 4c46df0ffb8..39caf2eff1b 100644 --- a/drivers/mmc/Kconfig +++ b/drivers/mmc/Kconfig @@ -91,6 +91,7 @@ config MMC_SPI_CRC_ON bool "Support CRC for SPI-based MMC controller" depends on MMC_SPI default y + select CRC16 help This enables CRC for SPI-based MMC controllers. diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index bf0bea93853..2f4dc5bd887 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -243,13 +243,8 @@ int mmc_of_parse(struct udevice *dev, struct mmc_config *cfg) return -EINVAL; } - /* - * Maximum frequency is obtained from the optional "max-frequency" property. - * If not specified in device tree, defaults to 0 and sdhci_setup_cfg() - * will set the MMC configuration maximum frequency to the host controller's - * maximum base clock frequency from capabilities register. - */ - cfg->f_max = dev_read_u32_default(dev, "max-frequency", 0); + /* f_max is obtained from the optional "max-frequency" property */ + dev_read_u32(dev, "max-frequency", &cfg->f_max); if (dev_read_bool(dev, "cap-sd-highspeed")) cfg->host_caps |= MMC_CAP(SD_HS); diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index bf82c515600..71664173016 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2933,11 +2933,18 @@ static int mmc_power_cycle(struct mmc *mmc) return ret; /* - * SD spec recommends at least 1ms of delay. Let's wait for 2ms - * to be on the safer side. + * SD spec recommends at least 1ms of 'power on' delay. + * Let's wait for 2ms to be on the safer side. */ udelay(2000); - return mmc_power_on(mmc); + ret = mmc_power_on(mmc); + + /* + * SD spec recommends at least 1ms of 'stable supply voltage' delay. + * Let's wait for 2ms to be on the safer side. + */ + udelay(2000); + return ret; } int mmc_get_op_cond(struct mmc *mmc, bool quiet) |
