summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/8250/8250.h
diff options
context:
space:
mode:
authorAnton Wuerfel <anton.wuerfel@fau.de>2016-01-14 18:08:24 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-02-07 10:15:53 +0300
commitb3bd666807d98d8ea53e578307979f6424175612 (patch)
tree4f55aff29edcf2a3e38266788d7cc4464d5d98f8 /drivers/tty/serial/8250/8250.h
parentb3d67936bf1926ae53e969fb4bab4516cdaa9333 (diff)
downloadlinux-b3bd666807d98d8ea53e578307979f6424175612.tar.xz
tty: serial: 8250: Add generic port init macro
This patch removes redundant 8250 port initialization macros and replaces them by a single generic base-macro, which is specialized as needed. Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/8250/8250.h')
-rw-r--r--drivers/tty/serial/8250/8250.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
index ce587c03efc3..047a7ba6796a 100644
--- a/drivers/tty/serial/8250/8250.h
+++ b/drivers/tty/serial/8250/8250.h
@@ -92,6 +92,18 @@ struct serial8250_config {
#define SERIAL8250_SHARE_IRQS 0
#endif
+#define SERIAL8250_PORT_FLAGS(_base, _irq, _flags) \
+ { \
+ .iobase = _base, \
+ .irq = _irq, \
+ .uartclk = 1843200, \
+ .iotype = UPIO_PORT, \
+ .flags = UPF_BOOT_AUTOCONF | (_flags), \
+ }
+
+#define SERIAL8250_PORT(_base, _irq) SERIAL8250_PORT_FLAGS(_base, _irq, 0)
+
+
static inline int serial_in(struct uart_8250_port *up, int offset)
{
return up->port.serial_in(&up->port, offset);