summaryrefslogtreecommitdiff
path: root/arch/arm/plat-mxc/dvfs_core.c
diff options
context:
space:
mode:
authorRanjani Vaidyanathan <ra5478@freescale.com>2011-08-11 12:27:05 -0500
committerJason Liu <r64343@freescale.com>2012-07-20 13:15:32 +0800
commitaf5ce25c1a8cdeb2ca8d185530f23293d4030398 (patch)
treefe3da03237df02ac9624fd5c2d2360f18c827fa3 /arch/arm/plat-mxc/dvfs_core.c
parent957bc47ffbad8532f0e8f6463946e8c04bc3176f (diff)
ENGR00154748: MX5x: Add CPUFREQ and DVFS support to 2.6.38
Enable CPUFREQ on 2.6.38 Remove the dependency between CPUFREQ and bus_freq driver. Allow for CPUFREQ and DVFS-CORE to co-exist. Signed-off-by: Ranjani Vaidyanathan <ra5478@freescale.com>
Diffstat (limited to 'arch/arm/plat-mxc/dvfs_core.c')
-rwxr-xr-xarch/arm/plat-mxc/dvfs_core.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/arm/plat-mxc/dvfs_core.c b/arch/arm/plat-mxc/dvfs_core.c
index 79c90b91b56f..846fee95b713 100755
--- a/arch/arm/plat-mxc/dvfs_core.c
+++ b/arch/arm/plat-mxc/dvfs_core.c
@@ -112,8 +112,10 @@ static struct clk *pll1_sw_clk;
static struct clk *cpu_clk;
static struct clk *dvfs_clk;
static struct regulator *core_regulator;
+extern struct regulator *(*get_cpu_regulator)(void);
+extern void*(*put_cpu_regulator)(void);
-extern int cpu_op_nr;
+static int cpu_op_nr;
#ifdef CONFIG_ARCH_MX5
extern struct cpu_op *(*get_cpu_op)(int *op);
#endif
@@ -280,7 +282,6 @@ static int set_cpu_freq(int op)
"No need to change freq and voltage!!!!\n");
return 0;
}
-
/* Check if FSVAI indicate freq up */
if (podf < arm_podf) {
ret = regulator_set_voltage(core_regulator,
@@ -348,7 +349,7 @@ static int set_cpu_freq(int op)
gp_volt, gp_volt);
if (ret < 0) {
printk(KERN_DEBUG
- "COULD NOT SET GP VOLTAGE!!!!\n");
+ "COULD NOT SET GP VOLTAGE\n!!!");
return ret;
}
udelay(dvfs_data->delay_time);
@@ -852,7 +853,7 @@ static int __devinit mxc_dvfs_core_probe(struct platform_device *pdev)
return PTR_ERR(dvfs_clk);
}
- core_regulator = regulator_get(NULL, dvfs_data->reg_id);
+ core_regulator = get_cpu_regulator();
if (IS_ERR(core_regulator)) {
clk_put(cpu_clk);
clk_put(dvfs_clk);