Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6861fce6 authored by Alex Smith's avatar Alex Smith Committed by Ulf Hansson
Browse files

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: default avatarMathieu Malaterre <malat@debian.org>
Signed-off-by: default avatarAlex Smith <alex.smith@imgtec.com>
Signed-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent 48b6aa2f
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -825,7 +825,7 @@ static int jz4740_mmc_set_clock_rate(struct jz4740_mmc_host *host, int rate)
	int real_rate;
	int real_rate;


	jz4740_mmc_clock_disable(host);
	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);
	real_rate = clk_get_rate(host->clk);