aboutsummaryrefslogtreecommitdiff
path: root/include/debug_uart.h
diff options
context:
space:
mode:
authorSimon Glass2015-10-18 19:51:23 -0600
committerSimon Glass2015-10-21 07:46:50 -0600
commit97b059730218824a1455f030aadd78ef51729ec0 (patch)
tree82a2ac7f538fcfb1e1ab827e9f07711930cecd8f /include/debug_uart.h
parent5ac98cb9bd1f9b74e2165d69da267f3522714c56 (diff)
debug_uart: Adjust the declaration of debug_uart_init()
We want to be able to add other common code to this function. So change the driver's version to have an underscore before it, just like _debug_uart_putc(). Define debug_uart_init() to call this version. Update all drivers to this new method. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Diffstat (limited to 'include/debug_uart.h')
-rw-r--r--include/debug_uart.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/include/debug_uart.h b/include/debug_uart.h
index a75e377dc0f..257ba004d6e 100644
--- a/include/debug_uart.h
+++ b/include/debug_uart.h
@@ -38,7 +38,7 @@
* To enable the debug UART in your serial driver:
*
* - #include <debug_uart.h>
- * - Define debug_uart_init(), trying to avoid using the stack
+ * - Define _debug_uart_init(), trying to avoid using the stack
* - Define _debug_uart_putc() as static inline (avoiding stack usage)
* - Immediately afterwards, add DEBUG_UART_FUNCS to define the rest of the
* functionality (printch(), etc.)
@@ -132,6 +132,11 @@ void printhex8(uint value);
void printhex8(uint value) \
{ \
printhex(value, 8); \
- }
+ } \
+\
+ void debug_uart_init(void) \
+ { \
+ _debug_uart_init(); \
+ } \
#endif