diff options
author | Paul Walmsley <paul@pwsan.com> | 2012-09-07 14:16:35 -0400 |
---|---|---|
committer | Kevin Hilman <khilman@ti.com> | 2012-10-08 17:58:39 -0400 |
commit | e2ee1b4d86f53c49c06a14dc10616f6d8aa05ea9 (patch) | |
tree | 0db6858c196dfcc6712366fae90ab6174099074e /drivers/cpufreq/omap-cpufreq.c | |
parent | 4075944b4c724ca70bdc5086527b55e73db546b4 (diff) |
cpufreq: OMAP: fix clock usage to be SoC independent, remove plat/ includes
OMAP core code now has SoC-independent clock alias for the scalable
CPU clock. Using it means driver is SoC independent and will work for
AM3xxx SoCs as well as OMAP1/3/4.
While here, remove some unnecessary plat/ includes that are
interfering with multi-subarch ARM kernels.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
[tony@atomide.com: updated already changed clock aliases]
Signed-off-by: Tony Lindgren <tony@atomide.com>
[khilman@ti.com: minor shortlog/changelog updates]
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Kevin Hilman <khilman@ti.com>
Diffstat (limited to 'drivers/cpufreq/omap-cpufreq.c')
-rw-r--r-- | drivers/cpufreq/omap-cpufreq.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/cpufreq/omap-cpufreq.c b/drivers/cpufreq/omap-cpufreq.c index 7d4d4559e522..5d1f5e442ecc 100644 --- a/drivers/cpufreq/omap-cpufreq.c +++ b/drivers/cpufreq/omap-cpufreq.c | |||
@@ -30,19 +30,14 @@ | |||
30 | #include <asm/smp_plat.h> | 30 | #include <asm/smp_plat.h> |
31 | #include <asm/cpu.h> | 31 | #include <asm/cpu.h> |
32 | 32 | ||
33 | #include <plat/clock.h> | ||
34 | #include <plat/common.h> | ||
35 | #include <plat/omap_device.h> | 33 | #include <plat/omap_device.h> |
36 | 34 | ||
37 | #include <mach/hardware.h> | ||
38 | |||
39 | /* OPP tolerance in percentage */ | 35 | /* OPP tolerance in percentage */ |
40 | #define OPP_TOLERANCE 4 | 36 | #define OPP_TOLERANCE 4 |
41 | 37 | ||
42 | static struct cpufreq_frequency_table *freq_table; | 38 | static struct cpufreq_frequency_table *freq_table; |
43 | static atomic_t freq_table_users = ATOMIC_INIT(0); | 39 | static atomic_t freq_table_users = ATOMIC_INIT(0); |
44 | static struct clk *mpu_clk; | 40 | static struct clk *mpu_clk; |
45 | static char *mpu_clk_name; | ||
46 | static struct device *mpu_dev; | 41 | static struct device *mpu_dev; |
47 | static struct regulator *mpu_reg; | 42 | static struct regulator *mpu_reg; |
48 | 43 | ||
@@ -179,7 +174,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) | |||
179 | { | 174 | { |
180 | int result = 0; | 175 | int result = 0; |
181 | 176 | ||
182 | mpu_clk = clk_get(NULL, mpu_clk_name); | 177 | mpu_clk = clk_get(NULL, "cpufreq_ck"); |
183 | if (IS_ERR(mpu_clk)) | 178 | if (IS_ERR(mpu_clk)) |
184 | return PTR_ERR(mpu_clk); | 179 | return PTR_ERR(mpu_clk); |
185 | 180 | ||
@@ -260,18 +255,6 @@ static struct cpufreq_driver omap_driver = { | |||
260 | 255 | ||
261 | static int __init omap_cpufreq_init(void) | 256 | static int __init omap_cpufreq_init(void) |
262 | { | 257 | { |
263 | if (cpu_is_omap24xx()) | ||
264 | mpu_clk_name = "virt_prcm_set"; | ||
265 | else if (cpu_is_omap34xx()) | ||
266 | mpu_clk_name = "dpll1_ck"; | ||
267 | else if (cpu_is_omap44xx()) | ||
268 | mpu_clk_name = "dpll_mpu_ck"; | ||
269 | |||
270 | if (!mpu_clk_name) { | ||
271 | pr_err("%s: unsupported Silicon?\n", __func__); | ||
272 | return -EINVAL; | ||
273 | } | ||
274 | |||
275 | mpu_dev = omap_device_get_by_hwmod_name("mpu"); | 258 | mpu_dev = omap_device_get_by_hwmod_name("mpu"); |
276 | if (IS_ERR(mpu_dev)) { | 259 | if (IS_ERR(mpu_dev)) { |
277 | pr_warning("%s: unable to get the mpu device\n", __func__); | 260 | pr_warning("%s: unable to get the mpu device\n", __func__); |