summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--arch/arm/cpu/armv7/mx7ulp/scg.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv7/mx7ulp/scg.c b/arch/arm/cpu/armv7/mx7ulp/scg.c
index 35d962c..d6ece80 100644
--- a/arch/arm/cpu/armv7/mx7ulp/scg.c
+++ b/arch/arm/cpu/armv7/mx7ulp/scg.c
@@ -498,7 +498,9 @@ u32 decode_pll(enum pll_clocks pll)
num = readl(&scg1_regs->spllnum);
denom = readl(&scg1_regs->splldenom);
- return (infreq / pre_div) * (mult + num / denom);
+ infreq = infreq / pre_div;
+
+ return infreq * mult + infreq * num / denom;
case PLL_A7_APLL:
reg = readl(&scg1_regs->apllcsr);
@@ -525,7 +527,9 @@ u32 decode_pll(enum pll_clocks pll)
num = readl(&scg1_regs->apllnum);
denom = readl(&scg1_regs->aplldenom);
- return (infreq / pre_div) * (mult + num / denom);
+ infreq = infreq / pre_div;
+
+ return infreq * mult + infreq * num / denom;
case PLL_USB:
reg = readl(&scg1_regs->upllcsr);