Remove the specific sandbox code in console.c, as the config CONFIG_DEBUG_UART is already supported in drivers/serial/sandbox.c and activated by default in all sandbox defconfig (CONFIG_DEBUG_UART_SANDBOX=y and CONFIG_DEBUG_UART=y).
This patch allows to test the console code under DEBUG_UART in sandbox and avoids to include the file <os.h> in this u-boot generic code. Signed-off-by: Patrick Delaunay <patrick.delau...@st.com> --- common/console.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/common/console.c b/common/console.c index 3348436da6..11d3694159 100644 --- a/common/console.c +++ b/common/console.c @@ -13,7 +13,6 @@ #include <iomux.h> #include <malloc.h> #include <mapmem.h> -#include <os.h> #include <serial.h> #include <stdio_dev.h> #include <exports.h> @@ -517,13 +516,6 @@ static inline void print_pre_console_buffer(int flushpoint) {} void putc(const char c) { -#ifdef CONFIG_SANDBOX - /* sandbox can send characters to stdout before it has a console */ - if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { - os_putc(c); - return; - } -#endif #ifdef CONFIG_DEBUG_UART /* if we don't have a console yet, use the debug UART */ if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { @@ -565,13 +557,6 @@ void putc(const char c) void puts(const char *s) { -#ifdef CONFIG_SANDBOX - /* sandbox can send characters to stdout before it has a console */ - if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { - os_puts(s); - return; - } -#endif #ifdef CONFIG_DEBUG_UART if (!gd || !(gd->flags & GD_FLG_SERIAL_READY)) { while (*s) { -- 2.17.1