diff options
author | Alex Smith <alex.smith@imgtec.com> | 2018-03-29 00:00:50 +0300 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2018-05-02 16:08:33 +0300 |
commit | 6861fce620771d5f7629f2d9742a8431d932cdf0 (patch) | |
tree | d2d511617c96d71e84aad18c31da0a02bc36bf5e /drivers/mmc/host/jz4740_mmc.c | |
parent | 48b6aa2f9eb245e83142d552068ec2de00c399bf (diff) | |
download | linux-6861fce620771d5f7629f2d9742a8431d932cdf0.tar.xz |
mmc: jz4740: Set clock rate to mmc->f_max rather than JZ_MMC_CLK_RATE
The maximum clock rate can be overridden by DT. The clock rate should
be set to the DT-specified value rather than the constant JZ_MMC_CLK_RATE
when this is done. If the maximum clock rate is not set by DT then
mmc->f_max will be set to JZ_MMC_CLK_RATE.
Tested-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Alex Smith <alex.smith@imgtec.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/jz4740_mmc.c')
-rw-r--r-- | drivers/mmc/host/jz4740_mmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/jz4740_mmc.c b/drivers/mmc/host/jz4740_mmc.c index 03757cc55f52..aa635b458d2c 100644 --- a/drivers/mmc/host/jz4740_mmc.c +++ b/drivers/mmc/host/jz4740_mmc.c @@ -825,7 +825,7 @@ static int jz4740_mmc_set_clock_rate(struct jz4740_mmc_host *host, int rate) int real_rate; jz4740_mmc_clock_disable(host); - clk_set_rate(host->clk, JZ_MMC_CLK_RATE); + clk_set_rate(host->clk, host->mmc->f_max); real_rate = clk_get_rate(host->clk); |