summaryrefslogtreecommitdiff
path: root/drivers/clk/rockchip/clk_rk3036.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/clk/rockchip/clk_rk3036.c')
-rw-r--r--drivers/clk/rockchip/clk_rk3036.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/clk/rockchip/clk_rk3036.c b/drivers/clk/rockchip/clk_rk3036.c
index 514ea88f3b..83f4ae6ca3 100644
--- a/drivers/clk/rockchip/clk_rk3036.c
+++ b/drivers/clk/rockchip/clk_rk3036.c
@@ -249,8 +249,9 @@ static ulong rockchip_mmc_set_clk(struct rk3036_cru *cru, uint clk_general_rate,
/* mmc clock auto divide 2 in internal */
src_clk_div = DIV_ROUND_UP(clk_general_rate / 2, freq);
- if (src_clk_div > 0x7f) {
+ if (src_clk_div > 128) {
src_clk_div = DIV_ROUND_UP(OSC_HZ / 2, freq);
+ assert(src_clk_div - 1 < 128);
mux = EMMC_SEL_24M;
} else {
mux = EMMC_SEL_GPLL;