mmc: core: changes frequency to hs_max_dtr when selecting hs400es
authorxiaoyao <xiaoyao@rock-chips.com>
Thu, 22 Sep 2016 09:21:24 +0000 (17:21 +0800)
committerHuang, Tao <huangtao@rock-chips.com>
Fri, 23 Sep 2016 09:08:41 +0000 (17:08 +0800)
commit5b0edb353a0eab4abd466682b7099147a3d573f0
tree6011d313aff5f709202aac913bd061b27258a189
parent09c5c21b64168183edbac38e7752b7fc5bb0fe9f
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>
drivers/mmc/core/mmc.c