]> git.sur5r.net Git - u-boot/blobdiff - arch/arm/cpu/arm926ejs/lpc32xx/clk.c
Use correct spelling of "U-Boot"
[u-boot] / arch / arm / cpu / arm926ejs / lpc32xx / clk.c
index 1ef8a366696d1fc7b0d332333704a5c9d64d636f..f5e2103426eaf9f1ea999665bc8e0e65180e7b7a 100644 (file)
@@ -54,12 +54,12 @@ unsigned int get_hclk_pll_rate(void)
        if (fref > 27000000ULL || fref < 1000000ULL)
                return 0;
 
-       fout = fref * m_div;
-       if (val & CLK_HCLK_PLL_FEEDBACK) {
-               fcco = fout;
+       fcco = fref * m_div;
+       fout = fcco;
+       if (val & CLK_HCLK_PLL_FEEDBACK)
+               fcco *= p_div;
+       else
                do_div(fout, p_div);
-       } else
-               fcco = fout * p_div;
 
        if (fcco > 320000000ULL || fcco < 156000000ULL)
                return 0;