aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/ath79
diff options
context:
space:
mode:
authorGabor Juhos <juhosg@openwrt.org>2013-08-28 04:41:43 -0400
committerRalf Baechle <ralf@linux-mips.org>2013-09-03 17:22:17 -0400
commit837f036c8ab201965b9fb0f6b743a415f555493f (patch)
treeb7023124e3be1fa5dd9ddbf989f2ba76df570739 /arch/mips/ath79
parenta1191927ace7e6f827132aa9e062779eb3f11fa5 (diff)
MIPS: ath79: Use local ref clock rate in ar934x_get_pll_freq
The reference clock rate is passed in the first argument of the function. Use that instead of the rate of the global ath79_ref_clk variable. Signed-off-by: Gabor Juhos <juhosg@openwrt.org> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/5779/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/ath79')
-rw-r--r--arch/mips/ath79/clock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/mips/ath79/clock.c b/arch/mips/ath79/clock.c
index 733017b3dfe7..4378d63bc3ed 100644
--- a/arch/mips/ath79/clock.c
+++ b/arch/mips/ath79/clock.c
@@ -174,12 +174,12 @@ static u32 __init ar934x_get_pll_freq(u32 ref, u32 ref_div, u32 nint, u32 nfrac,
174 u64 t; 174 u64 t;
175 u32 ret; 175 u32 ret;
176 176
177 t = ath79_ref_clk.rate; 177 t = ref;
178 t *= nint; 178 t *= nint;
179 do_div(t, ref_div); 179 do_div(t, ref_div);
180 ret = t; 180 ret = t;
181 181
182 t = ath79_ref_clk.rate; 182 t = ref;
183 t *= nfrac; 183 t *= nfrac;
184 do_div(t, ref_div * frac); 184 do_div(t, ref_div * frac);
185 ret += t; 185 ret += t;