clk: sunxi-ng: Wait for lock when using fractional mode
authorJernej Škrabec <jernej.skrabec@siol.net>
Sun, 30 Jul 2017 16:41:50 +0000 (18:41 +0200)
committerChen-Yu Tsai <wens@csie.org>
Tue, 1 Aug 2017 02:18:23 +0000 (10:18 +0800)
commit1d42460a49347af4d1db345197e5d1277336b312
tree498fbed490863e0f21f0fea82658cca448ce45bf
parentb655f36e2071a9a380477e2f07893c31cbf88f59
clk: sunxi-ng: Wait for lock when using fractional mode

Currently ccu_frac_helper_set_rate() doesn't wait for a lock bit to be
set before returning. Because of that, unstable clock may be used.

Add a wait for lock in the helper function.

Fixes: 89a3dfb78707 ("clk: sunxi-ng: Add fractional lib")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
drivers/clk/sunxi-ng/ccu_frac.c
drivers/clk/sunxi-ng/ccu_frac.h
drivers/clk/sunxi-ng/ccu_mult.c
drivers/clk/sunxi-ng/ccu_nm.c