aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc
diff options
context:
space:
mode:
authorGiuseppe CAVALLARO <peppe.cavallaro@st.com>2013-06-12 02:16:38 -0400
committerChris Ball <cjb@laptop.org>2013-06-27 12:39:24 -0400
commit156e14b126ffb6f040bc6f1aff3c51077e42a744 (patch)
treec023d6e8432e3e85a96a43bf93c522dc00f316a0 /drivers/mmc
parent0dcaa2499b7d111bd70da5b0976c34210c850fb3 (diff)
mmc: sdhci: fix caps2 for HS200
Although the HC supports HS200 (eMMC) the caps2 are always zero; this means there's no way to use the super speed mode (when init the card). If the HC support SDR104, for SD3.0, so it also supports HS200 for eMMC and this patch just sets the MMC_CAP2_HS200 in the host caps2 field. Reported-by: Youssef Triki <youssef.triki@st.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> 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.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c
index eadb3adf446e..9bd6ab203843 100644
--- a/drivers/mmc/host/sdhci.c
+++ b/drivers/mmc/host/sdhci.c
@@ -1863,7 +1863,7 @@ static int sdhci_execute_tuning(struct mmc_host *mmc, u32 opcode)
1863 */ 1863 */
1864 if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR50) && 1864 if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR50) &&
1865 (host->flags & SDHCI_SDR50_NEEDS_TUNING || 1865 (host->flags & SDHCI_SDR50_NEEDS_TUNING ||
1866 host->flags & SDHCI_HS200_NEEDS_TUNING)) 1866 host->flags & SDHCI_SDR104_NEEDS_TUNING))
1867 requires_tuning_nonuhs = true; 1867 requires_tuning_nonuhs = true;
1868 1868
1869 if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR104) || 1869 if (((ctrl & SDHCI_CTRL_UHS_MASK) == SDHCI_CTRL_UHS_SDR104) ||
@@ -2994,9 +2994,13 @@ int sdhci_add_host(struct sdhci_host *host)
2994 mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25; 2994 mmc->caps |= MMC_CAP_UHS_SDR12 | MMC_CAP_UHS_SDR25;
2995 2995
2996 /* SDR104 supports also implies SDR50 support */ 2996 /* SDR104 supports also implies SDR50 support */
2997 if (caps[1] & SDHCI_SUPPORT_SDR104) 2997 if (caps[1] & SDHCI_SUPPORT_SDR104) {
2998 mmc->caps |= MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50; 2998 mmc->caps |= MMC_CAP_UHS_SDR104 | MMC_CAP_UHS_SDR50;
2999 else if (caps[1] & SDHCI_SUPPORT_SDR50) 2999 /* SD3.0: SDR104 is supported so (for eMMC) the caps2
3000 * field can be promoted to support HS200.
3001 */
3002 mmc->caps2 |= MMC_CAP2_HS200;
3003 } else if (caps[1] & SDHCI_SUPPORT_SDR50)
3000 mmc->caps |= MMC_CAP_UHS_SDR50; 3004 mmc->caps |= MMC_CAP_UHS_SDR50;
3001 3005
3002 if (caps[1] & SDHCI_SUPPORT_DDR50) 3006 if (caps[1] & SDHCI_SUPPORT_DDR50)
@@ -3006,9 +3010,9 @@ int sdhci_add_host(struct sdhci_host *host)
3006 if (caps[1] & SDHCI_USE_SDR50_TUNING) 3010 if (caps[1] & SDHCI_USE_SDR50_TUNING)
3007 host->flags |= SDHCI_SDR50_NEEDS_TUNING; 3011 host->flags |= SDHCI_SDR50_NEEDS_TUNING;
3008 3012
3009 /* Does the host need tuning for HS200? */ 3013 /* Does the host need tuning for SDR104 / HS200? */
3010 if (mmc->caps2 & MMC_CAP2_HS200) 3014 if (mmc->caps2 & MMC_CAP2_HS200)
3011 host->flags |= SDHCI_HS200_NEEDS_TUNING; 3015 host->flags |= SDHCI_SDR104_NEEDS_TUNING;
3012 3016
3013 /* Driver Type(s) (A, C, D) supported by the host */ 3017 /* Driver Type(s) (A, C, D) supported by the host */
3014 if (caps[1] & SDHCI_DRIVER_TYPE_A) 3018 if (caps[1] & SDHCI_DRIVER_TYPE_A)