diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-08-25 16:07:36 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-09-20 06:46:01 +0900 |
commit | 3137e645e2f697df88dca08b7631c6363093bcf4 (patch) | |
tree | 2aa5890c2223de932d0c0d584eacd378366669cf /drivers/mmc | |
parent | 6c67954c93ea09bccc5bbc984ff60a2c28eeb733 (diff) | |
download | u-boot-imx-3137e645e2f697df88dca08b7631c6363093bcf4.zip u-boot-imx-3137e645e2f697df88dca08b7631c6363093bcf4.tar.gz u-boot-imx-3137e645e2f697df88dca08b7631c6363093bcf4.tar.bz2 |
mmc: sdhci: move broken voltage quirk handling to sdhci_setup_cfg()
If CONFIG_BLK is enabled, add_sdhci() is never called. Move this
quirk handling to sdhci_setup_cfg(), which is now the central place
for hardware capability checks.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/sdhci.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index d886777..c66151c 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -557,6 +557,9 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, if (caps & SDHCI_CAN_VDD_180) cfg->voltages |= MMC_VDD_165_195; + if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE) + cfg->voltages |= host->voltages; + cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT; if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { if (caps & SDHCI_CAN_DO_8BIT) @@ -597,9 +600,6 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) if (ret) return ret; - if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE) - host->cfg.voltages |= host->voltages; - host->mmc = mmc_create(&host->cfg, host); if (host->mmc == NULL) { printf("%s: mmc create fail!\n", __func__); |