mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 19:47:08 +02:00
clk: qcom: rcg2: Add DIV_ROUND_CLOSEST_ULL to roundoff RCG frequency
The Alpha BW for Fabia PLL is 16 bit and the calculated hw rate has additional KHz of frequency. Due to this additional frequency, the source is wrongly selected. Truncate the additional KHz using the DIV_ROUND_CLOSEST_ULL. Change-Id: Ic9c523c87277c4813b676cf8a52a1207e8f1ecc2 Signed-off-by: Shefali Jain <shefjain@codeaurora.org>
This commit is contained in:
parent
0fa01f415e
commit
42497813c1
|
|
@ -443,7 +443,8 @@ static int __clk_rcg2_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
}
|
||||
|
||||
if (rcg->flags & FORCE_ENABLE_RCG) {
|
||||
rcg->current_freq = clk_get_rate(hw->clk);
|
||||
rcg->current_freq = DIV_ROUND_CLOSEST_ULL(
|
||||
clk_get_rate(hw->clk), 1000) * 1000;
|
||||
if (rcg->current_freq == cxo_f.freq)
|
||||
curr_src_index = 0;
|
||||
else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user