mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
rk3168: dvfs support voltage diff = 0
This commit is contained in:
@@ -87,14 +87,14 @@ static int g_logic_high_arm = 100 * 1000;
|
||||
|
||||
#ifdef CONFIG_SOC_RK3168
|
||||
static struct cpufreq_frequency_table arm_high_logic_table[] = {
|
||||
{.frequency = 1416 * DVFS_KHZ, .index = 25 * DVFS_MV},
|
||||
{.frequency = 1608 * DVFS_KHZ, .index = 25 * DVFS_MV},
|
||||
{.frequency = 1416 * DVFS_KHZ, .index = 0 * DVFS_MV},
|
||||
{.frequency = 1608 * DVFS_KHZ, .index = 0 * DVFS_MV},
|
||||
{.frequency = CPUFREQ_TABLE_END},
|
||||
};
|
||||
|
||||
static struct cpufreq_frequency_table logic_high_arm_table[] = {
|
||||
{.frequency = 1008 * DVFS_KHZ, .index = 150 * DVFS_MV},
|
||||
{.frequency = 1608 * DVFS_KHZ, .index = 75 * DVFS_MV},
|
||||
{.frequency = 1008 * DVFS_KHZ, .index = 50 * DVFS_MV},
|
||||
{.frequency = 1608 * DVFS_KHZ, .index = 50 * DVFS_MV},
|
||||
{.frequency = CPUFREQ_TABLE_END},
|
||||
};
|
||||
#else
|
||||
|
||||
@@ -777,12 +777,17 @@ int dvfs_scale_volt(struct vd_node *vd_clk, struct vd_node *vd_dep,
|
||||
} else {
|
||||
volt_dep = volt + dep_biger_than_clk;
|
||||
}
|
||||
} else {
|
||||
} else if (volt < volt_dep){
|
||||
if (volt == volt_new) {
|
||||
volt_dep = volt + dep_biger_than_clk;
|
||||
} else {
|
||||
volt = volt_dep + clk_biger_than_dep;
|
||||
}
|
||||
} else {
|
||||
if (volt != volt_new)
|
||||
volt = volt_dep + clk_biger_than_dep;
|
||||
if (volt_dep != volt_dep_new)
|
||||
volt_dep = volt + dep_biger_than_clk;
|
||||
}
|
||||
volt = volt > volt_new ? volt_new : volt;
|
||||
volt_dep = volt_dep > volt_dep_new ? volt_dep_new : volt_dep;
|
||||
@@ -796,12 +801,17 @@ int dvfs_scale_volt(struct vd_node *vd_clk, struct vd_node *vd_dep,
|
||||
} else {
|
||||
volt = volt_dep - dep_biger_than_clk;
|
||||
}
|
||||
} else {
|
||||
} else if (volt < volt_dep){
|
||||
if (volt_dep == volt_dep_new) {
|
||||
volt = volt_dep - dep_biger_than_clk;
|
||||
} else {
|
||||
volt_dep = volt - clk_biger_than_dep;
|
||||
}
|
||||
} else {
|
||||
if (volt != volt_new)
|
||||
volt = volt_dep - dep_biger_than_clk;
|
||||
if (volt_dep != volt_dep_new)
|
||||
volt_dep = volt - clk_biger_than_dep;
|
||||
}
|
||||
volt = volt < volt_new ? volt_new : volt;
|
||||
volt_dep = volt_dep < volt_dep_new ? volt_dep_new : volt_dep;
|
||||
|
||||
Reference in New Issue
Block a user