sandbox: Add a debug UART
Add support for the debug UART so that sandbox provides build testing for
this feature.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c
index 94b4fdf..4fbc595 100644
--- a/drivers/serial/sandbox.c
+++ b/drivers/serial/sandbox.c
@@ -143,6 +143,23 @@
return result;
}
+#ifdef CONFIG_DEBUG_UART_SANDBOX
+
+#include <debug_uart.h>
+
+static inline void _debug_uart_init(void)
+{
+}
+
+static inline void _debug_uart_putc(int ch)
+{
+ os_putc(ch);
+}
+
+DEBUG_UART_FUNCS
+
+#endif /* CONFIG_DEBUG_UART_SANDBOX */
+
static int sandbox_serial_setconfig(struct udevice *dev, uint serial_config)
{
u8 parity = SERIAL_GET_PARITY(serial_config);