Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: core: changes frequency to hs_max_dtr when selecting hs400es

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>

authored by

Shawn Lin and committed by
Ulf Hansson
4f25580f 1720d354

+2
+2
drivers/mmc/core/mmc.c
··· 1282 1282 if (err) 1283 1283 goto out_err; 1284 1284 1285 + mmc_set_clock(host, card->ext_csd.hs_max_dtr); 1286 + 1285 1287 err = mmc_switch_status(card); 1286 1288 if (err) 1287 1289 goto out_err;