]> git.sur5r.net Git - u-boot/blobdiff - drivers/mmc/sdhci.c
SPDX: Convert all of our single license tags to Linux Kernel style
[u-boot] / drivers / mmc / sdhci.c
index e2ddf5dccd3ded3dc60e578fe910971f79bea0ab..758850fc3b4edd85c401bb65d6a1f2121e33c5e5 100644 (file)
@@ -1,9 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2011, Marvell Semiconductor Inc.
  * Lei Wen <leiwen@marvell.com>
  *
- * SPDX-License-Identifier:    GPL-2.0+
- *
  * Back ported to the 8xx platform (from the 8260 platform) by
  * Murray.Jensen@cmst.csiro.au, 27-Jan-01.
  */
@@ -86,8 +85,8 @@ static int sdhci_transfer_data(struct sdhci_host *host, struct mmc_data *data,
        do {
                stat = sdhci_readl(host, SDHCI_INT_STATUS);
                if (stat & SDHCI_INT_ERROR) {
-                       printf("%s: Error detected in status(0x%X)!\n",
-                              __func__, stat);
+                       pr_debug("%s: Error detected in status(0x%X)!\n",
+                                __func__, stat);
                        return -EIO;
                }
                if (!transfer_done && (stat & rdy)) {
@@ -462,7 +461,8 @@ static int sdhci_set_ios(struct mmc *mmc)
        else
                ctrl &= ~SDHCI_CTRL_HISPD;
 
-       if (host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)
+       if ((host->quirks & SDHCI_QUIRK_NO_HISPD_BIT) ||
+           (host->quirks & SDHCI_QUIRK_BROKEN_HISPD_MODE))
                ctrl &= ~SDHCI_CTRL_HISPD;
 
        sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL);
@@ -594,7 +594,7 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
        if (host->quirks & SDHCI_QUIRK_BROKEN_VOLTAGE)
                cfg->voltages |= host->voltages;
 
-       cfg->host_caps = MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
+       cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz | MMC_MODE_4BIT;
 
        /* Since Host Controller Version3.0 */
        if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) {
@@ -602,6 +602,11 @@ int sdhci_setup_cfg(struct mmc_config *cfg, struct sdhci_host *host,
                        cfg->host_caps &= ~MMC_MODE_8BIT;
        }
 
+       if (host->quirks & SDHCI_QUIRK_BROKEN_HISPD_MODE) {
+               cfg->host_caps &= ~MMC_MODE_HS;
+               cfg->host_caps &= ~MMC_MODE_HS_52MHz;
+       }
+
        if (host->host_caps)
                cfg->host_caps |= host->host_caps;