summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIcenowy Zheng <icenowy@aosc.io>2017-08-08 15:09:03 +0800
committerUlf Hansson <ulf.hansson@linaro.org>2017-08-30 14:01:50 +0200
commitb939e0b73ec036dca33c920db1b60a8c1c88371e (patch)
tree85c96d2512d129ba14aa657e5981ad0a11a94293
parenta646113435c9c8862a36d459079c69953ad19e8f (diff)
mmc: sunxi: fix support for new timings mode only SoCs
The A83T MMC support code introduces the timings mode switch, however such a switch doesn't exist on new SoCs with only new timings mode. Only execute the switch if the SoC really have the timings mode switch, to fix the regression shown on new timings mode only SoCs (A64, H5, etc). Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Chen-Yu Tsai <wens@csie.org> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-rw-r--r--drivers/mmc/host/sunxi-mmc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/sunxi-mmc.c b/drivers/mmc/host/sunxi-mmc.c
index 9dc6d726ec49..6c7eb859ace1 100644
--- a/drivers/mmc/host/sunxi-mmc.c
+++ b/drivers/mmc/host/sunxi-mmc.c
@@ -789,7 +789,7 @@ static int sunxi_mmc_clk_set_rate(struct sunxi_mmc_host *host,
clock <<= 1;
}
- if (host->use_new_timings) {
+ if (host->use_new_timings && host->cfg->has_timings_switch) {
ret = sunxi_ccu_set_mmc_timing_mode(host->clk_mmc, true);
if (ret) {
dev_err(mmc_dev(mmc),