Skip to content

Commit

Permalink
mmc: core: stop trying to switch width when only one bit is supported
Browse files Browse the repository at this point in the history
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: 577fb13 (mmc: rework selection of bus speed mode)
Signed-off-by: Alexandre Belloni <[email protected]>
Cc: <[email protected]> # 3.17
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
alexandrebelloni authored and storulf committed Dec 29, 2014
1 parent 97bf6af commit 1c2d26e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -886,7 +886,7 @@ static int mmc_select_bus_width(struct mmc_card *card)
unsigned idx, bus_width = 0;
int err = 0;

if (!mmc_can_ext_csd(card) &&
if (!mmc_can_ext_csd(card) ||
!(host->caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)))
return 0;

Expand Down

0 comments on commit 1c2d26e

Please sign in to comment.