rk30:sdk: fix gpu round frequency error when the same rate
authorchenxing <chenxing@rock-chips.com>
Thu, 14 Jun 2012 10:22:16 +0000 (18:22 +0800)
committerchenxing <chenxing@rock-chips.com>
Thu, 14 Jun 2012 10:22:16 +0000 (18:22 +0800)
arch/arm/mach-rk30/clock_data.c

index b69c9251f1b0acd3fbbd5de66418e8b98d94954a..4633144d4b571082cb67411c1d59759329f4bfc9 100644 (file)
@@ -406,6 +406,8 @@ static long clk_freediv_round_autosel_parents_rate(struct clk *clk, unsigned lon
 {
        u32 div;
        struct clk *p_clk;
+       if(clk->rate == rate)
+               return clk->rate;
        p_clk=get_freediv_parents_div(clk,rate,&div);
        if(!p_clk)
                return 0;