Merge "mmc: core: Select HS mode in device first and then in the host"

This commit is contained in:
qctecmdr 2020-10-07 12:10:27 -07:00 • committed by Gerrit - the friendly Code Review server
commit 052304f2c9

View file

@ -1236,10 +1236,6 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
int err;
u8 val;
/* Reduce frequency to HS */
max_dtr = card->ext_csd.hs_max_dtr;
mmc_set_clock(host, max_dtr);
/* Switch HS400 to HS DDR */
val = EXT_CSD_TIMING_HS;
err = __mmc_switch(card, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING,
@ -1250,6 +1246,10 @@ int mmc_hs400_to_hs200(struct mmc_card *card)
mmc_set_timing(host, MMC_TIMING_MMC_DDR52);
/* Reduce frequency to HS */
max_dtr = card->ext_csd.hs_max_dtr;
mmc_set_clock(host, max_dtr);
err = mmc_switch_status(card);
if (err)
goto out_err;