mmc: sunxi: fix support for new timings mode only SoCs
authorIcenowy Zheng <icenowy@aosc.io>
Tue, 8 Aug 2017 07:09:03 +0000 (15:09 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 12:01:50 +0000 (14:01 +0200)
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>
drivers/mmc/host/sunxi-mmc.c

index 9dc6d726ec493ec3c9a352bfde3bbc2c5ccbfea6..6c7eb859ace17128a2a99d9a4a59ca4e07317e0e 100644 (file)
@@ -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),