From: Timur Prokopenko <[email protected]> Date: Thu, 4 Apr 2019 11:05:05 +0300 Subject: [U-Boot] [PATCH] mmc: sdhci: Read capabilities register and update host caps
U-Boot doesn't analyze SDHCI capabilities register while choosing speed mode and sets HS mode unconditionally which is incorrect. This patch checks the capabilities register and sets the host caps accordingly. Signed-off-by: Timur Prokopenko <[email protected]> --- drivers/mmc/sdhci.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index cdeba914f9..66a752add0 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -628,7 +628,9 @@ 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 | + MMC_MODE_4BIT; /* Since Host Controller Version3.0 */ if (SDHCI_GET_VERSION(host) >= SDHCI_SPEC_300) { -- 2.19.1 -- Best regards, Timur _______________________________________________ U-Boot mailing list [email protected] https://lists.denx.de/listinfo/u-boot

