diff options
author | Wenyou Yang <wenyou.yang@atmel.com> | 2016-10-17 04:55:26 +0300 |
---|---|---|
committer | Andreas Bießmann <andreas@biessmann.org> | 2016-10-28 19:37:15 +0300 |
commit | 2992dd833d11cd988125b11ae72bc18e53b0b2ab (patch) | |
tree | 04585d839f6422e6fa3e38b20321afbea247af9a /board/atmel/sama5d2_xplained | |
parent | 0daa2e1870762ebf0a9ae97a6a923e938faddbc4 (diff) | |
download | u-boot-2992dd833d11cd988125b11ae72bc18e53b0b2ab.tar.xz |
board: sama5d2_xplained: Enable an early debug UART
Enable an 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>
Reviewed-by: Andreas Bießmann <andreas.devel@googlemail.com>
Diffstat (limited to 'board/atmel/sama5d2_xplained')
-rw-r--r-- | board/atmel/sama5d2_xplained/sama5d2_xplained.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/board/atmel/sama5d2_xplained/sama5d2_xplained.c b/board/atmel/sama5d2_xplained/sama5d2_xplained.c index cceccd2ac4..c5337af4de 100644 --- a/board/atmel/sama5d2_xplained/sama5d2_xplained.c +++ b/board/atmel/sama5d2_xplained/sama5d2_xplained.c @@ -7,6 +7,7 @@ #include <common.h> #include <atmel_hlcdc.h> +#include <debug_uart.h> #include <dm.h> #include <i2c.h> #include <lcd.h> @@ -141,12 +142,25 @@ static void board_uart1_hw_init(void) at91_periph_clk_enable(ATMEL_ID_UART1); } +#ifdef CONFIG_DEBUG_UART_BOARD_INIT +void board_debug_uart_init(void) +{ + board_uart1_hw_init(); +} +#endif + +#ifdef CONFIG_BOARD_EARLY_INIT_F int board_early_init_f(void) { +#ifdef CONFIG_DEBUG_UART + debug_uart_init(); +#else board_uart1_hw_init(); +#endif return 0; } +#endif int board_init(void) { |