[U-Boot] [PATCH 09/12] mmc: sdhci: Add quirk for 1.8v switching not supported

Siva Durga Prasad Paladugu siva.durga.paladugu at xilinx.com
Wed Jan 18 10:04:28 CET 2017


Add quirk if voltage switching to 1.8v is broken, in this
case no UHS modes were supported

Signed-off-by: Siva Durga Prasad Paladugu <sivadur at xilinx.com>
---
 drivers/mmc/sdhci.c | 3 ++-
 include/sdhci.h     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c
index a2fcf18..4f29ba1 100644
--- a/drivers/mmc/sdhci.c
+++ b/drivers/mmc/sdhci.c
@@ -749,7 +749,8 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
 				SDHCI_CLOCK_MUL_SHIFT;
 	}
 
-	if (!(cfg->voltages & MMC_VDD_165_195))
+	if (!(cfg->voltages & MMC_VDD_165_195) ||
+	    (host->quirks & SDHCI_QUIRK_NO_1_8_V))
 		caps_1 &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
 			    SDHCI_SUPPORT_DDR50);
 
diff --git a/include/sdhci.h b/include/sdhci.h
index c00beb8..037a2d3 100644
--- a/include/sdhci.h
+++ b/include/sdhci.h
@@ -228,6 +228,7 @@
 #define SDHCI_QUIRK_BROKEN_VOLTAGE	(1 << 4)
 #define SDHCI_QUIRK_WAIT_SEND_CMD	(1 << 6)
 #define SDHCI_QUIRK_USE_WIDE8		(1 << 8)
+#define SDHCI_QUIRK_NO_1_8_V		(1 << 9)
 
 /* to make gcc happy */
 struct sdhci_host;
-- 
2.7.4



More information about the U-Boot mailing list