From ee4417644c7ba40d6365fc8e18ce0e8570544314 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 1 Oct 2018 11:55:15 -0600 Subject: 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 --- drivers/serial/sandbox.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'drivers/serial/sandbox.c') diff --git a/drivers/serial/sandbox.c b/drivers/serial/sandbox.c index 94b4fdfb17..4fbc5956b7 100644 --- a/drivers/serial/sandbox.c +++ b/drivers/serial/sandbox.c @@ -143,6 +143,23 @@ static int sandbox_serial_getc(struct udevice *dev) return result; } +#ifdef CONFIG_DEBUG_UART_SANDBOX + +#include + +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); -- cgit v1.2.3