]> git.baikalelectronics.ru Git - uboot.git/commit
mmc: zynq_sdhci: Fix SDx_BASECLK configuration
authorAshok Reddy Soma <ashok.reddy.soma@xilinx.com>
Fri, 25 Mar 2022 12:11:10 +0000 (13:11 +0100)
committerMichal Simek <michal.simek@xilinx.com>
Tue, 29 Mar 2022 07:20:33 +0000 (09:20 +0200)
commit1f7670f614b1eaad247d143842ed9b2110f35acb
treed01881b9a51df282cd23525e0af0330bc79889e7
parentd7c1e75aa893d5c0b9befc07f56f9e0a59341ca1
mmc: zynq_sdhci: Fix SDx_BASECLK configuration

The DLL mode supported SD reference clocks are 50 MHz, 100 MHz and
200 MHz. When user select SD frequency as 200MHz in the design, the
actual frequency is going to come around ~187MHz (<= 200MHz considering
the parent clock and divisor selection). We need to set SDx_BASECLK as
200 in this case, setting 187 will result in tuning failures in mmc.

Set SDx_BASECLK to exact value of 200, 100 or 50 based on the frequency
range.

Signed-off-by: Ashok Reddy Soma <ashok.reddy.soma@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Link: https://lore.kernel.org/r/6c1e5eeeedd2864a0c85e6b409d182031d8c6c1a.1648210268.git.michal.simek@xilinx.com
drivers/mmc/zynq_sdhci.c