diff options
author | Masahiro Yamada <yamada.masahiro@socionext.com> | 2016-08-25 16:07:37 +0900 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2016-09-20 06:46:01 +0900 |
commit | 15bd09959fddd2782484683818bf05fb154237cb (patch) | |
tree | ea40aa90af58de7d71727c0ad3dc250041183f76 /drivers | |
parent | 3137e645e2f697df88dca08b7631c6363093bcf4 (diff) | |
download | u-boot-imx-15bd09959fddd2782484683818bf05fb154237cb.zip u-boot-imx-15bd09959fddd2782484683818bf05fb154237cb.tar.gz u-boot-imx-15bd09959fddd2782484683818bf05fb154237cb.tar.bz2 |
mmc: sdhci: move SDMA capability check 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')
-rw-r--r-- | drivers/mmc/sdhci.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index c66151c..da73653 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -519,6 +519,14 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host, u32 caps; caps = sdhci_readl(host, SDHCI_CAPABILITIES); + +#ifdef CONFIG_MMC_SDMA + if (!(caps & SDHCI_CAN_DO_SDMA)) { + printf("%s: Your controller doesn't support SDMA!!\n", + __func__); + return -EINVAL; + } +#endif host->version = sdhci_readw(host, SDHCI_HOST_VERSION); cfg->name = host->name; @@ -585,17 +593,6 @@ int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk) { int ret; -#ifdef CONFIG_MMC_SDMA - unsigned int caps; - - caps = sdhci_readl(host, SDHCI_CAPABILITIES); - if (!(caps & SDHCI_CAN_DO_SDMA)) { - printf("%s: Your controller doesn't support SDMA!!\n", - __func__); - return -1; - } -#endif - ret = sdhci_setup_cfg(&host->cfg, host, max_clk, min_clk); if (ret) return ret; |