aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLokesh Vutla2013-05-27 23:40:56 -0500
committerLokesh Vutla2013-05-29 04:34:34 -0500
commit61bc717b48e0cbd935c0ad401d9fcc20a2e2b267 (patch)
treec001e28891047a924e7bc114089644af606becc9
parent791560e6156563e5be8eb1297bfeee2c4789ec5b (diff)
downloadu-boot-61bc717b48e0cbd935c0ad401d9fcc20a2e2b267.tar.gz
u-boot-61bc717b48e0cbd935c0ad401d9fcc20a2e2b267.tar.xz
u-boot-61bc717b48e0cbd935c0ad401d9fcc20a2e2b267.zip
ARM: DRA7xx: clocks: Fixing i2c_init for PMIC
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>
-rw-r--r--arch/arm/cpu/armv7/omap-common/clocks-common.c1
-rw-r--r--arch/arm/cpu/armv7/omap-common/hwinit-common.c2
2 files changed, 1 insertions, 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 c51c3590c2..1861df4fa5 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)
721 case OMAP_INIT_CONTEXT_UBOOT_FROM_NOR: 721 case OMAP_INIT_CONTEXT_UBOOT_FROM_NOR:
722 case OMAP_INIT_CONTEXT_UBOOT_AFTER_CH: 722 case OMAP_INIT_CONTEXT_UBOOT_AFTER_CH:
723 enable_basic_clocks(); 723 enable_basic_clocks();
724 timer_init();
724 scale_vcores(*omap_vcores); 725 scale_vcores(*omap_vcores);
725 setup_dplls(); 726 setup_dplls();
726#ifdef CONFIG_SYS_CLOCKS_ENABLE_ALL 727#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 1645120de7..5602b0e199 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)
202#endif 202#endif
203 prcm_init(); 203 prcm_init();
204#ifdef CONFIG_SPL_BUILD 204#ifdef CONFIG_SPL_BUILD
205 timer_init();
206
207 /* For regular u-boot sdram_init() is called from dram_init() */ 205 /* For regular u-boot sdram_init() is called from dram_init() */
208 sdram_init(); 206 sdram_init();
209#endif 207#endif