projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c4d1c68
)
rk30:sdk: dvfs freq limit active right now
author
chenxing
<chenxing@rock-chips.com>
Sat, 25 Aug 2012 07:49:17 +0000
(15:49 +0800)
committer
chenxing
<chenxing@rock-chips.com>
Sat, 25 Aug 2012 07:49:17 +0000
(15:49 +0800)
arch/arm/mach-rk30/dvfs.c
patch
|
blob
|
history
diff --git
a/arch/arm/mach-rk30/dvfs.c
b/arch/arm/mach-rk30/dvfs.c
index a2838794d26485f07b13edde68a424166c7845fb..7f1aa71b471b54038b328d5653c5f220b82a37fe 100644
(file)
--- a/
arch/arm/mach-rk30/dvfs.c
+++ b/
arch/arm/mach-rk30/dvfs.c
@@
-106,12
+106,18
@@
struct regulator* dvfs_get_regulator(char *regulator_name)
int dvfs_clk_enable_limit(struct clk *clk, unsigned int min_rate, unsigned max_rate)
\r
{
\r
struct clk_node* dvfs_clk;
\r
+ u32 rate = 0;
\r
dvfs_clk = clk->dvfs_info;
\r
\r
dvfs_clk->freq_limit_en = 1;
\r
dvfs_clk->min_rate = min_rate;
\r
dvfs_clk->max_rate = max_rate;
\r
\r
+ rate = clk_get_rate(clk);
\r
+ if (rate < min_rate)
\r
+ dvfs_clk_set_rate(clk, min_rate);
\r
+ else if (rate > max_rate)
\r
+ dvfs_clk_set_rate(clk, max_rate);
\r
return 0;
\r
}
\r
\r