summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/8250.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-01-30 15:17:21 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2012-01-30 15:17:21 -0800
commit27ba234c8dfe86c96675d4ef275d1d3c1f5f7053 (patch)
tree9782cde6e3336e795f52fad2d2e17bcb0c2a8ccd /drivers/tty/serial/8250/8250.h
parent6bc2b95ee602659c1be6fac0f6aadeb0c5c29a5d (diff)
parent523b82e3734908fc9eff5d48de46c83e76e51641 (diff)
downloadop-kernel-dev-27ba234c8dfe86c96675d4ef275d1d3c1f5f7053.zip
op-kernel-dev-27ba234c8dfe86c96675d4ef275d1d3c1f5f7053.tar.gz
Merge tag 'tty-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Here are some tty/serial patches for 3.3-rc1 Big thing here is the movement of the 8250 serial drivers to their own directory, now that the patch churn has calmed down. Other than that, only minor stuff (omap patches were reverted as they were found to be wrong), and another broken driver removed from the system. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> * tag 'tty-3.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: serial: Kill off Moorestown code Revert "tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode" Revert "tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip" serial: Fix wakeup init logic to speed up startup docbook: don't use serial_core.h in device-drivers book serial: amba-pl011: lock console writes against interrupts amba-pl011: do not disable RTS during shutdown tty: serial: OMAP: transmit FIFO threshold interrupts don't wake the chip tty: serial: OMAP: ensure FIFO levels are set correctly in non-DMA mode omap-serial: make serial_omap_restore_context depend on CONFIG_PM_RUNTIME omap-serial :Make the suspend/resume functions depend on CONFIG_PM_SLEEP. TTY: fix UV serial console regression jsm: Fixed EEH recovery error Updated TTY MAINTAINERS info serial: group all the 8250 related code together
Diffstat (limited to 'drivers/tty/serial/8250/8250.h')
-rw-r--r--drivers/tty/serial/8250/8250.h105
1 files changed, 105 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h
new file mode 100644
index 0000000..ae027be
--- /dev/null
+++ b/drivers/tty/serial/8250/8250.h
@@ -0,0 +1,105 @@
+/*
+ * Driver for 8250/16550-type serial ports
+ *
+ * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
+ *
+ * Copyright (C) 2001 Russell King.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include <linux/serial_8250.h>
+
+struct uart_8250_port {
+ struct uart_port port;
+ struct timer_list timer; /* "no irq" timer */
+ struct list_head list; /* ports on this IRQ */
+ unsigned short capabilities; /* port capabilities */
+ unsigned short bugs; /* port bugs */
+ unsigned int tx_loadsz; /* transmit fifo load size */
+ unsigned char acr;
+ unsigned char ier;
+ unsigned char lcr;
+ unsigned char mcr;
+ unsigned char mcr_mask; /* mask of user bits */
+ unsigned char mcr_force; /* mask of forced bits */
+ unsigned char cur_iotype; /* Running I/O type */
+
+ /*
+ * Some bits in registers are cleared on a read, so they must
+ * be saved whenever the register is read but the bits will not
+ * be immediately processed.
+ */
+#define LSR_SAVE_FLAGS UART_LSR_BRK_ERROR_BITS
+ unsigned char lsr_saved_flags;
+#define MSR_SAVE_FLAGS UART_MSR_ANY_DELTA
+ unsigned char msr_saved_flags;
+};
+
+struct old_serial_port {
+ unsigned int uart;
+ unsigned int baud_base;
+ unsigned int port;
+ unsigned int irq;
+ unsigned int flags;
+ unsigned char hub6;
+ unsigned char io_type;
+ unsigned char *iomem_base;
+ unsigned short iomem_reg_shift;
+ unsigned long irqflags;
+};
+
+/*
+ * This replaces serial_uart_config in include/linux/serial.h
+ */
+struct serial8250_config {
+ const char *name;
+ unsigned short fifo_size;
+ unsigned short tx_loadsz;
+ unsigned char fcr;
+ unsigned int flags;
+};
+
+#define UART_CAP_FIFO (1 << 8) /* UART has FIFO */
+#define UART_CAP_EFR (1 << 9) /* UART has EFR */
+#define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */
+#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */
+#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */
+#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */
+
+#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
+#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
+#define UART_BUG_NOMSR (1 << 2) /* UART has buggy MSR status bits (Au1x00) */
+#define UART_BUG_THRE (1 << 3) /* UART has buggy THRE reassertion */
+
+#define PROBE_RSA (1 << 0)
+#define PROBE_ANY (~0)
+
+#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
+
+#ifdef CONFIG_SERIAL_8250_SHARE_IRQ
+#define SERIAL8250_SHARE_IRQS 1
+#else
+#define SERIAL8250_SHARE_IRQS 0
+#endif
+
+#if defined(__alpha__) && !defined(CONFIG_PCI)
+/*
+ * Digital did something really horribly wrong with the OUT1 and OUT2
+ * lines on at least some ALPHA's. The failure mode is that if either
+ * is cleared, the machine locks up with endless interrupts.
+ */
+#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1)
+#elif defined(CONFIG_SBC8560)
+/*
+ * WindRiver did something similarly broken on their SBC8560 board. The
+ * UART tristates its IRQ output while OUT2 is clear, but they pulled
+ * the interrupt line _up_ instead of down, so if we register the IRQ
+ * while the UART is in that state, we die in an IRQ storm. */
+#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
+#else
+#define ALPHA_KLUDGE_MCR 0
+#endif
OpenPOWER on IntegriCloud