clk: rockchip: Prevent calculating mmc phase if clock rate is zero
authorShawn Lin <shawn.lin@rock-chips.com>
Mon, 5 Mar 2018 03:25:58 +0000 (11:25 +0800)
committerHeiko Stuebner <heiko@sntech.de>
Mon, 5 Mar 2018 20:37:13 +0000 (21:37 +0100)
commit4bf59902b50012b1dddeeaa23b217d9c4956cdda
tree0a643f3287d32db96cfd0dc1ad09ddcba856c3ae
parentfd3cbbfb76a422a5b0f85649b677477a308866db
clk: rockchip: Prevent calculating mmc phase if clock rate is zero

The MMC sample and drv clock for rockchip platforms are derived from
the bus clock output to the MMC/SDIO card. So it should never happens
that the clk rate is zero given it should inherits the clock rate from
its parent. If something goes wrong and makes the clock rate to be zero,
the calculation would be wrong but may still make the mmc tuning process
work luckily. However it makes people harder to debug when the following
data transfer is unstable.

Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
drivers/clk/rockchip/clk-mmc-phase.c