diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-06-21 16:12:46 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2016-07-25 11:34:22 +0300 |
commit | 1b8d79c5494484d140f2a19101412b51e2d5f6b5 (patch) | |
tree | 83b19b871e56b507ce55102e4b99098ff3aeedae /drivers/mmc/core | |
parent | 2801b95e8ff0fc24d7708a67bb98902dad197635 (diff) | |
download | linux-1b8d79c5494484d140f2a19101412b51e2d5f6b5.tar.xz |
mmc: core: Allow hosts to specify non-support for SD commands
There are host drivers which needs to valdiate for non-supported SD
commands and returnn error code for such requests.
To improve and simplify the behaviour, let's invent MMC_CAP2_NO_SD
which these host drivers can set to tell the mmc core to skip sending SD
commands during card initialization.
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/core.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 1d24b3ad2a5d..4c823df8deb4 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -2498,15 +2498,18 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq) mmc_go_idle(host); - mmc_send_if_cond(host, host->ocr_avail); + if (!(host->caps2 & MMC_CAP2_NO_SD)) + mmc_send_if_cond(host, host->ocr_avail); /* Order's important: probe SDIO, then SD, then MMC */ if (!(host->caps2 & MMC_CAP2_NO_SDIO)) if (!mmc_attach_sdio(host)) return 0; - if (!mmc_attach_sd(host)) - return 0; + if (!(host->caps2 & MMC_CAP2_NO_SD)) + if (!mmc_attach_sd(host)) + return 0; + if (!mmc_attach_mmc(host)) return 0; |