rk3288: add vepu node for dvfs

This commit is contained in:
陈亮
2014-03-20 09:15:08 -07:00
parent 0d3e934d4b
commit 9cf11a6375
2 changed files with 20 additions and 1 deletions

View File

@@ -751,6 +751,19 @@
status = "disable";
};
};
pd_vpu {
clk_ddr_vepu_table:
clk_vepu {
operating-points = <
/* KHz uV */
200000 1200000
300000 1200000
400000 1200000
>;
status = "okay";
};
};
};
vd_gpu:

View File

@@ -74,6 +74,7 @@ static DEFINE_MUTEX(cpufreq_mutex);
static bool gpu_is_mali400;
struct dvfs_node *clk_cpu_dvfs_node = NULL;
struct dvfs_node *clk_gpu_dvfs_node = NULL;
struct dvfs_node *clk_vepu_dvfs_node = NULL;
/*******************************************************/
static unsigned int cpufreq_get_rate(unsigned int cpu)
{
@@ -366,7 +367,6 @@ static int cpufreq_scale_rate_for_dvfs(struct clk *clk, unsigned long rate)
}
static int cpufreq_init_cpu0(struct cpufreq_policy *policy)
{
unsigned int i;
@@ -379,6 +379,12 @@ static int cpufreq_init_cpu0(struct cpufreq_policy *policy)
dvfs_clk_enable_limit(clk_gpu_dvfs_node, 133000000, 600000000);
}
clk_vepu_dvfs_node = clk_get_dvfs_node("clk_vepu");
if (clk_vepu_dvfs_node){
clk_enable_dvfs(clk_vepu_dvfs_node);
dvfs_clk_set_rate(clk_vepu_dvfs_node, 297000000);
}
clk_cpu_dvfs_node = clk_get_dvfs_node("clk_core");
if (!clk_cpu_dvfs_node){
return -EINVAL;