summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2020-01-30 18:04:47 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2020-02-03 09:16:10 +0100
commit88d2f57064e46854ceecede4093fc504597f3c9d (patch)
tree8121b5254f937817d119d2573f3f6e0b750dface
parentea7d1fd1c68c33906dd77c6d6f85316594862cf8 (diff)
downloadbarebox-88d2f57064e46854ceecede4093fc504597f3c9d.tar.gz
barebox-88d2f57064e46854ceecede4093fc504597f3c9d.tar.xz
mci: core: don't test 4-bit-buswidth support if MMC host lacks capability
We already check for MMC_CAP_8_BIT_DATA before trying if buswidth=8 yields legible data. For consistency, don't test whether buswidth=4 works if the MMC host doesn't indicated MMC_CAP_4_BIT_DATA. Fixes: 68db956d ("mci: Fix 8 bit mmc cards") Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--drivers/mci/mci-core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 67257bcd18..dd163c3d16 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1025,6 +1025,9 @@ static int mci_startup_mmc(struct mci *mci)
mci_set_clock(mci, mci->tran_speed);
+ if (!(host->host_caps & (MMC_CAP_4_BIT_DATA | MMC_CAP_8_BIT_DATA)))
+ return 0;
+
/*
* Unlike SD, MMC cards dont have a configuration register to notify
* supported bus width. So bus test command should be run to identify