Skip to content

Commit

Permalink
mmc: core: changes frequency to hs_max_dtr when selecting hs400es
Browse files Browse the repository at this point in the history
Per JESD84-B51 P49, Host need to change frequency to <=52MHz
after setting HS_TIMING to 0x1, and host may changes frequency
to <= 200MHz after setting HS_TIMING to 0x3. That means the card
expects the clock rate to increase from the current used f_init
(which is less than 400KHz, but still being less than 52MHz) to
52MHz, otherwise we find some eMMC devices significantly report
failure when sending status.

Reported-by: Xiao Yao <xiaoyao@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
  • Loading branch information
shawn1221 authored and storulf committed Oct 10, 2016
1 parent 1720d35 commit 4f25580
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/mmc/core/mmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1282,6 +1282,8 @@ static int mmc_select_hs400es(struct mmc_card *card)
if (err)
goto out_err;

mmc_set_clock(host, card->ext_csd.hs_max_dtr);

err = mmc_switch_status(card);
if (err)
goto out_err;
Expand Down

0 comments on commit 4f25580

Please sign in to comment.