Since commit
0dba45864b2a ("arm: Init the debug UART") the debug UART is
set up in _main() before early_system_init() is called.
Add a suitable board_debug_uart_init() function to set up the UART in
SPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
*/
save_omap_boot_params();
#endif
-#ifdef CONFIG_DEBUG_UART_OMAP
- debug_uart_init();
-#endif
#ifdef CONFIG_SPL_BUILD
spl_early_init();
return 0;
}
EVENT_SPY_SIMPLE(EVT_DM_POST_INIT_F, am33xx_dm_post_init);
+
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
+{
+ if (u_boot_first_phase()) {
+ hw_data_init();
+ set_uart_mux_conf();
+ setup_early_clocks();
+ uart_soft_reset();
+
+ /* avoid uart gibberish by allowing the clocks to settle */
+ mdelay(50);
+ }
+}
+#endif