mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 11:26:02 +09:00
mmc: sdhci-of-dwcmshc: move rxclk non-invert code to .set_clock()
This setting will be lost during deep suspend in case of powering off the controller. So we need to always recovery it when calling resume hook. But .set_clock() will be awlays called whenever the driver's probed or resumed. So we move it there. Change-Id: I65ccc04241db04cf84486a43fe5954f20e3cc95d Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
@@ -134,6 +134,12 @@ static void dwcmshc_rk_set_clock(struct sdhci_host *host, unsigned int clock)
|
||||
int err;
|
||||
|
||||
host->mmc->actual_clock = 0;
|
||||
|
||||
/* DO NOT TOUCH THIS SETTING */
|
||||
extra = DWCMSHC_EMMC_DLL_DLYENA |
|
||||
DLL_RXCLK_NO_INVERTER << DWCMSHC_EMMC_DLL_RXCLK_SRCSEL;
|
||||
sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_RXCLK);
|
||||
|
||||
if (clock == 0)
|
||||
return;
|
||||
|
||||
@@ -215,7 +221,6 @@ static const struct sdhci_pltfm_data sdhci_dwcmshc_rk_pdata = {
|
||||
static int rockchip_pltf_init(struct sdhci_host *host, struct dwcmshc_priv *priv)
|
||||
{
|
||||
int err;
|
||||
u32 extra;
|
||||
|
||||
priv->rockchip_clks[0].id = "axi";
|
||||
priv->rockchip_clks[1].id = "block";
|
||||
@@ -237,9 +242,6 @@ static int rockchip_pltf_init(struct sdhci_host *host, struct dwcmshc_priv *priv
|
||||
&priv->txclk_tapnum))
|
||||
priv->txclk_tapnum = DLL_TXCLK_TAPNUM_DEFAULT;
|
||||
|
||||
extra = DWCMSHC_EMMC_DLL_DLYENA |
|
||||
DLL_RXCLK_NO_INVERTER << DWCMSHC_EMMC_DLL_RXCLK_SRCSEL;
|
||||
sdhci_writel(host, extra, DWCMSHC_EMMC_DLL_RXCLK);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user