mmc: core: Set clock after changing timing immediately for mmc_select_hs400es()

This's what mmc_select_hs400() or mmc_select_hs() did,
since mmc_set_clock() will let sdhci_arasan_set_clock()
update the PHY clock to match the timing, otherwise
the following mmc_switch_status() will be failed.

Change-Id: Ic1a0178ec209ec71d904f7212a84da6665904007
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This commit is contained in:
Shawn Lin
2019-10-29 14:08:31 +08:00
committed by Tao Huang
parent c5d76c0167
commit 6234aa4bb3

View File

@@ -1367,12 +1367,13 @@ static int mmc_select_hs400es(struct mmc_card *card)
}
mmc_set_timing(host, MMC_TIMING_MMC_HS);
/* Set clock immediately after changing timing */
mmc_set_clock(host, card->ext_csd.hs_max_dtr);
err = mmc_switch_status(card);
if (err)
goto out_err;
mmc_set_clock(host, card->ext_csd.hs_max_dtr);
/* Switch card to DDR with strobe bit */
val = EXT_CSD_DDR_BUS_WIDTH_8 | EXT_CSD_BUS_WIDTH_STROBE;
err = mmc_switch(card, EXT_CSD_CMD_SET_NORMAL,