mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
clk: rockchip: fix up the rockchip_fractional_approximation
If frac clk parent rate is PLL rate, but still lower than frac rate*20, not allowed fractional div. Change-Id: I09c93e1d8f32c0a4e345057964d58505b1477204 Signed-off-by: Elaine Zhang <zhangqing@rock-chips.com>
This commit is contained in:
@@ -195,6 +195,11 @@ static void rockchip_fractional_approximation(struct clk_hw *hw,
|
||||
p_parent = clk_hw_get_parent(clk_hw_get_parent(hw));
|
||||
p_parent_rate = clk_hw_get_rate(p_parent);
|
||||
*parent_rate = p_parent_rate;
|
||||
if (*parent_rate < rate * 20) {
|
||||
pr_err("%s parent_rate(%ld) is low than rate(%ld)*20, fractional div is not allowed\n",
|
||||
clk_hw_get_name(hw), *parent_rate, rate);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user