aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250.h
diff options
context:
space:
mode:
authorJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
committerJonathan Herman <hermanjl@cs.unc.edu>2013-01-22 10:38:37 -0500
commitfcc9d2e5a6c89d22b8b773a64fb4ad21ac318446 (patch)
treea57612d1888735a2ec7972891b68c1ac5ec8faea /drivers/tty/serial/8250.h
parent8dea78da5cee153b8af9c07a2745f6c55057fe12 (diff)
Added missing tegra files.HEADmaster
Diffstat (limited to 'drivers/tty/serial/8250.h')
-rw-r--r--drivers/tty/serial/8250.h80
1 files changed, 80 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250.h b/drivers/tty/serial/8250.h
new file mode 100644
index 00000000000..66a0c936b93
--- /dev/null
+++ b/drivers/tty/serial/8250.h
@@ -0,0 +1,80 @@
1/*
2 * Driver for 8250/16550-type serial ports
3 *
4 * Based on drivers/char/serial.c, by Linus Torvalds, Theodore Ts'o.
5 *
6 * Copyright (C) 2001 Russell King.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 */
13
14#include <linux/serial_8250.h>
15
16struct old_serial_port {
17 unsigned int uart;
18 unsigned int baud_base;
19 unsigned int port;
20 unsigned int irq;
21 unsigned int flags;
22 unsigned char hub6;
23 unsigned char io_type;
24 unsigned char *iomem_base;
25 unsigned short iomem_reg_shift;
26 unsigned long irqflags;
27};
28
29/*
30 * This replaces serial_uart_config in include/linux/serial.h
31 */
32struct serial8250_config {
33 const char *name;
34 unsigned short fifo_size;
35 unsigned short tx_loadsz;
36 unsigned char fcr;
37 unsigned int flags;
38};
39
40#define UART_CAP_FIFO (1 << 8) /* UART has FIFO */
41#define UART_CAP_EFR (1 << 9) /* UART has EFR */
42#define UART_CAP_SLEEP (1 << 10) /* UART has IER sleep */
43#define UART_CAP_AFE (1 << 11) /* MCR-based hw flow control */
44#define UART_CAP_UUE (1 << 12) /* UART needs IER bit 6 set (Xscale) */
45#define UART_CAP_RTOIE (1 << 13) /* UART needs IER bit 4 set (Xscale, Tegra) */
46#define UART_CAP_HW_CTSRTS (1 << 14) /* UART core support hw control of RTS and CTS */
47
48#define UART_BUG_QUOT (1 << 0) /* UART has buggy quot LSB */
49#define UART_BUG_TXEN (1 << 1) /* UART has buggy TX IIR status */
50#define UART_BUG_NOMSR (1 << 2) /* UART has buggy MSR status bits (Au1x00) */
51#define UART_BUG_THRE (1 << 3) /* UART has buggy THRE reassertion */
52
53#define PROBE_RSA (1 << 0)
54#define PROBE_ANY (~0)
55
56#define HIGH_BITS_OFFSET ((sizeof(long)-sizeof(int))*8)
57
58#ifdef CONFIG_SERIAL_8250_SHARE_IRQ
59#define SERIAL8250_SHARE_IRQS 1
60#else
61#define SERIAL8250_SHARE_IRQS 0
62#endif
63
64#if defined(__alpha__) && !defined(CONFIG_PCI)
65/*
66 * Digital did something really horribly wrong with the OUT1 and OUT2
67 * lines on at least some ALPHA's. The failure mode is that if either
68 * is cleared, the machine locks up with endless interrupts.
69 */
70#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1)
71#elif defined(CONFIG_SBC8560)
72/*
73 * WindRiver did something similarly broken on their SBC8560 board. The
74 * UART tristates its IRQ output while OUT2 is clear, but they pulled
75 * the interrupt line _up_ instead of down, so if we register the IRQ
76 * while the UART is in that state, we die in an IRQ storm. */
77#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
78#else
79#define ALPHA_KLUDGE_MCR 0
80#endif