|
@@ -454,7 +454,8 @@ static void sh_mmcif_clock_control(struct sh_mmcif_host *host, unsigned int clk)
|
|
|
sh_mmcif_bitset(host, MMCIF_CE_CLK_CTRL, CLK_SUP_PCLK);
|
|
|
else
|
|
|
sh_mmcif_bitset(host, MMCIF_CE_CLK_CTRL, CLK_CLEAR &
|
|
|
- ((fls(host->clk / clk) - 1) << 16));
|
|
|
+ ((fls(DIV_ROUND_UP(host->clk,
|
|
|
+ clk) - 1) - 1) << 16));
|
|
|
|
|
|
sh_mmcif_bitset(host, MMCIF_CE_CLK_CTRL, CLK_ENABLE);
|
|
|
}
|