]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sunxi: Fix clock rate passed to sunxi_mmc_clk_set_phase
authorChen-Yu Tsai <wens@csie.org>
Thu, 10 Aug 2017 03:29:54 +0000 (11:29 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 30 Aug 2017 12:02:00 +0000 (14:02 +0200)
commit077f2bee6fee168f1f451327577a53d6f6a2494b
tree72510fb82005325b2ca75399a3006c4ba5e47418
parenta83e3521e7c5158a6849725edae2e3fdb30ffd90
mmc: sunxi: Fix clock rate passed to sunxi_mmc_clk_set_phase

sunxi_mmc_clk_set_phase expects the actual card clock rate to be passed
to it. When the internal divider code was reworked in change ("mmc: sunxi:
Support MMC DDR52 transfer mode with new timing mode"), this requirement
was missed, and the module clock rate was passed in instead. This broke 8
bit DDR MMC on old controllers, as the module clock rate is double the
card clock rate, for which we have no valid delay settings.

Fix this by applying the internal divider to the clock rate right after
we configure it in hardware.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sunxi-mmc.c