rk3168: update arm volt table, remove arm request log volt
authorchenxing <chenxing@rock-chips.com>
Wed, 16 Jan 2013 06:28:47 +0000 (14:28 +0800)
committerchenxing <chenxing@rock-chips.com>
Wed, 16 Jan 2013 06:29:18 +0000 (14:29 +0800)
arch/arm/mach-rk30/board-rk3168-tb.c

index 02c32d676ca77b19a3f3e3b0b40c5e210698e0ea..03330b96d280384bdcf592ffa5b50691e52b6245 100755 (executable)
@@ -1973,44 +1973,43 @@ static void __init rk30_reserve(void)
  * dvfs_cpu_logic_table: table for arm and logic dvfs 
  * @frequency  : arm frequency
  * @cpu_volt   : arm voltage depend on frequency
- * @logic_volt : logic voltage arm requests depend on frequency
- * comments    : min arm/logic voltage
  */
-static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
-       {.frequency = 312 * 1000,       .cpu_volt = 850 * 1000,         .logic_volt = 1000 * 1000},
-       {.frequency = 504 * 1000,       .cpu_volt = 900 * 1000,         .logic_volt = 1000 * 1000},
-       {.frequency = 816 * 1000,       .cpu_volt = 950 * 1000,         .logic_volt = 1000 * 1000},
-       {.frequency = 1008 * 1000,      .cpu_volt = 1025 * 1000,        .logic_volt = 1000 * 1000},
-       {.frequency = 1200 * 1000,      .cpu_volt = 1100 * 1000,        .logic_volt = 1050 * 1000},
-       {.frequency = 1416 * 1000,      .cpu_volt = 1200 * 1000,        .logic_volt = 1150 * 1000},
-       {.frequency = 1608 * 1000,      .cpu_volt = 1300 * 1000,        .logic_volt = 1250 * 1000},
-       {.frequency = CPUFREQ_TABLE_END},
+static struct cpufreq_frequency_table dvfs_arm_table[] = {
+        {.frequency = 312 * 1000,       .index = 800 * 1000},
+        {.frequency = 504 * 1000,       .index = 850 * 1000},
+        {.frequency = 816 * 1000,       .index = 900 * 1000},
+        {.frequency = 1008 * 1000,      .index = 950 * 1000},
+        {.frequency = 1200 * 1000,      .index = 1000 * 1000},
+        {.frequency = 1416 * 1000,      .index = 1075 * 1000},
+        {.frequency = 1608 * 1000,      .index = 1175 * 1000},
+        {.frequency = CPUFREQ_TABLE_END},
 };
 
 static struct cpufreq_frequency_table dvfs_gpu_table[] = {
-       {.frequency = 100 * 1000,       .index = 900 * 1000},
-       {.frequency = 200 * 1000,       .index = 900 * 1000},
-       {.frequency = 266 * 1000,       .index = 900 * 1000},
-       {.frequency = 300 * 1000,       .index = 900 * 1000},
-       {.frequency = 400 * 1000,       .index = 950 * 1000},
-       {.frequency = 600 * 1000,       .index = 1100 * 1000},
-       {.frequency = CPUFREQ_TABLE_END},
+        {.frequency = 100 * 1000,       .index = 900 * 1000},
+        {.frequency = 200 * 1000,       .index = 950 * 1000},
+        {.frequency = 266 * 1000,       .index = 950 * 1000},
+        {.frequency = 300 * 1000,       .index = 950 * 1000},
+        {.frequency = 400 * 1000,       .index = 1000 * 1000},
+        {.frequency = 600 * 1000,       .index = 1100 * 1000},
+        {.frequency = CPUFREQ_TABLE_END},
 };
 
 static struct cpufreq_frequency_table dvfs_ddr_table[] = {
-       {.frequency = 200 * 1000 + DDR_FREQ_SUSPEND,    .index = 900 * 1000},
-       {.frequency = 300 * 1000 + DDR_FREQ_VIDEO,      .index = 900 * 1000},
-       {.frequency = 400 * 1000 + DDR_FREQ_NORMAL,     .index = 1000 * 1000},
-       {.frequency = CPUFREQ_TABLE_END},
+        {.frequency = 300 * 1000,       .index = 950 * 1000},
+        {.frequency = 400 * 1000,       .index = 1000 * 1000},
+        {.frequency = CPUFREQ_TABLE_END},
 };
-#define DVFS_CPU_TABLE_SIZE    (ARRAY_SIZE(dvfs_cpu_logic_table))
-static struct cpufreq_frequency_table cpu_dvfs_table[DVFS_CPU_TABLE_SIZE];
-static struct cpufreq_frequency_table dep_cpu2core_table[DVFS_CPU_TABLE_SIZE];
+
+//#define DVFS_CPU_TABLE_SIZE  (ARRAY_SIZE(dvfs_cpu_logic_table))
+//static struct cpufreq_frequency_table cpu_dvfs_table[DVFS_CPU_TABLE_SIZE];
+//static struct cpufreq_frequency_table dep_cpu2core_table[DVFS_CPU_TABLE_SIZE];
 
 void __init board_clock_init(void)
 {
        rk30_clock_data_init(periph_pll_default, codec_pll_default, RK30_CLOCKS_DEFAULT_FLAGS);
-       dvfs_set_arm_logic_volt(dvfs_cpu_logic_table, cpu_dvfs_table, dep_cpu2core_table);
+       //dvfs_set_arm_logic_volt(dvfs_cpu_logic_table, cpu_dvfs_table, dep_cpu2core_table);    
+       dvfs_set_freq_volt_table(clk_get(NULL, "cpu"), dvfs_arm_table);
        dvfs_set_freq_volt_table(clk_get(NULL, "gpu"), dvfs_gpu_table);
        dvfs_set_freq_volt_table(clk_get(NULL, "ddr"), dvfs_ddr_table);
 }