Commit 26cb2be4 authored by Chen-Yu Tsai's avatar Chen-Yu Tsai Committed by Ulf Hansson

mmc: sunxi: Keep default timing phase settings for new timing mode

The register for the "new timing mode" also has bit fields for setting
output and sample timing phases. According to comments in Allwinner's
BSP kernel, the default values are good enough.

Keep the default values already in the hardware when setting new timing
mode, instead of overwriting the whole register.

Fixes: 9a37e53e ("mmc: sunxi: Enable the new timings for the A64 MMC
controllers")
Signed-off-by: default avatarChen-Yu Tsai <wens@csie.org>
Acked-by: default avatarMaxime Ripard <maxime.ripard@free-electrons.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 5771a8c0
...@@ -793,8 +793,12 @@ static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host, ...@@ -793,8 +793,12 @@ static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host,
} }
mmc_writel(host, REG_CLKCR, rval); mmc_writel(host, REG_CLKCR, rval);
if (host->cfg->needs_new_timings) if (host->cfg->needs_new_timings) {
mmc_writel(host, REG_SD_NTSR, SDXC_2X_TIMING_MODE); /* Don't touch the delay bits */
rval = mmc_readl(host, REG_SD_NTSR);
rval |= SDXC_2X_TIMING_MODE;
mmc_writel(host, REG_SD_NTSR, rval);
}
ret = sunxi_mmc_clk_set_phase(host, ios, rate); ret = sunxi_mmc_clk_set_phase(host, ios, rate);
if (ret) if (ret)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment