summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorxiaoyao <xiaoyao@rock-chips.com>2016-09-22 17:21:24 +0800
committerHuang, Tao <huangtao@rock-chips.com>2016-09-23 17:08:41 +0800
commit5b0edb353a0eab4abd466682b7099147a3d573f0 (patch)
tree6011d313aff5f709202aac913bd061b27258a189 /drivers
parent09c5c21b64168183edbac38e7752b7fc5bb0fe9f (diff)
mmc: core: changes frequency to hs_max_dtr when selecting hs400es
Per JESD84-B51 P69, 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. It seems there is no difference if we don't change frequency to <= 52MHz as f_init is already less than 52MHz. But actually it does make difference. When doing compatibility test we see failures for some eMMC devices without changing the frequency to hs_max_dtr. And let's read the spec again, we could see that "Host may changes frequency to 200MHz" implies that it's not mandatory. But the "Host need to change frequency to <= 52MHz" implies that we should do this. Change-Id: I1dc9f5fa8dc217e033fc4b1689ca1b0204c294c0 Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: xiaoyao <xiaoyao@rock-chips.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/mmc/core/mmc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
index ed5d54dd7c4e..3c2c026f66cd 100644
--- a/drivers/mmc/core/mmc.c
+++ b/drivers/mmc/core/mmc.c
@@ -1266,6 +1266,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;