diff mbox

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

Message ID 1484730271-21944-10-git-send-email-sivadur@xilinx.com
State Changes Requested
Delegated to: Jaehoon Chung
Headers show

Commit Message

Siva Durga Prasad Paladugu Jan. 18, 2017, 9:04 a.m. UTC
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@xilinx.com>
---
 drivers/mmc/sdhci.c | 3 ++-
 include/sdhci.h     | 1 +
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

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;