]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mmc/host/sh_mobile_sdhi.c
mmc: sh_mobile_sdhi: enable HS200
[karo-tx-linux.git] / drivers / mmc / host / sh_mobile_sdhi.c
index b30c7f7f988c7ffd0517aea05c5a9438a184cc25..59db14b4827c332ae13209dcd65bdca25d6d8da9 100644 (file)
@@ -335,9 +335,6 @@ static unsigned int sh_mobile_sdhi_init_tuning(struct tmio_mmc_host *host)
 {
        struct sh_mobile_sdhi *priv;
 
-       if (!(host->mmc->caps & MMC_CAP_UHS_SDR104))
-               return 0;
-
        priv = host_to_priv(host);
 
        /* set sampling clock selection range */
@@ -444,12 +441,7 @@ static int sh_mobile_sdhi_select_tuning(struct tmio_mmc_host *host)
 
 static bool sh_mobile_sdhi_check_scc_error(struct tmio_mmc_host *host)
 {
-       struct sh_mobile_sdhi *priv;
-
-       if (!(host->mmc->caps & MMC_CAP_UHS_SDR104))
-               return 0;
-
-       priv = host_to_priv(host);
+       struct sh_mobile_sdhi *priv = host_to_priv(host);
 
        /* Check SCC error */
        if (sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL) &
@@ -468,9 +460,6 @@ static void sh_mobile_sdhi_hw_reset(struct tmio_mmc_host *host)
 {
        struct sh_mobile_sdhi *priv;
 
-       if (!(host->mmc->caps & MMC_CAP_UHS_SDR104))
-               return;
-
        priv = host_to_priv(host);
 
        /* Reset SCC */
@@ -662,7 +651,9 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
                goto efree;
 
        /* Enable tuning iff we have an SCC and a supported mode */
-       if (of_data && of_data->scc_offset && host->mmc->caps & MMC_CAP_UHS_SDR104) {
+       if (of_data && of_data->scc_offset &&
+           (host->mmc->caps & MMC_CAP_UHS_SDR104 ||
+            host->mmc->caps2 & MMC_CAP2_HS200_1_8V_SDR)) {
                const struct sh_mobile_sdhi_scc *taps = of_data->taps;
                bool hit = false;