Use the clock rate going into the core to calculate the divider. Fixes broken SD card transfers on Zynq 7000. Fixes: 2a879e436a5f ("mci: sdhci: arasan: Use sdhci_set_clock()") Signed-off-by: Lucas Stach <dev@xxxxxxxxxx> --- drivers/mci/arasan-sdhci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mci/arasan-sdhci.c b/drivers/mci/arasan-sdhci.c index 37be06dffdfe..2af9ad10bed7 100644 --- a/drivers/mci/arasan-sdhci.c +++ b/drivers/mci/arasan-sdhci.c @@ -210,7 +210,7 @@ static void arasan_sdhci_set_clock(struct mci_host *mci, unsigned int clock) clk_set_phase(clk_data->sdcardclk, clk_data->clk_phase_out[mci->mci->host->timing]); - sdhci_set_clock(&host->sdhci, clock, host->sdhci.max_clk); + sdhci_set_clock(&host->sdhci, clock, mci->f_max); } static void arasan_sdhci_set_ios(struct mci_host *mci, struct mci_ios *ios) -- 2.47.1