summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorMarek Vasut <marex@denx.de>2016-05-25 02:13:03 +0200
committerTom Rini <trini@konsulko.com>2016-06-02 21:21:41 -0400
commitfa4ce72316547753451528728491d31e6c7b18f0 (patch)
tree724896aec68b97a7245d4b77e8dd59c6f96393bf /drivers/serial
parent307c0b518979ff77876b880da88c388e4add692d (diff)
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: Marek Vasut <marex@denx.de> Cc: Tom Rini <trini@konsulko.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/ns16550.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/serial/ns16550.c b/drivers/serial/ns16550.c
index d7a3cf665e..4763a1c836 100644
--- a/drivers/serial/ns16550.c
+++ b/drivers/serial/ns16550.c
@@ -54,12 +54,6 @@ DECLARE_GLOBAL_DATA_PTR;
#define CONFIG_SYS_NS16550_IER 0x00
#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)
{
#ifdef CONFIG_SYS_NS16550_PORT_MAPPED
@@ -94,6 +88,12 @@ static inline int serial_in_shift(void *addr, int shift)
#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)
{
struct ns16550_platdata *plat = port->plat;