summaryrefslogtreecommitdiff
path: root/board/atmel/sama5d2_xplained
diff options
context:
space:
mode:
authorWenyou Yang <wenyou.yang@atmel.com>2016-10-17 09:55:26 +0800
committerAndreas Bießmann <andreas@biessmann.org>2016-10-28 18:37:15 +0200
commit2992dd833d11cd988125b11ae72bc18e53b0b2ab (patch)
tree04585d839f6422e6fa3e38b20321afbea247af9a /board/atmel/sama5d2_xplained
parent0daa2e1870762ebf0a9ae97a6a923e938faddbc4 (diff)
downloadu-boot-2992dd833d11cd988125b11ae72bc18e53b0b2ab.tar.gz
u-boot-2992dd833d11cd988125b11ae72bc18e53b0b2ab.tar.bz2
u-boot-2992dd833d11cd988125b11ae72bc18e53b0b2ab.zip
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.c14
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)
{