omap: detect the board after DM is available
authorJean-Jacques Hiblot <jjhiblot@ti.com>
Fri, 7 Dec 2018 13:50:45 +0000 (14:50 +0100)
committerHeiko Schocher <hs@denx.de>
Mon, 10 Dec 2018 05:14:47 +0000 (06:14 +0100)
In order to use DM_I2C, we need to move the board detection after the
early SPL initialization.

Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Tom Rini <trini@konsulko.com>
Reviewed-by: Heiko Schocher <hs@denx.de>
arch/arm/mach-omap2/am33xx/board.c
arch/arm/mach-omap2/hwinit-common.c

index c121f27a228b8b81800b9169d8f54082e99ce422..2fc364d112afebdf497efe16f532de3fd10ded52 100644 (file)
@@ -472,12 +472,15 @@ void early_system_init(void)
 #ifdef CONFIG_DEBUG_UART_OMAP
        debug_uart_init();
 #endif
-#ifdef CONFIG_TI_I2C_BOARD_DETECT
-       do_board_detect();
-#endif
+
 #ifdef CONFIG_SPL_BUILD
        spl_early_init();
 #endif
+
+#ifdef CONFIG_TI_I2C_BOARD_DETECT
+       do_board_detect();
+#endif
+
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
        /* Enable RTC32K clock */
        rtc32k_enable();
index 1a24acb74818de17c5a3f35379bba12160cc1d1d..d0781d747fafd5b9ebbbaaefe6e9ce4e192ca8c4 100644 (file)
@@ -193,11 +193,10 @@ void early_system_init(void)
         * to prevent overwrites.
         */
        save_omap_boot_params();
-#endif
-       do_board_detect();
-#ifdef CONFIG_SPL_BUILD
        spl_early_init();
 #endif
+       do_board_detect();
+
        vcores_init();
 #ifdef CONFIG_DEBUG_UART_OMAP
        debug_uart_init();