From: Jean-Jacques Hiblot Date: Tue, 30 Jan 2018 15:01:43 +0000 (+0100) Subject: mmc: omap_hsmmc: update mmc->clock with the actual bus speed X-Git-Tag: v2018.03-rc3~3^2~13 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=3149c13ac324dae0b8993a4f6c964a261aa691a9;p=u-boot mmc: omap_hsmmc: update mmc->clock with the actual bus speed When the clock is applied, compute the actual value of the clock. It may be slightly different from the requested value (max freq, divisor threshold) Signed-off-by: Jean-Jacques Hiblot --- diff --git a/drivers/mmc/omap_hsmmc.c b/drivers/mmc/omap_hsmmc.c index 37fa7a49c4..b10d55ef61 100644 --- a/drivers/mmc/omap_hsmmc.c +++ b/drivers/mmc/omap_hsmmc.c @@ -1147,7 +1147,8 @@ static void omap_hsmmc_set_clock(struct mmc *mmc) } } - priv->clock = mmc->clock; + priv->clock = MMC_CLOCK_REFERENCE * 1000000 / dsor; + mmc->clock = priv->clock; omap_hsmmc_start_clock(mmc_base); }