diff options
author | Faiz Abbas <faiz_abbas@ti.com> | 2020-07-23 09:42:19 +0530 |
---|---|---|
committer | Michal Simek <michal.simek@xilinx.com> | 2020-08-20 09:58:59 +0200 |
commit | 620bb46eaddd8f8ee361b47e56d57fd50a29b005 (patch) | |
tree | ca82ec9fb176d871799261c9404f20b0988b3672 /drivers | |
parent | 2570cc6430cf191b2b0f71b9dcfed46c94a645dc (diff) | |
download | u-boot-620bb46eaddd8f8ee361b47e56d57fd50a29b005.zip u-boot-620bb46eaddd8f8ee361b47e56d57fd50a29b005.tar.gz u-boot-620bb46eaddd8f8ee361b47e56d57fd50a29b005.tar.bz2 |
mmc: sdhci: Enable high speed conditional on the corresponding bit
The capabilities register has a field to indicate whether the host
supports high speed mode or not. Add high speed host_caps based on
this bit instead of enabling it by default.
Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Michal Simek <michal.simek@xilnx.com>
Tested-by: Michal Simek <michal.simek@xilnx.com>
(zcu104 with sdhci-caps-mask = <0 0x200000>;)
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/sdhci.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index ff871f8..fe3d677 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -843,7 +843,10 @@ 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; + if (caps & SDHCI_CAN_DO_HISPD) + cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz; + + cfg->host_caps |= MMC_MODE_4BIT; /* Since Host Controller Version3.0 */ if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { |