diff options
Diffstat (limited to 'arch/arm/mach-mx5/cpu.c')
-rwxr-xr-x | arch/arm/mach-mx5/cpu.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/arch/arm/mach-mx5/cpu.c b/arch/arm/mach-mx5/cpu.c index eab15144df45..4d36655d44f9 100755 --- a/arch/arm/mach-mx5/cpu.c +++ b/arch/arm/mach-mx5/cpu.c @@ -17,6 +17,9 @@ #include <linux/clk.h> #include <linux/module.h> #include <linux/iram_alloc.h> +#include <linux/regulator/consumer.h> +#include <linux/err.h> + #include <mach/hardware.h> #include <asm/io.h> @@ -33,10 +36,11 @@ void __iomem *arm_plat_base; void __iomem *gpc_base; void __iomem *ccm_base; +struct cpu_op *(*get_cpu_op)(int *op); + extern void init_ddr_settings(void); static int cpu_silicon_rev = -1; -void (*set_num_cpu_op)(int num); #define IIM_SREV 0x24 #define MX50_HW_ADADIG_DIGPROG 0xB0 @@ -168,6 +172,18 @@ static int get_mx50_srev(void) return 0; } +int mx5_set_cpu_voltage(struct regulator *gp_reg, u32 cpu_volt) +{ + u32 ret = 0; + + if (!IS_ERR(gp_reg)) { + ret = regulator_set_voltage(gp_reg, cpu_volt, cpu_volt); + if (ret < 0) + printk(KERN_DEBUG "COULD NOT SET GP VOLTAGE!!!!\n"); + } + return ret; +} + /* * Returns: * the silicon revision of the cpu |