diff options
author | Lokesh Vutla | 2017-04-22 15:57:25 +0530 |
---|---|---|
committer | Tom Rini | 2017-05-11 22:21:27 -0400 |
commit | a52cf086ace7e6107f399fcf37059dc9e02916f3 (patch) | |
tree | 8fea58cb625155fb4f221847f5d7429939424db2 /include/debug_uart.h | |
parent | 46f51dc9c73cbfe5ca69a1b662e594b486bd8616 (diff) |
serial: omap: Support debug UART
Add debug UART functions to permit omap specific ns16550 to
provide an early debug UART. This is mostly in common with
DEBUG_UART_NS16550 except for Mode definition register which
is required for selecting UART mode(16x auto-baud or 13x mode).
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'include/debug_uart.h')
-rw-r--r-- | include/debug_uart.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/debug_uart.h b/include/debug_uart.h index 2980ae6200f..6f0b0c5e157 100644 --- a/include/debug_uart.h +++ b/include/debug_uart.h @@ -111,6 +111,17 @@ void printhex8(uint value); #define _DEBUG_UART_ANNOUNCE #endif +#define serial_dout(reg, value) \ + serial_out_shift((char *)com_port + \ + ((char *)reg - (char *)com_port) * \ + (1 << CONFIG_DEBUG_UART_SHIFT), \ + CONFIG_DEBUG_UART_SHIFT, value) +#define serial_din(reg) \ + serial_in_shift((char *)com_port + \ + ((char *)reg - (char *)com_port) * \ + (1 << CONFIG_DEBUG_UART_SHIFT), \ + CONFIG_DEBUG_UART_SHIFT) + /* * Now define some functions - this should be inserted into the serial driver */ |