aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/cpufreq/omap-cpufreq.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c
index 0a5d95c4f8eb..3651825e7fb9 100644
--- a/drivers/cpufreq/omap-cpufreq.c
+++ b/drivers/cpufreq/omap-cpufreq.c
@@ -49,6 +49,7 @@ static struct lpj_info global_lpj_ref;
49 49
50static struct cpufreq_frequency_table *freq_table; 50static struct cpufreq_frequency_table *freq_table;
51static struct clk *mpu_clk; 51static struct clk *mpu_clk;
52static char *mpu_clk_name;
52 53
53static int omap_verify_speed(struct cpufreq_policy *policy) 54static int omap_verify_speed(struct cpufreq_policy *policy)
54{ 55{
@@ -153,13 +154,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
153 int result = 0; 154 int result = 0;
154 struct device *mpu_dev; 155 struct device *mpu_dev;
155 156
156 if (cpu_is_omap24xx()) 157 mpu_clk = clk_get(NULL, mpu_clk_name);
157 mpu_clk = clk_get(NULL, "virt_prcm_set");
158 else if (cpu_is_omap34xx())
159 mpu_clk = clk_get(NULL, "dpll1_ck");
160 else if (cpu_is_omap44xx())
161 mpu_clk = clk_get(NULL, "dpll_mpu_ck");
162
163 if (IS_ERR(mpu_clk)) 158 if (IS_ERR(mpu_clk))
164 return PTR_ERR(mpu_clk); 159 return PTR_ERR(mpu_clk);
165 160
@@ -233,6 +228,17 @@ static struct cpufreq_driver omap_driver = {
233 228
234static int __init omap_cpufreq_init(void) 229static int __init omap_cpufreq_init(void)
235{ 230{
231 if (cpu_is_omap24xx())
232 mpu_clk_name = "virt_prcm_set";
233 else if (cpu_is_omap34xx())
234 mpu_clk_name = "dpll1_ck";
235 else if (cpu_is_omap44xx())
236 mpu_clk_name = "dpll_mpu_ck";
237
238 if (!mpu_clk_name) {
239 pr_err("%s: unsupported Silicon?\n", __func__);
240 return -EINVAL;
241 }
236 return cpufreq_register_driver(&omap_driver); 242 return cpufreq_register_driver(&omap_driver);
237} 243}
238 244