diff options
| author | SRICHARAN R <r.sricharan@ti.com> | 2013-02-04 04:22:02 +0000 | 
|---|---|---|
| committer | Tom Rini <trini@ti.com> | 2013-03-11 11:06:10 -0400 | 
| commit | 3fcdd4a5f8ba0e0fac4b2afdb5e90efac9f7f301 (patch) | |
| tree | eba59f79109e214726acd882ae64083641700d82 /arch/arm/include/asm/omap_common.h | |
| parent | ee9447bfe37a646a8dce182e6f625f27c10512a0 (diff) | |
| download | olio-uboot-2014.01-3fcdd4a5f8ba0e0fac4b2afdb5e90efac9f7f301.tar.xz olio-uboot-2014.01-3fcdd4a5f8ba0e0fac4b2afdb5e90efac9f7f301.zip | |
ARM: OMAP4+: Clean up the pmic code
The pmic code is duplicated for OMAP 4 and 5.
Instead move the data to Soc specific place and
share the code.
Signed-off-by: R Sricharan <r.sricharan@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@ti.com>
Diffstat (limited to 'arch/arm/include/asm/omap_common.h')
| -rw-r--r-- | arch/arm/include/asm/omap_common.h | 24 | 
1 files changed, 24 insertions, 0 deletions
| diff --git a/arch/arm/include/asm/omap_common.h b/arch/arm/include/asm/omap_common.h index c2d8388b3..eee6893d6 100644 --- a/arch/arm/include/asm/omap_common.h +++ b/arch/arm/include/asm/omap_common.h @@ -364,10 +364,31 @@ struct dplls {  	const struct dpll_params *usb;  }; +struct pmic_data { +	u32 base_offset; +	u32 step; +	u32 start_code; +	unsigned gpio; +	int gpio_en; +}; + +struct volts { +	u32 value; +	u32 addr; +	struct pmic_data *pmic; +}; + +struct vcores_data { +	struct volts mpu; +	struct volts core; +	struct volts mm; +}; +  extern struct prcm_regs const **prcm;  extern struct prcm_regs const omap5_es1_prcm;  extern struct prcm_regs const omap4_prcm;  extern struct dplls const **dplls_data; +extern struct vcores_data const **omap_vcores;  extern const u32 sys_clk_array[8];  void hw_data_init(void); @@ -391,6 +412,9 @@ u32 get_sys_clk_index(void);  void enable_basic_clocks(void);  void enable_basic_uboot_clocks(void);  void enable_non_essential_clocks(void); +void scale_vcores(struct vcores_data const *); +u32 get_offset_code(u32 volt_offset, struct pmic_data *pmic); +void do_scale_vcore(u32 vcore_reg, u32 volt_mv, struct pmic_data *pmic);  /* Max value for DPLL multiplier M */  #define OMAP_DPLL_MAX_N	127 |