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: 89a3dfb787
("clk: sunxi-ng: Add fractional lib")
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
This commit is contained in:

gecommit door
Chen-Yu Tsai

bovenliggende
b655f36e20
commit
1d42460a49
@@ -114,7 +114,8 @@ static int ccu_mult_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
if (ccu_frac_helper_has_rate(&cm->common, &cm->frac, rate)) {
|
||||
ccu_frac_helper_enable(&cm->common, &cm->frac);
|
||||
|
||||
return ccu_frac_helper_set_rate(&cm->common, &cm->frac, rate);
|
||||
return ccu_frac_helper_set_rate(&cm->common, &cm->frac,
|
||||
rate, cm->lock);
|
||||
} else {
|
||||
ccu_frac_helper_disable(&cm->common, &cm->frac);
|
||||
}
|
||||
|
Verwijs in nieuw issue
Block a user