Skip to contentSkip to conversation

cpufreq: exynos: remove dead ->need_apll_change method

PATCH In review Bartlomiej Zolnierkiewicz 2 participants 2 messages Mar 27, 2015 – Mar 28, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cpufreq: exynos: remove dead ->need_apll_change method

Commit 26ab1c62b6e1 ("cpufreq: exynos5250: Set APLL rate using CCF API") removed the last user of ->need_apll_change method. Remove it and then cleanup exynos_cpufreq_scale() accordingly.

This patch was tested on Exynos4412 SoC based Trats2 board.

There should be no functional changes caused by this patch.

Cc Sachin Kamat <[email protected]>
Cc Lukasz Majewski <[email protected]>
Cc Kukjin Kim <[email protected]>
---
 drivers/cpufreq/exynos-cpufreq.c |   30 +++---------------------------
 drivers/cpufreq/exynos-cpufreq.h |    1 -
 2 files changed, 3 insertions(+), 28 deletions(-)
drivers/cpufreq/exynos-cpufreq.c +3 -27
index 82d2fbb..01ed166 100644
@@ -45,11 +45,9 @@ static int exynos_cpufreq_get_index(unsigned int freq)
 
 static int exynos_cpufreq_scale(unsigned int target_freq)
 {
-	struct cpufreq_frequency_table *freq_table = exynos_info->freq_table;
 	unsigned int *volt_table = exynos_info->volt_table;
 	struct cpufreq_policy *policy = cpufreq_cpu_get(0);
-	unsigned int arm_volt, safe_arm_volt = 0;
-	unsigned int mpll_freq_khz = exynos_info->mpll_freq_khz;
+	unsigned int arm_volt;
 	struct device *dev = exynos_info->dev;
 	unsigned int old_freq;
 	int index, old_index;
@@ -74,21 +72,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
 		goto out;
 	}
 
-	/*
-	 * ARM clock source will be changed APLL to MPLL temporary
-	 * To support this level, need to control regulator for
-	 * required voltage level
-	 */
-	if (exynos_info->need_apll_change != NULL) {
-		if (exynos_info->need_apll_change(old_index, index) &&
-		   (freq_table[index].frequency < mpll_freq_khz) &&
-		   (freq_table[old_index].frequency < mpll_freq_khz))
-			safe_arm_volt = volt_table[exynos_info->pll_safe_idx];
-	}
 	arm_volt = volt_table[index];
 
 	/* When the new frequency is higher than current frequency */
-	if ((target_freq > old_freq) && !safe_arm_volt) {
+	if (target_freq > old_freq) {
 		/* Firstly, voltage up to increase frequency */
 		ret = regulator_set_voltage(arm_regulator, arm_volt, arm_volt);
 		if (ret) {
@@ -98,21 +85,10 @@ static int exynos_cpufreq_scale(unsigned int target_freq)
 		}
 	}
 
-	if (safe_arm_volt) {
-		ret = regulator_set_voltage(arm_regulator, safe_arm_volt,
-				      safe_arm_volt);
-		if (ret) {
-			dev_err(dev, "failed to set cpu voltage to %d\n",
-				safe_arm_volt);
-			return ret;
-		}
-	}
-
 	exynos_info->set_freq(old_index, index);
 
 	/* When the new frequency is lower than current frequency */
-	if ((target_freq < old_freq) ||
-	   ((target_freq > old_freq) && safe_arm_volt)) {
+	if (target_freq < old_freq) {
 		/* down the voltage after frequency change */
 		ret = regulator_set_voltage(arm_regulator, arm_volt,
 				arm_volt);
drivers/cpufreq/exynos-cpufreq.h +0 -1
index 9f2062a..fe5a105 100644
@@ -49,7 +49,6 @@ struct exynos_dvfs_info {
 	unsigned int	*volt_table;
 	struct cpufreq_frequency_table	*freq_table;
 	void (*set_freq)(unsigned int, unsigned int);
-	bool (*need_apll_change)(unsigned int, unsigned int);
 	void __iomem	*cmu_regs;
 };
 
Signature · 1 line
1.7.9.5
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 9 lines · Bartlomiej Zolnierkiewicz

Commit 26ab1c62b6e1 ("cpufreq: exynos5250: Set APLL rate using CCF API") removed the last user of ->need_apll_change method. Remove it and then cleanup exynos_cpufreq_scale() accordingly.

This patch was tested on Exynos4412 SoC based Trats2 board.

There should be no functional changes caused by this patch.

Quoted 8 lines
Cc Sachin Kamat <[email protected]>
Cc Lukasz Majewski <[email protected]>
Cc Kukjin Kim <[email protected]>
---
 drivers/cpufreq/exynos-cpufreq.c |   30 +++---------------------------
 drivers/cpufreq/exynos-cpufreq.h |    1 -
 2 files changed, 3 insertions(+), 28 deletions(-)

@Kukjin: please take it through your tree.