From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ziyuan Xu Date: Mon, 15 May 2017 13:57:00 +0800 Subject: [U-Boot] [PATCH 05/33] mmc: sdhci: fix HISPD bit setting In-Reply-To: <1494827848-22619-1-git-send-email-xzy.xu@rock-chips.com> References: <1494827848-22619-1-git-send-email-xzy.xu@rock-chips.com> Message-ID: <1494827848-22619-5-git-send-email-xzy.xu@rock-chips.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Configure HISPD bit field according to the timing parameter instead of the card clock frequency. Signed-off-by: Ziyuan Xu --- drivers/mmc/sdhci.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/mmc/sdhci.c b/drivers/mmc/sdhci.c index b745977..58cc0ab 100644 --- a/drivers/mmc/sdhci.c +++ b/drivers/mmc/sdhci.c @@ -457,14 +457,12 @@ static int sdhci_set_ios(struct mmc *mmc) ctrl &= ~SDHCI_CTRL_4BITBUS; } - if (mmc->clock > 26000000) + if (!(mmc->timing == MMC_TIMING_LEGACY) && + !(host->quirks & SDHCI_QUIRK_NO_HISPD_BIT)) ctrl |= SDHCI_CTRL_HISPD; else ctrl &= ~SDHCI_CTRL_HISPD; - if (host->quirks & SDHCI_QUIRK_NO_HISPD_BIT) - ctrl &= ~SDHCI_CTRL_HISPD; - sdhci_writeb(host, ctrl, SDHCI_HOST_CONTROL); /* If available, call the driver specific "post" set_ios() function */ -- 2.7.4