diff options
author | Simon Glass <sjg@chromium.org> | 2018-10-01 11:55:15 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2018-10-09 04:40:27 -0600 |
commit | ee4417644c7ba40d6365fc8e18ce0e8570544314 (patch) | |
tree | ef0c6957ea07efa37719e6ab677001d5acbfda0d /drivers/serial/sandbox.c | |
parent | 55d39911c0579b91a27f0acf3d0c1e123bb29ac1 (diff) |
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>
Diffstat (limited to 'drivers/serial/sandbox.c')
-rw-r--r-- | drivers/serial/sandbox.c | 17 |
1 files changed, 17 insertions, 0 deletions
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 <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); |