HACK: mmc: core: fix switching clk 400K to 52/200M status error
authorxiaoyao <xiaoyao@rock-chips.com>
Thu, 22 Sep 2016 10:01:56 +0000 (18:01 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 23 Sep 2016 09:11:07 +0000 (17:11 +0800)
Change-Id: I56285d306e8e3a52039a7612fae666ed40117a4a
Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
drivers/mmc/core/mmc.c

index 3c2c026f66cd1b0c670491cfbafac159d952fa2a..9531caa125bb4349e6fd61d6ef214fe6639d0148 100644 (file)
@@ -1010,6 +1010,8 @@ static int mmc_select_hs(struct mmc_card *card)
                           true, false, true);
        if (!err) {
                mmc_set_timing(card->host, MMC_TIMING_MMC_HS);
+
+               mmc_set_clock(card->host, card->ext_csd.hs_max_dtr);
                err = mmc_switch_status(card);
        }
 
@@ -1378,6 +1380,7 @@ static int mmc_select_hs200(struct mmc_card *card)
                old_timing = host->ios.timing;
                mmc_set_timing(host, MMC_TIMING_MMC_HS200);
 
+               mmc_set_clock(host, card->ext_csd.hs200_max_dtr);
                err = mmc_switch_status(card);
                /*
                 * mmc_select_timing() assumes timing has not changed if