aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorQingmin Liu <qingmin@broadcom.com>2015-01-07 06:28:23 -0500
committerRalf Baechle <ralf@linux-mips.org>2015-04-01 11:21:48 -0400
commit8db23f7df6be572d816f0d056fec16c954d3bdf6 (patch)
tree4e957d8532efb24cbffba41c8cfdff549234944d /arch
parent46ab6f24ac7b05c07e2936124b45da5f2f8fdc61 (diff)
MIPS: Netlogic: Fix nlm_xlp2_get_pic_frequency to use ref_div
The variable ref_div is initialized to the correct divisor but not used in the frequency calculation. This caused incorrect frequency to be reported when the clock divisor is not 3. Signed-off-by: Qingmin Liu <qingmin@broadcom.com> Signed-off-by: Jayachandran C <jchandra@broadcom.com> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/8884/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/mips/netlogic/xlp/nlm_hal.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/mips/netlogic/xlp/nlm_hal.c b/arch/mips/netlogic/xlp/nlm_hal.c
index bc24beb3a426..7e0d22419e9b 100644
--- a/arch/mips/netlogic/xlp/nlm_hal.c
+++ b/arch/mips/netlogic/xlp/nlm_hal.c
@@ -410,7 +410,7 @@ static unsigned int nlm_xlp2_get_pic_frequency(int node)
410 410
411 fdiv = fdiv/(1 << 13); 411 fdiv = fdiv/(1 << 13);
412 pll_out_freq_num = ((ref_clk >> 1) * (6 + mdiv)) + fdiv; 412 pll_out_freq_num = ((ref_clk >> 1) * (6 + mdiv)) + fdiv;
413 pll_out_freq_den = (1 << vco_post_div) * pll_post_div * 3; 413 pll_out_freq_den = (1 << vco_post_div) * pll_post_div * ref_div;
414 414
415 if (pll_out_freq_den > 0) 415 if (pll_out_freq_den > 0)
416 do_div(pll_out_freq_num, pll_out_freq_den); 416 do_div(pll_out_freq_num, pll_out_freq_den);