]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-omap2/clock34xx.c
OMAP3 clock: fix non-CORE DPLL rate assignment bugs
[linux-2.6-omap-h63xx.git] / arch / arm / mach-omap2 / clock34xx.c
index df258f762031bba6971e3eb9e7916dc2cd4a7913..cc43f4f2a547e7e6d965df4cb1d37d821f8c5991 100644 (file)
@@ -271,7 +271,6 @@ static int _omap3_noncore_dpll_stop(struct clk *clk)
 static int omap3_noncore_dpll_enable(struct clk *clk)
 {
        int r;
-       long rate;
        struct dpll_data *dd;
 
        if (clk == &dpll3_ck)
@@ -287,7 +286,7 @@ static int omap3_noncore_dpll_enable(struct clk *clk)
                r = _omap3_noncore_dpll_lock(clk);
 
        if (!r)
-               clk->rate = rate;
+               clk->rate = omap2_get_dpll_rate(clk);
 
        return r;
 }
@@ -430,6 +429,9 @@ static int omap3_noncore_dpll_set_rate(struct clk *clk, unsigned long rate)
                ret = omap3_noncore_dpll_program(clk, dd->last_rounded_m,
                                                 dd->last_rounded_n, freqsel);
 
+               if (!ret)
+                       clk->rate = rate;
+
        }
 
        omap3_dpll_recalc(clk);