return 0;\r
}\r
\r
+int dvfs_set_arm_logic_volt(struct dvfs_arm_table *dvfs_cpu_logic_table, \r
+ struct cpufreq_frequency_table *cpu_dvfs_table,\r
+ struct cpufreq_frequency_table *dep_cpu2core_table)\r
+{\r
+ int i = 0;\r
+ for (i = 0; dvfs_cpu_logic_table[i].frequency != CPUFREQ_TABLE_END; i++) {\r
+ cpu_dvfs_table[i].frequency = dvfs_cpu_logic_table[i].frequency;\r
+ cpu_dvfs_table[i].index = dvfs_cpu_logic_table[i].cpu_volt;\r
+\r
+ dep_cpu2core_table[i].frequency = dvfs_cpu_logic_table[i].frequency;\r
+ dep_cpu2core_table[i].index = dvfs_cpu_logic_table[i].logic_volt;\r
+ }\r
+\r
+ cpu_dvfs_table[i].frequency = CPUFREQ_TABLE_END;\r
+ dep_cpu2core_table[i].frequency = CPUFREQ_TABLE_END;\r
+\r
+ dvfs_set_freq_volt_table(clk_get(NULL, "cpu"), cpu_dvfs_table);\r
+ dvfs_set_depend_table(clk_get(NULL, "cpu"), "vd_core", dep_cpu2core_table);\r
+ return 0;\r
+}\r
+\r
int clk_enable_dvfs(struct clk *clk)\r
{\r
struct regulator *regulator;\r
struct cpufreq_frequency_table *dvfs_table;\r
clk_dvfs_target_callback clk_dvfs_target;\r
};\r
+\r
struct dvfs_arm_table {\r
unsigned int frequency; /* kHz - doesn't need to be in ascending\r
* order */\r
\r
unsigned int logic_volt;\r
};\r
+\r
#ifdef CONFIG_DVFS\r
int rk30_dvfs_init(void);\r
int is_support_dvfs(struct clk_node *dvfs_info);\r
struct cpufreq_frequency_table *dvfs_get_freq_volt_table(struct clk *clk);\r
int dvfs_set_freq_volt_table(struct clk *clk, struct cpufreq_frequency_table *table);\r
int dvfs_set_depend_table(struct clk *clk, char *vd_name, struct cpufreq_frequency_table *table);\r
+int dvfs_set_arm_logic_volt(struct dvfs_arm_table *dvfs_cpu_logic_table, struct cpufreq_frequency_table *cpu_dvfs_table, struct cpufreq_frequency_table *dep_cpu2core_table);\r
#else\r
static inline int rk30_dvfs_init(void) { return 0; }\r
static inline int is_support_dvfs(struct clk_node *dvfs_info) { return 0; }\r
static inline struct cpufreq_frequency_table *dvfs_get_freq_volt_table(struct clk *clk) { return NULL; }\r
static inline int dvfs_set_freq_volt_table(struct clk *clk, struct cpufreq_frequency_table *table) { return 0; }\r
static inline int dvfs_set_depend_table(struct clk *clk, char *vd_name, struct cpufreq_frequency_table *table) {return 0;}\r
+int dvfs_set_arm_logic_volt(struct dvfs_arm_table *dvfs_cpu_logic_table, struct cpufreq_frequency_table *cpu_dvfs_table, struct cpufreq_frequency_table *dep_cpu2core_table){ return 0; }\r
+\r
#endif\r
\r
#endif\r