aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorDaniel Drake <dsd@laptop.org>2012-11-25 13:01:19 -0500
committerChris Ball <cjb@laptop.org>2012-12-06 13:55:04 -0500
commit6a66180a252f5856fc25de69c6313831f343f50f (patch)
treee25b03a4cde9e28b229c6ff5418aa93b6ed08d11 /drivers/mmc
parentb0afd8f68adf6a9b671b0420ab9116a36409ef7f (diff)
mmc: sdhci: add quirk for lack of 1.8v support
The OLPC XO-1.75 laptop includes a SDHCI controller which is 1.8v capable, and it truthfully reports so in its capabilities. This alternate voltage is used for driving new "UHS-I" SD cards at their full speed. However, what the controller doesn't know is that the motherboard physically doesn't have a 1.8v supply available. Add a quirk so that systems such as this one can override disable 1.8v support, adding support for UHS-I cards (by running them at 3.3v). This avoids a problem where the system would first try to run the card at 1.8v, fail, and then not be able to fully reset the card to retry at the normal 3.3v voltage. This is more appropriate than using the MISSING_CAPS quirk, which is intended for cases where the SDHCI controller is actually lying about its capabilities, and would force us to somehow override both caps words from another source. Signed-off-by: Daniel Drake <dsd@laptop.org> Reviewed-by: Philip Rakity <prakity@nvidia.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r--drivers/mmc/host/sdhci.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index ec3e984129dc..f78c5b1329eb 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -2867,6 +2867,10 @@ int sdhci_add_host(struct sdhci_host *host)
2867 SDHCI_SUPPORT_DDR50); 2867 SDHCI_SUPPORT_DDR50);
2868 } 2868 }
2869 2869
2870 if (host->quirks2 & SDHCI_QUIRK2_NO_1_8_V)
2871 caps[1] &= ~(SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
2872 SDHCI_SUPPORT_DDR50);
2873
2870 /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */ 2874 /* Any UHS-I mode in caps implies SDR12 and SDR25 support. */
2871 if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 | 2875 if (caps[1] & (SDHCI_SUPPORT_SDR104 | SDHCI_SUPPORT_SDR50 |
2872 SDHCI_SUPPORT_DDR50)) 2876 SDHCI_SUPPORT_DDR50))