mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
clk: atlas7: fix pll missed divide NR in fraction mode
PLL VCO frequency is given by Fvco = Fref * 2 * NF / NR in integer-N mode, or by Fvco = Fref * SSN / NR in Spread Spectrum (fractional-N) mode. Thus fix the missing part of NR Signed-off-by: Guo Zeng <[email protected]> Signed-off-by: Barry Song <[email protected]> Signed-off-by: Stephen Boyd <[email protected]>
This commit is contained in:
parent
cf8709eabc
commit
b32a7cc63b
1 changed files with 1 additions and 0 deletions
|
|
@ -358,6 +358,7 @@ static unsigned long pll_clk_recalc_rate(struct clk_hw *hw,
|
|||
if (regctrl0 & SIRFSOC_ABPLL_CTRL0_SSEN) {
|
||||
rate = fin;
|
||||
rate *= 1 << 24;
|
||||
do_div(rate, nr);
|
||||
do_div(rate, (256 * ((ssdiv >> ssdepth) << ssdepth)
|
||||
+ (ssmod << ssdepth)));
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in a new issue