summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-10-18 19:51:25 -0600
committerSimon Glass <sjg@chromium.org>2015-10-21 07:46:50 -0600
commitc7fefcb9125bbd183dc095996c6747273043d988 (patch)
treea13a25028257f0521267be5beed5127da8713536 /include
parent0e977bc1455699fd8a9303ee3e8fd66a3c8eaced (diff)
downloadtalos-obmc-uboot-c7fefcb9125bbd183dc095996c6747273043d988.tar.gz
talos-obmc-uboot-c7fefcb9125bbd183dc095996c6747273043d988.zip
debug_uart: Add an option to announce the debug UART
It is useful to see a message from the debug UART early during boot so that you know things are working. Add an option to enable this. The message will be displayed as soon as debug_uart_init() is called. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/debug_uart.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/debug_uart.h b/include/debug_uart.h
index a6b7ce8e6e..5d5349bbd2 100644
--- a/include/debug_uart.h
+++ b/include/debug_uart.h
@@ -105,6 +105,12 @@ void printhex4(uint value);
*/
void printhex8(uint value);
+#ifdef CONFIG_DEBUG_UART_ANNOUNCE
+#define _DEBUG_UART_ANNOUNCE printascii("<debug_uart> ");
+#else
+#define _DEBUG_UART_ANNOUNCE
+#endif
+
/*
* Now define some functions - this should be inserted into the serial driver
*/
@@ -151,6 +157,7 @@ void printhex8(uint value);
{ \
board_debug_uart_init(); \
_debug_uart_init(); \
+ _DEBUG_UART_ANNOUNCE \
} \
#endif
OpenPOWER on IntegriCloud