Commit e2ee1b4d authored by Paul Walmsley's avatar Paul Walmsley Committed by Kevin Hilman

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: default avatarPaul Walmsley <paul@pwsan.com>
[tony@atomide.com: updated already changed clock aliases]
Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
[khilman@ti.com: minor shortlog/changelog updates]
Acked-by: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarKevin Hilman <khilman@ti.com>
parent 4075944b
...@@ -30,19 +30,14 @@ ...@@ -30,19 +30,14 @@
#include <asm/smp_plat.h> #include <asm/smp_plat.h>
#include <asm/cpu.h> #include <asm/cpu.h>
#include <plat/clock.h>
#include <plat/common.h>
#include <plat/omap_device.h> #include <plat/omap_device.h>
#include <mach/hardware.h>
/* OPP tolerance in percentage */ /* OPP tolerance in percentage */
#define OPP_TOLERANCE 4 #define OPP_TOLERANCE 4
static struct cpufreq_frequency_table *freq_table; static struct cpufreq_frequency_table *freq_table;
static atomic_t freq_table_users = ATOMIC_INIT(0); static atomic_t freq_table_users = ATOMIC_INIT(0);
static struct clk *mpu_clk; static struct clk *mpu_clk;
static char *mpu_clk_name;
static struct device *mpu_dev; static struct device *mpu_dev;
static struct regulator *mpu_reg; static struct regulator *mpu_reg;
...@@ -179,7 +174,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy) ...@@ -179,7 +174,7 @@ static int __cpuinit omap_cpu_init(struct cpufreq_policy *policy)
{ {
int result = 0; int result = 0;
mpu_clk = clk_get(NULL, mpu_clk_name); mpu_clk = clk_get(NULL, "cpufreq_ck");
if (IS_ERR(mpu_clk)) if (IS_ERR(mpu_clk))
return PTR_ERR(mpu_clk); return PTR_ERR(mpu_clk);
...@@ -260,18 +255,6 @@ static struct cpufreq_driver omap_driver = { ...@@ -260,18 +255,6 @@ static struct cpufreq_driver omap_driver = {
static int __init omap_cpufreq_init(void) static int __init omap_cpufreq_init(void)
{ {
if (cpu_is_omap24xx())
mpu_clk_name = "virt_prcm_set";
else if (cpu_is_omap34xx())
mpu_clk_name = "dpll1_ck";
else if (cpu_is_omap44xx())
mpu_clk_name = "dpll_mpu_ck";
if (!mpu_clk_name) {
pr_err("%s: unsupported Silicon?\n", __func__);
return -EINVAL;
}
mpu_dev = omap_device_get_by_hwmod_name("mpu"); mpu_dev = omap_device_get_by_hwmod_name("mpu");
if (IS_ERR(mpu_dev)) { if (IS_ERR(mpu_dev)) {
pr_warning("%s: unable to get the mpu device\n", __func__); pr_warning("%s: unable to get the mpu device\n", __func__);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment