rk:move pmic_type to board.h
[firefly-linux-kernel-4.4.55.git] / arch / arm / mach-rk30 / board-rk3066b-sdk.c
index 42abb708690cc31888ace78c2760c158c30bd484..8c01f5e92182ecac24e7f01a4fc6408dd190e809 100755 (executable)
@@ -1326,8 +1326,6 @@ static struct i2c_board_info __initdata i2c0_info[] = {
 };
 #endif
 
-#define PMIC_TYPE_WM8326       1
-#define PMIC_TYPE_TPS65910     2
 int __sramdata g_pmic_type =  0;
 #ifdef CONFIG_I2C1_RK30
 #ifdef CONFIG_MFD_WM831X_I2C
@@ -1367,11 +1365,11 @@ static struct i2c_board_info __initdata i2c1_info[] = {
 void __sramfunc board_pmu_suspend(void)
 {      
        #if defined (CONFIG_MFD_WM831X_I2C)
-       if(g_pmic_type == PMIC_TYPE_WM8326)
+       if(pmic_is_wm8326())
        board_pmu_wm8326_suspend();
        #endif
        #if defined (CONFIG_MFD_TPS65910)
-       if(g_pmic_type == PMIC_TYPE_TPS65910)
+       if(pmic_is_tps65910())
        board_pmu_tps65910_suspend(); 
     #endif   
 }
@@ -1379,11 +1377,11 @@ void __sramfunc board_pmu_suspend(void)
 void __sramfunc board_pmu_resume(void)
 {      
        #if defined (CONFIG_MFD_WM831X_I2C)
-       if(g_pmic_type == PMIC_TYPE_WM8326)
+       if(pmic_is_wm8326())
        board_pmu_wm8326_resume();
        #endif
        #if defined (CONFIG_MFD_TPS65910)
-       if(g_pmic_type == PMIC_TYPE_TPS65910)
+       if(pmic_is_tps65910())
        board_pmu_tps65910_resume(); 
        #endif
 }
@@ -1577,33 +1575,31 @@ static void __init rk30_reserve(void)
  * comments    : min arm/logic voltage
  */
 static struct dvfs_arm_table dvfs_cpu_logic_table[] = {
-       {.frequency = 252 * 1000,       .cpu_volt = 1000 * 1000,        .logic_volt = 1000 * 1000},
-       {.frequency = 504 * 1000,       .cpu_volt = 1000 * 1000,        .logic_volt = 1000 * 1000},
-       {.frequency = 816 * 1000,       .cpu_volt = 1000 * 1000,        .logic_volt = 1000 * 1000},
-       {.frequency = 1008 * 1000,      .cpu_volt = 1000 * 1000,        .logic_volt = 1000 * 1000},
-       {.frequency = 1200 * 1000,      .cpu_volt = 1000 * 1000,        .logic_volt = 1000 * 1000},
-#if 0
-       {.frequency = 1272 * 1000,      .cpu_volt = 1225 * 1000,        .logic_volt = 1200 * 1000},
-       {.frequency = 1416 * 1000,      .cpu_volt = 1300 * 1000,        .logic_volt = 1200 * 1000},
-       {.frequency = 1512 * 1000,      .cpu_volt = 1350 * 1000,        .logic_volt = 1250 * 1000},
-       {.frequency = 1608 * 1000,      .cpu_volt = 1425 * 1000,        .logic_volt = 1300 * 1000},
-#endif
+       {.frequency = 312 * 1000,       .cpu_volt = 750 * 1000,         .logic_volt = 900 * 1000},
+       {.frequency = 504 * 1000,       .cpu_volt = 800 * 1000,         .logic_volt = 900 * 1000},
+       {.frequency = 816 * 1000,       .cpu_volt = 850 * 1000,         .logic_volt = 900 * 1000},
+       {.frequency = 1008 * 1000,      .cpu_volt = 925 * 1000,         .logic_volt = 900 * 1000},
+       {.frequency = 1200 * 1000,      .cpu_volt = 1000 * 1000,        .logic_volt = 950 * 1000},
+       {.frequency = 1416 * 1000,      .cpu_volt = 1100 * 1000,        .logic_volt = 1050 * 1000},
+       {.frequency = 1608 * 1000,      .cpu_volt = 1200 * 1000,        .logic_volt = 1150 * 1000},
        {.frequency = CPUFREQ_TABLE_END},
 };
 
 static struct cpufreq_frequency_table dvfs_gpu_table[] = {
-       {.frequency = 266 * 1000,       .index = 1000 * 1000},
-       {.frequency = 400 * 1000,       .index = 1000 * 1000},
-       {.frequency = 600 * 1000,       .index = 1200 * 1000},
+       {.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},
 };
 
 static struct cpufreq_frequency_table dvfs_ddr_table[] = {
-       {.frequency = 300 * 1000,       .index = 1000 * 1000},
-       {.frequency = 400 * 1000,       .index = 1000 * 1000},
+       {.frequency = 300 * 1000,       .index = 900 * 1000},
+       {.frequency = 400 * 1000,       .index = 950 * 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];