am33xx: board: Call spl_early_init() to support sdram_init()
authorFaiz Abbas <faiz_abbas@ti.com>
Wed, 24 Jan 2018 09:14:49 +0000 (14:44 +0530)
committerTom Rini <trini@konsulko.com>
Sun, 28 Jan 2018 17:27:33 +0000 (12:27 -0500)
With driver model enabled in SPL, sdram_init() requires device tree
and malloc to be initialized.
Therefore call spl_early_init() in early_system_init().

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-omap2/am33xx/board.c

index ae86b69b9c71ff555989132826cac832bdbde95e..ea0cabad972624b2620ec6f181da5486fd93d2e0 100644 (file)
@@ -353,6 +353,9 @@ void early_system_init(void)
 #ifdef CONFIG_TI_I2C_BOARD_DETECT
        do_board_detect();
 #endif
+#ifdef CONFIG_SPL_BUILD
+       spl_early_init();
+#endif
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
        /* Enable RTC32K clock */
        rtc32k_enable();