From: chenxing Date: Thu, 11 Jul 2013 01:20:16 +0000 (+0800) Subject: rk: support resume rate when disable limit after enable multiple X-Git-Tag: firefly_0821_release~6896 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d324dea3ad878e0818502be4178c99c1f22e3e66;p=firefly-linux-kernel-4.4.55.git rk: support resume rate when disable limit after enable multiple --- diff --git a/arch/arm/plat-rk/dvfs.c b/arch/arm/plat-rk/dvfs.c index 224bdaadba24..76bee42d9a8b 100644 --- a/arch/arm/plat-rk/dvfs.c +++ b/arch/arm/plat-rk/dvfs.c @@ -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; dvfs_clk->min_rate = min_rate; dvfs_clk->max_rate = max_rate; - rate = clk_get_rate(clk); + if (clk->last_set_rate == 0) + rate = clk_get_rate(clk); + else + rate = clk->last_set_rate; ret = dvfs_clk->vd->vd_dvfs_target(clk, rate); clk->last_set_rate = rate;