[U-Boot] [PATCH V2 03/12] ARM: DRA7xx: clocks: Fixing i2c_init for PMIC

Lokesh Vutla
2013-05-30T13:19:30Z

In DRA7xx Soc's voltage scaling is done using GPI2C.
So i2c_init should happen before scaling. I2C driver
uses __udelay which needs timer to be initialized.
So moving timer_init just before voltage scaling.
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
---
arch/arm/cpu/armv7/omap-common/clocks-common.c | 1 +
arch/arm/cpu/armv7/omap-common/hwinit-common.c | 2 --
2 files changed, 1 insertion(+), 2 deletions(-)

diff --git a/arch/arm/cpu/armv7/omap-common/clocks-common.c b/arch/arm/cpu/armv7/omap-common/clocks-common.c
index dc57516..0a5bda5 100644
--- a/arch/arm/cpu/armv7/omap-common/clocks-common.c
+++ b/arch/arm/cpu/armv7/omap-common/clocks-common.c
@@ -721,6 +721,7 @@ void prcm_init(void)
case OMAP_INIT_CONTEXT_UBOOT_FROM_NOR:
case OMAP_INIT_CONTEXT_UBOOT_AFTER_CH:
enable_basic_clocks();
+ timer_init();
scale_vcores(*omap_vcores);
setup_dplls();
#ifdef CONFIG_SYS_CLOCKS_ENABLE_ALL
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
index 1645120..5602b0e 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
@@ -202,8 +202,6 @@ void s_init(void)
#endif
prcm_init();
#ifdef CONFIG_SPL_BUILD
- timer_init();
-
/* For regular u-boot sdram_init() is called from dram_init() */
sdram_init();
#endif
--
1.7.9.5