diff options
author | Lokesh Vutla <lokeshvutla@ti.com> | 2016-10-14 05:05:23 (GMT) |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2016-11-21 14:49:58 (GMT) |
commit | c704a99dff693d3e2d0fe1ad095febb89f872de9 (patch) | |
tree | 009a2ed64e406d38af89406f40d07575815f3d6f /arch/arm/cpu/armv7/am33xx | |
parent | 693d4c9f1dc40fcf24ced459bc4d1b46db33298a (diff) | |
download | u-boot-c704a99dff693d3e2d0fe1ad095febb89f872de9.tar.xz |
ARM: AMx3xx: Allow arch specific 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. This is inspired by commit e850ed82bce8 ("ARM: OMAP4+: Allow
arch specific code to use early DM")
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'arch/arm/cpu/armv7/am33xx')
-rw-r--r-- | arch/arm/cpu/armv7/am33xx/board.c | 26 |
1 files changed, 20 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv7/am33xx/board.c b/arch/arm/cpu/armv7/am33xx/board.c index 68baded..1ba4ec5 100644 --- a/arch/arm/cpu/armv7/am33xx/board.c +++ b/arch/arm/cpu/armv7/am33xx/board.c @@ -270,15 +270,11 @@ static void watchdog_disable(void) ; } -#ifdef CONFIG_SPL_BUILD -void board_init_f(ulong dummy) +void s_init(void) { - board_early_init_f(); - sdram_init(); } -#endif -void s_init(void) +void early_system_init(void) { /* * The ROM will only have set up sufficient pinmux to allow for the @@ -297,4 +293,22 @@ void s_init(void) rtc32k_enable(); #endif } + +#ifdef CONFIG_SPL_BUILD +void board_init_f(ulong dummy) +{ + early_system_init(); + board_early_init_f(); + sdram_init(); +} #endif + +#endif + +int arch_cpu_init_dm(void) +{ +#ifndef CONFIG_SKIP_LOWLEVEL_INIT + early_system_init(); +#endif + return 0; +} |