summaryrefslogtreecommitdiff
path: root/drivers/mmc
diff options
context:
space:
mode:
authorShawn Lin <shawn.lin@rock-chips.com>2016-07-01 10:45:28 +0300
committerUlf Hansson <ulf.hansson@linaro.org>2016-07-25 11:34:47 +0300
commita0c3b68c72a355f5dab33c3ddcd257e5a718de0c (patch)
tree4a571c7a8f641773e4eb18110c1d821c8aa4d476 /drivers/mmc
parent39f80bcb0eed20e08090f8b6ed10a0709f1ae36d (diff)
downloadlinux-a0c3b68c72a355f5dab33c3ddcd257e5a718de0c.tar.xz
mmc: core: Allow hosts to specify non-support for MMC commands
Host drivers which needs to valdiate for non-supported MMC commands and returnn error code for such requests. To improve and simplify the behaviour, let's invent MMC_CAP2_NO_MMC which these host drivers can set to tell the mmc core to skip sending MMC commands during card initialization. Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/core/core.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c
index 4c823df8deb4..94cbf4e170e3 100644
--- a/drivers/mmc/core/core.c
+++ b/drivers/mmc/core/core.c
@@ -2510,8 +2510,9 @@ static int mmc_rescan_try_freq(struct mmc_host *host, unsigned freq)
if (!mmc_attach_sd(host))
return 0;
- if (!mmc_attach_mmc(host))
- return 0;
+ if (!(host->caps2 & MMC_CAP2_NO_MMC))
+ if (!mmc_attach_mmc(host))
+ return 0;
mmc_power_off(host);
return -EIO;