From e39465bb00096c4714512cbd560fe97c4ccd4c50 Mon Sep 17 00:00:00 2001 From: Shawn Lin Date: Mon, 9 Nov 2020 15:43:14 +0800 Subject: [PATCH] mmc: sdhci-of-dwcmshc: Fix HS400 and HS400es support Change-Id: I5e9e227e22e72730322ee6bf4441f0f224d55ece Signed-off-by: Shawn Lin --- drivers/mmc/host/sdhci-of-dwcmshc.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/mmc/host/sdhci-of-dwcmshc.c b/drivers/mmc/host/sdhci-of-dwcmshc.c index 747bb2e33385..20aa1aacae8a 100644 --- a/drivers/mmc/host/sdhci-of-dwcmshc.c +++ b/drivers/mmc/host/sdhci-of-dwcmshc.c @@ -37,9 +37,10 @@ #define DWCMSHC_EMMC_DLL_START_POINT 16 #define DWCMSHC_EMMC_DLL_INC 8 #define DWCMSHC_EMMC_DLL_DLYENA BIT(27) -#define DLL_RXCLK_TAPNUM_DEFAULT 0x3 -#define DLL_STRBIN_TAPNUM_DEFAULT 0x3 +#define DLL_RXCLK_TAPNUM_DEFAULT 0x8 +#define DLL_STRBIN_TAPNUM_DEFAULT 0x8 #define DLL_RXCLK_TAPNUM_FROM_SW BIT(24) +#define DLL_STRBIN_TAPNUM_FROM_SW BIT(24) #define DWCMSHC_EMMC_DLL_LOCKED BIT(8) #define DWCMSHC_EMMC_DLL_TIMEOUT BIT(9) #define DLL_RXCLK_NO_INVERTER 1 @@ -165,17 +166,14 @@ static void dwcmshc_rk_set_clock(struct sdhci_host *host, unsigned int clock) return; } - extra = DWCMSHC_EMMC_DLL_DLYENA | - DLL_RXCLK_NO_INVERTER << DWCMSHC_EMMC_DLL_RXCLK_SRCSEL; - sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_RXCLK); - extra = DWCMSHC_EMMC_DLL_DLYENA | DLL_RXCLK_TAPNUM_DEFAULT | DLL_RXCLK_TAPNUM_FROM_SW; sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_TXCLK); extra = DWCMSHC_EMMC_DLL_DLYENA | - DLL_STRBIN_TAPNUM_DEFAULT; + DLL_STRBIN_TAPNUM_DEFAULT | + DLL_STRBIN_TAPNUM_FROM_SW; sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_STRBIN); }