omap: detect board before spl_early_init()
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 15 Sep 2017 10:57:33 +0000 (12:57 +0200)
committerTom Rini <trini@konsulko.com>
Fri, 6 Oct 2017 15:27:40 +0000 (11:27 -0400)
In order to be able to select the right DTB, we need to have identified the
board before spl_early_init() is called.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
arch/arm/mach-omap2/hwinit-common.c

index 7324d522ee6e06a61a9fc8f8860f4295bfbae9a5..56890a0c545caf215f16cc82c6248f044d5c519c 100644 (file)
@@ -165,9 +165,11 @@ void early_system_init(void)
         * to prevent overwrites.
         */
        save_omap_boot_params();
-       spl_early_init();
 #endif
        do_board_detect();
+#ifdef CONFIG_SPL_BUILD
+       spl_early_init();
+#endif
        vcores_init();
 #ifdef CONFIG_DEBUG_UART_OMAP
        debug_uart_init();