]> git.sur5r.net Git - u-boot/commitdiff
mmc: omap_hsmmc: update mmc->clock with the actual bus speed
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Tue, 30 Jan 2018 15:01:43 +0000 (16:01 +0100)
committerJaehoon Chung <jh80.chung@samsung.com>
Mon, 19 Feb 2018 07:58:55 +0000 (16:58 +0900)
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 <jjhiblot@ti.com>
drivers/mmc/omap_hsmmc.c

index 37fa7a49c434e66903abd8e6359699c9c9c6c55e..b10d55ef6159cfbd41ec43c3494962910dd15210 100644 (file)
@@ -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);
 }