]> Git Repo - J-u-boot.git/blobdiff - arch/arm/mach-omap2/am33xx/board.c
am33xx: Use regular spl_board_init instead of am33xx_spl_board_init
[J-u-boot.git] / arch / arm / mach-omap2 / am33xx / board.c
index 9d9b4d7f293d104dd7353ee8504e33678eef7011..abdc1e40335173f5b26c7b61a7eec6cef93dc516 100644 (file)
@@ -4,10 +4,10 @@
  *
  * Common board functions for AM33XX based boards
  *
- * Copyright (C) 2011, Texas Instruments, Incorporated - http://www.ti.com/
+ * Copyright (C) 2011, Texas Instruments, Incorporated - https://www.ti.com/
  */
 
-#include <common.h>
+#include <config.h>
 #include <dm.h>
 #include <debug_uart.h>
 #include <errno.h>
@@ -42,6 +42,7 @@
 #include <linux/delay.h>
 #include <linux/errno.h>
 #include <linux/compiler.h>
+#include <linux/printk.h>
 #include <linux/usb/ch9.h>
 #include <linux/usb/gadget.h>
 #include <linux/usb/musb.h>
@@ -336,14 +337,6 @@ int board_early_init_f(void)
        return 0;
 }
 
-/*
- * This function is the place to do per-board things such as ramp up the
- * MPU clock frequency.
- */
-__weak void am33xx_spl_board_init(void)
-{
-}
-
 #if defined(CONFIG_SPL_AM33XX_ENABLE_RTC32K_OSC)
 static void rtc32k_enable(void)
 {
@@ -489,9 +482,6 @@ void early_system_init(void)
         */
        save_omap_boot_params();
 #endif
-#ifdef CONFIG_DEBUG_UART_OMAP
-       debug_uart_init();
-#endif
 
 #ifdef CONFIG_SPL_BUILD
        spl_early_init();
@@ -532,3 +522,18 @@ static int am33xx_dm_post_init(void)
        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
This page took 0.023563 seconds and 4 git commands to generate.