diff mbox series

[U-Boot,RESEND,v3,09/19] omap: detect the board after DM is available

Message ID 1544190655-4405-10-git-send-email-jjhiblot@ti.com
State Awaiting Upstream
Delegated to: Heiko Schocher
Headers show
Series DM_I2C_COMPAT removal for all ti platforms | expand

Commit Message

Jean-Jacques Hiblot Dec. 7, 2018, 1:50 p.m. UTC
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>
---

Changes in v3: None
Changes in v2: None

 arch/arm/mach-omap2/am33xx/board.c  | 9 ++++++---
 arch/arm/mach-omap2/hwinit-common.c | 5 ++---
 2 files changed, 8 insertions(+), 6 deletions(-)

Comments

Tom Rini Dec. 7, 2018, 2:20 p.m. UTC | #1
On Fri, Dec 07, 2018 at 02:50:45PM +0100, Jean-Jacques Hiblot wrote:

> 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>
Heiko Schocher Dec. 10, 2018, 5:14 a.m. UTC | #2
Hello Jean-Jacques,

Am 07.12.2018 um 14:50 schrieb Jean-Jacques Hiblot:
> 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>
> ---
> 
> Changes in v3: None
> Changes in v2: None
> 
>   arch/arm/mach-omap2/am33xx/board.c  | 9 ++++++---
>   arch/arm/mach-omap2/hwinit-common.c | 5 ++---
>   2 files changed, 8 insertions(+), 6 deletions(-)

Thanks for resending!

Reviewed-by: Heiko Schocher <hs@denx.de>

bye,
Heiko Schocher
diff mbox series

Patch

diff --git a/arch/arm/mach-omap2/am33xx/board.c b/arch/arm/mach-omap2/am33xx/board.c
index c121f27..2fc364d 100644
--- a/arch/arm/mach-omap2/am33xx/board.c
+++ b/arch/arm/mach-omap2/am33xx/board.c
@@ -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();
diff --git a/arch/arm/mach-omap2/hwinit-common.c b/arch/arm/mach-omap2/hwinit-common.c
index 1a24acb..d0781d7 100644
--- a/arch/arm/mach-omap2/hwinit-common.c
+++ b/arch/arm/mach-omap2/hwinit-common.c
@@ -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();