summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/armv7
diff options
context:
space:
mode:
authorLokesh Vutla <lokeshvutla@ti.com>2016-03-07 14:49:54 +0530
committerTom Rini <trini@konsulko.com>2016-03-14 19:18:48 -0400
commite850ed82bce86323939b5ce8e53f0f11a66e02a9 (patch)
tree4d0746d9c3b7660ba4132df974c768bda9ebcc93 /arch/arm/cpu/armv7
parent29c20ba235bbe2af113dfc8f09e04c3c8f9bdec0 (diff)
downloadu-boot-imx-e850ed82bce86323939b5ce8e53f0f11a66e02a9.zip
u-boot-imx-e850ed82bce86323939b5ce8e53f0f11a66e02a9.tar.gz
u-boot-imx-e850ed82bce86323939b5ce8e53f0f11a66e02a9.tar.bz2
ARM: OMAP4+: Allow arch specfic code to use early DM
Early system initialization is being done before initf_dm is being called in U-Boot. Then system will fail to boot if any of the DM enabled driver is being called in this system initialization code. So, rearrange the code a bit so that DM enabled drivers can be called during early system initialization. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/cpu/armv7')
-rw-r--r--arch/arm/cpu/armv7/omap-common/hwinit-common.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/arch/arm/cpu/armv7/omap-common/hwinit-common.c b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
index 9e9376d..99634fd 100644
--- a/arch/arm/cpu/armv7/omap-common/hwinit-common.c
+++ b/arch/arm/cpu/armv7/omap-common/hwinit-common.c
@@ -107,21 +107,26 @@ void __weak do_board_detect(void)
{
}
-/*
- * Routine: s_init
- * Description: Does early system init of watchdog, muxing, andclocks
+void s_init(void)
+{
+}
+
+/**
+ * early_system_init - Does Early system initialization.
+ *
+ * Does early system init of watchdog, muxing, andclocks
* Watchdog disable is done always. For the rest what gets done
- * depends on the boot mode in which this function is executed
- * 1. s_init of SPL running from SRAM
- * 2. s_init of U-Boot running from FLASH
- * 3. s_init of U-Boot loaded to SDRAM by SPL
- * 4. s_init of U-Boot loaded to SDRAM by ROM code using the
+ * depends on the boot mode in which this function is executed when
+ * 1. SPL running from SRAM
+ * 2. U-Boot running from FLASH
+ * 3. U-Boot loaded to SDRAM by SPL
+ * 4. U-Boot loaded to SDRAM by ROM code using the
* Configuration Header feature
* Please have a look at the respective functions to see what gets
* done in each of these cases
* This function is called with SRAM stack.
*/
-void s_init(void)
+void early_system_init(void)
{
init_omap_revision();
hw_data_init();
@@ -145,6 +150,7 @@ void s_init(void)
#ifdef CONFIG_SPL_BUILD
void board_init_f(ulong dummy)
{
+ early_system_init();
#ifdef CONFIG_BOARD_EARLY_INIT_F
board_early_init_f();
#endif
@@ -153,6 +159,12 @@ void board_init_f(ulong dummy)
}
#endif
+int arch_cpu_init_dm(void)
+{
+ early_system_init();
+ return 0;
+}
+
/*
* Routine: wait_for_command_complete
* Description: Wait for posting to finish on watchdog