aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2013-06-13 10:41:28 -0400
committerNitin Garg <nitin.garg@freescale.com>2014-04-16 09:47:08 -0400
commitdb38e54b7a63df0dcf30e1621615c447548c81b1 (patch)
tree35abce936c5f76eb0829adc2ae2408dfa459d82e /drivers/mmc
parent4bfad58f4f69239aef549d3d23832dabe3120119 (diff)
mmc: sdhci: fix ctrl_2 on super-speed selection
This patch fixes the HC ctrl_2 programming where, in case of SDR104 and HS200, we have to write 100b in the the UHS Mode bits. We wrote 101b that is reserved from Arasan Specs. Reported-by: Youssef Triki <youssef.triki@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: Chris Ball <cjb@laptop.org> (cherry picked from commit 599115686d8f62999a871f7d7ee87de3b939b258)
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index 577b698376e8..c229bb5f76e4 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1549,16 +1549,15 @@ static void sdhci_do_set_ios(struct sdhci_host *host, struct mmc_ios *ios)
1549 ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2); 1549 ctrl_2 = sdhci_readw(host, SDHCI_HOST_CONTROL2);
1550 /* Select Bus Speed Mode for host */ 1550 /* Select Bus Speed Mode for host */
1551 ctrl_2 &= ~SDHCI_CTRL_UHS_MASK; 1551 ctrl_2 &= ~SDHCI_CTRL_UHS_MASK;
1552 if (ios->timing == MMC_TIMING_MMC_HS200) 1552 if ((ios->timing == MMC_TIMING_MMC_HS200) ||
1553 ctrl_2 |= SDHCI_CTRL_HS_SDR200; 1553 (ios->timing == MMC_TIMING_UHS_SDR104))
1554 ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
1554 else if (ios->timing == MMC_TIMING_UHS_SDR12) 1555 else if (ios->timing == MMC_TIMING_UHS_SDR12)
1555 ctrl_2 |= SDHCI_CTRL_UHS_SDR12; 1556 ctrl_2 |= SDHCI_CTRL_UHS_SDR12;
1556 else if (ios->timing == MMC_TIMING_UHS_SDR25) 1557 else if (ios->timing == MMC_TIMING_UHS_SDR25)
1557 ctrl_2 |= SDHCI_CTRL_UHS_SDR25; 1558 ctrl_2 |= SDHCI_CTRL_UHS_SDR25;
1558 else if (ios->timing == MMC_TIMING_UHS_SDR50) 1559 else if (ios->timing == MMC_TIMING_UHS_SDR50)
1559 ctrl_2 |= SDHCI_CTRL_UHS_SDR50; 1560 ctrl_2 |= SDHCI_CTRL_UHS_SDR50;
1560 else if (ios->timing == MMC_TIMING_UHS_SDR104)
1561 ctrl_2 |= SDHCI_CTRL_UHS_SDR104;
1562 else if (ios->timing == MMC_TIMING_UHS_DDR50) 1561 else if (ios->timing == MMC_TIMING_UHS_DDR50)
1563 ctrl_2 |= SDHCI_CTRL_UHS_DDR50; 1562 ctrl_2 |= SDHCI_CTRL_UHS_DDR50;
1564 sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2); 1563 sdhci_writew(host, ctrl_2, SDHCI_HOST_CONTROL2);