rk: support resume rate when disable limit after enable multiple
authorchenxing <chenxing@rock-chips.com>
Thu, 11 Jul 2013 01:20:16 +0000 (09:20 +0800)
committerchenxing <chenxing@rock-chips.com>
Fri, 12 Jul 2013 06:43:55 +0000 (14:43 +0800)
arch/arm/plat-rk/dvfs.c

index 224bdaadba24584124b55daa8fadd9c70378bb87..76bee42d9a8b37fee4b374aca918aa6b61ecfee0 100644 (file)
@@ -270,7 +270,10 @@ int dvfs_clk_enable_limit(struct clk *clk, unsigned int min_rate, unsigned max_r
                dvfs_clk->freq_limit_en = 1;\r
                dvfs_clk->min_rate = min_rate;\r
                dvfs_clk->max_rate = max_rate;\r
-               rate = clk_get_rate(clk);\r
+               if (clk->last_set_rate == 0)\r
+                       rate = clk_get_rate(clk);\r
+               else\r
+                       rate = clk->last_set_rate;\r
                ret = dvfs_clk->vd->vd_dvfs_target(clk, rate);\r
                clk->last_set_rate = rate;\r
 \r