diff options
author | Alexandre Belloni <alexandre.belloni@free-electrons.com> | 2014-12-17 13:32:06 -0500 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2014-12-29 08:49:28 -0500 |
commit | 1c2d26e379fc8d37d55befd8589c4c252186ee58 (patch) | |
tree | b6ba8f25be8afaf93ae1cecb3f57ff6f56840ba5 /drivers/mmc/core | |
parent | 97bf6af1f928216fd6c5a66e8a57bfa95a659672 (diff) |
mmc: core: stop trying to switch width when only one bit is supported
mmc_select_bus_width() will try to switch to MMC_BUS_WIDTH_4 even if
MMC_CAP_4_BIT_DATA and MMC_CAP_8_BIT_DATA are not set in host->caps.
Return as soon as possible when those flags are not set
Fixes: 577fb13199b1 (mmc: rework selection of bus speed mode)
Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
Cc: <stable@vger.kernel.org> # 3.17
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/core')
-rw-r--r-- | drivers/mmc/core/mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c index 02ad79229f65..7466ce098e60 100644 --- a/drivers/mmc/core/mmc.c +++ b/drivers/mmc/core/mmc.c | |||
@@ -886,7 +886,7 @@ static int mmc_select_bus_width(struct mmc_card *card) | |||
886 | unsigned idx, bus_width = 0; | 886 | unsigned idx, bus_width = 0; |
887 | int err = 0; | 887 | int err = 0; |
888 | 888 | ||
889 | if (!mmc_can_ext_csd(card) && | 889 | if (!mmc_can_ext_csd(card) || |
890 | !(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) | 890 | !(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA))) |
891 | return 0; | 891 | return 0; |
892 | 892 | ||