aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/exynos-cpufreq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/cpufreq/exynos-cpufreq.c')
-rw-r--r--drivers/cpufreq/exynos-cpufreq.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/cpufreq/exynos-cpufreq.c b/drivers/cpufreq/exynos-cpufreq.c
index f7c322c7d7ed..4ee3804637be 100644
--- a/drivers/cpufreq/exynos-cpufreq.c
+++ b/drivers/cpufreq/exynos-cpufreq.c
@@ -31,11 +31,6 @@ static unsigned int locking_frequency;
31static bool frequency_locked; 31static bool frequency_locked;
32static DEFINE_MUTEX(cpufreq_lock); 32static DEFINE_MUTEX(cpufreq_lock);
33 33
34static unsigned int exynos_getspeed(unsigned int cpu)
35{
36 return clk_get_rate(exynos_info->cpu_clk) / 1000;
37}
38
39static int exynos_cpufreq_get_index(unsigned int freq) 34static int exynos_cpufreq_get_index(unsigned int freq)
40{ 35{
41 struct cpufreq_frequency_table *freq_table = exynos_info->freq_table; 36 struct cpufreq_frequency_table *freq_table = exynos_info->freq_table;
@@ -215,6 +210,7 @@ static struct notifier_block exynos_cpufreq_nb = {
215 210
216static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy) 211static int exynos_cpufreq_cpu_init(struct cpufreq_policy *policy)
217{ 212{
213 policy->clk = exynos_info->cpu_clk;
218 return cpufreq_generic_init(policy, exynos_info->freq_table, 100000); 214 return cpufreq_generic_init(policy, exynos_info->freq_table, 100000);
219} 215}
220 216
@@ -222,7 +218,7 @@ static struct cpufreq_driver exynos_driver = {
222 .flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK, 218 .flags = CPUFREQ_STICKY | CPUFREQ_NEED_INITIAL_FREQ_CHECK,
223 .verify = cpufreq_generic_frequency_table_verify, 219 .verify = cpufreq_generic_frequency_table_verify,
224 .target_index = exynos_target, 220 .target_index = exynos_target,
225 .get = exynos_getspeed, 221 .get = cpufreq_generic_get,
226 .init = exynos_cpufreq_cpu_init, 222 .init = exynos_cpufreq_cpu_init,
227 .exit = cpufreq_generic_exit, 223 .exit = cpufreq_generic_exit,
228 .name = "exynos_cpufreq", 224 .name = "exynos_cpufreq",
@@ -264,7 +260,7 @@ static int exynos_cpufreq_probe(struct platform_device *pdev)
264 goto err_vdd_arm; 260 goto err_vdd_arm;
265 } 261 }
266 262
267 locking_frequency = exynos_getspeed(0); 263 locking_frequency = clk_get_rate(exynos_info->cpu_clk) / 1000;
268 264
269 register_pm_notifier(&exynos_cpufreq_nb); 265 register_pm_notifier(&exynos_cpufreq_nb);
270 266