]> git.sur5r.net Git - u-boot/commitdiff
board: at91sam9rlek: Enable early debug UART
authorWenyou Yang <wenyou.yang@atmel.com>
Tue, 18 Apr 2017 07:28:29 +0000 (15:28 +0800)
committerSimon Glass <sjg@chromium.org>
Tue, 9 May 2017 18:14:16 +0000 (12:14 -0600)
Enable the early debug UART to debug problems when an ICE or other
debug mechanism is not available.

Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
board/atmel/at91sam9rlek/at91sam9rlek.c
configs/at91sam9rlek_dataflash_defconfig
configs/at91sam9rlek_mmc_defconfig
configs/at91sam9rlek_nandflash_defconfig

index 0c4d51765e12044d15abcb4bd86e0f49bfbce7c7..0b603ed13a7f140d97ec97d8776a330f551acaa1 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include <common.h>
+#include <debug_uart.h>
 #include <asm/io.h>
 #include <asm/arch/at91sam9rl.h>
 #include <asm/arch/at91sam9rl_matrix.h>
@@ -155,10 +156,22 @@ void lcd_show_board_info(void)
 #endif /* CONFIG_LCD_INFO */
 #endif
 
+#ifdef CONFIG_DEBUG_UART_BOARD_INIT
+void board_debug_uart_init(void)
+{
+       at91_seriald_hw_init();
+}
+#endif
+
+#ifdef CONFIG_BOARD_EARLY_INIT_F
 int board_early_init_f(void)
 {
+#ifdef CONFIG_DEBUG_UART
+       debug_uart_init();
+#endif
        return 0;
 }
+#endif
 
 int board_init(void)
 {
index 24fbfe619cd01f54c4cd882b5f19a3f95bfd6eaf..d4abb2a2fd11d146cbfb6cb4fc535fc2ffd12e4b 100644 (file)
@@ -34,5 +34,11 @@ CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_LCD=y
index a46deac284dbd7532ca7605cfa317558d5c81b4f..9a40c41f361ab89c41525f94a8497bc73fd1a11d 100644 (file)
@@ -34,5 +34,11 @@ CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_LCD=y
index b6400d0317fd40153d0799a1d9f8c5e3a1dd1b08..d68b562b0e5224ce11aaf223dcb459c2df3339d2 100644 (file)
@@ -34,5 +34,11 @@ CONFIG_GENERIC_ATMEL_MCI=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
 CONFIG_DM_SERIAL=y
+CONFIG_DEBUG_UART=y
+CONFIG_DEBUG_UART_ATMEL=y
+CONFIG_DEBUG_UART_BASE=0xfffff200
+CONFIG_DEBUG_UART_CLOCK=100000000
+CONFIG_DEBUG_UART_BOARD_INIT=y
+CONFIG_DEBUG_UART_ANNOUNCE=y
 CONFIG_ATMEL_USART=y
 CONFIG_LCD=y