Skip to content
Snippets Groups Projects
Commit fa4ce723 authored by Marek Vasut's avatar Marek Vasut Committed by Tom Rini
Browse files

serial: 16550: Make serial_io/out_shift available to debug mode


The ns16550 driver needs serial_in_shift() and serial_out_shift()
when compiled in debug UART mode, so shift the DM_SERIAL check a
little to make these functions available.

Signed-off-by: default avatarMarek Vasut <marex@denx.de>
Cc: Tom Rini <trini@konsulko.com>
Cc: Simon Glass <sjg@chromium.org>
Reviewed-by: default avatarTom Rini <trini@konsulko.com>
Reviewed-by: default avatarSimon Glass <sjg@chromium.org>
parent 307c0b51
No related branches found
No related tags found
No related merge requests found
...@@ -54,12 +54,6 @@ DECLARE_GLOBAL_DATA_PTR; ...@@ -54,12 +54,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define CONFIG_SYS_NS16550_IER 0x00 #define CONFIG_SYS_NS16550_IER 0x00
#endif /* CONFIG_SYS_NS16550_IER */ #endif /* CONFIG_SYS_NS16550_IER */
#ifdef CONFIG_DM_SERIAL
#ifndef CONFIG_SYS_NS16550_CLK
#define CONFIG_SYS_NS16550_CLK 0
#endif
static inline void serial_out_shift(void *addr, int shift, int value) static inline void serial_out_shift(void *addr, int shift, int value)
{ {
#ifdef CONFIG_SYS_NS16550_PORT_MAPPED #ifdef CONFIG_SYS_NS16550_PORT_MAPPED
...@@ -94,6 +88,12 @@ static inline int serial_in_shift(void *addr, int shift) ...@@ -94,6 +88,12 @@ static inline int serial_in_shift(void *addr, int shift)
#endif #endif
} }
#ifdef CONFIG_DM_SERIAL
#ifndef CONFIG_SYS_NS16550_CLK
#define CONFIG_SYS_NS16550_CLK 0
#endif
static void ns16550_writeb(NS16550_t port, int offset, int value) static void ns16550_writeb(NS16550_t port, int offset, int value)
{ {
struct ns16550_platdata *plat = port->plat; struct ns16550_platdata *plat = port->plat;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment