diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2017-04-13 10:31:18 +0800 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2017-04-13 14:44:52 -0600 |
commit | 334794f58400e1a4fccd61dd8066c4f94f4605e7 (patch) | |
tree | 900404518a7cb18a2eba86aff808200b4b70ad3d /board | |
parent | 3b93f852ca5ded9edca1939a5b78795f1df6fc92 (diff) | |
download | u-boot-334794f58400e1a4fccd61dd8066c4f94f4605e7.zip u-boot-334794f58400e1a4fccd61dd8066c4f94f4605e7.tar.gz u-boot-334794f58400e1a4fccd61dd8066c4f94f4605e7.tar.bz2 |
board: sama5d4_xplained: enable early debug UART
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: Andreas Bießmann <andreas@biessmann.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/atmel/sama5d4_xplained/sama5d4_xplained.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/board/atmel/sama5d4_xplained/sama5d4_xplained.c b/board/atmel/sama5d4_xplained/sama5d4_xplained.c index 30d4fb7..94ecab2 100644 --- a/board/atmel/sama5d4_xplained/sama5d4_xplained.c +++ b/board/atmel/sama5d4_xplained/sama5d4_xplained.c @@ -15,6 +15,7 @@ #include <asm/arch/sama5d3_smc.h> #include <asm/arch/sama5d4.h> #include <atmel_hlcdc.h> +#include <debug_uart.h> #include <lcd.h> #include <nand.h> #include <version.h> @@ -165,6 +166,7 @@ void lcd_show_board_info(void) #endif /* CONFIG_LCD */ +#ifdef CONFIG_DEBUG_UART_BOARD_INIT static void sama5d4_xplained_serial3_hw_init(void) { at91_pio3_set_b_periph(AT91_PIO_PORTE, 17, 1); /* TXD3 */ @@ -174,12 +176,21 @@ static void sama5d4_xplained_serial3_hw_init(void) at91_periph_clk_enable(ATMEL_ID_USART3); } -int board_early_init_f(void) +void board_debug_uart_init(void) { sama5d4_xplained_serial3_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) { |