]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit04c26b44724cb38c4396812b43ce43496334fb1a
tree0a643f3287d32db96cfd0dc1ad09ddcba856c3ae
parente1d5eea7d7375124cfef662072a42d62559d7e69
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