diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2013-05-30 02:54:33 +0000 |
---|---|---|
committer | Tom Rini <trini@ti.com> | 2013-06-10 08:43:09 -0400 |
commit | 4ca94d81869f8c9ba3e72eac3a99d3eef29df991 (patch) | |
tree | f20dc62eadba270614f604fef91f0219936998d7 /arch/arm/cpu/armv7/omap-common/vc.c | |
parent | af1d002f896e7f9cda47c384db31349cf923e95c (diff) | |
download | u-boot-imx-4ca94d81869f8c9ba3e72eac3a99d3eef29df991.zip u-boot-imx-4ca94d81869f8c9ba3e72eac3a99d3eef29df991.tar.gz u-boot-imx-4ca94d81869f8c9ba3e72eac3a99d3eef29df991.tar.bz2 |
ARM: OMAP4+: pmic: Make generic bus init and write functions
Voltage scaling can be done in two ways:
-> Using SR I2C
-> Using GP I2C
In order to support both, have a function pointer in pmic_data
so that we can call as per our requirement.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Diffstat (limited to 'arch/arm/cpu/armv7/omap-common/vc.c')
-rw-r--r-- | arch/arm/cpu/armv7/omap-common/vc.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/vc.c b/arch/arm/cpu/armv7/omap-common/vc.c index e6e5f78..a68f1d1 100644 --- a/arch/arm/cpu/armv7/omap-common/vc.c +++ b/arch/arm/cpu/armv7/omap-common/vc.c @@ -17,6 +17,7 @@ #include <common.h> #include <asm/omap_common.h> #include <asm/arch/sys_proto.h> +#include <asm/arch/clock.h> /* * Define Master code if there are multiple masters on the I2C_SR bus. @@ -57,7 +58,7 @@ * omap_vc_init() - Initialization for Voltage controller * @speed_khz: I2C buspeed in KHz */ -void omap_vc_init(u16 speed_khz) +static void omap_vc_init(u16 speed_khz) { u32 val; u32 sys_clk_khz, cycles_hi, cycles_low; @@ -137,3 +138,14 @@ int omap_vc_bypass_send_value(u8 sa, u8 reg_addr, u8 reg_data) /* All good.. */ return 0; } + +void sri2c_init(void) +{ + static int sri2c = 1; + + if (sri2c) { + omap_vc_init(PRM_VC_I2C_CHANNEL_FREQ_KHZ); + sri2c = 0; + } + return; +} |