aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/serialP.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2012-03-05 08:52:12 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-03-08 14:48:42 -0500
commit9c8efecc91c02056340ae19612315f3225e6dbe2 (patch)
tree4702bd81b36848f572e341e057c21fb91bb5ad5e /include/linux/serialP.h
parent3ee0017e03cd790ed1adaa97ef6f99aff3706ec2 (diff)
TTY: serialP, remove unused material
First, remove unused macro and rs_multiport_struct structure. Nobody uses them at all. Further, the 2 drivers (they are below) which use the rest of structures from serialP.h (async_struct and serial_state) do not use all the members. Remove the members: * which are unused or * which are only initialized and never used for something real. Everybody should avoid the structures with a looong distance. Finally, remove the ALPHA kludge MCR quirks. They are 1:1 copy from 8250.h. No need to redefine them here. The 2 promised users of the structures: arch/ia64/hp/sim/simserial.c drivers/tty/amiserial.c Signed-off-by: Jiri Slaby <jslaby@suse.cz> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Tony Luck <tony.luck@intel.com> Cc: Fenghua Yu <fenghua.yu@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/serialP.h')
-rw-r--r--include/linux/serialP.h59
1 files changed, 0 insertions, 59 deletions
diff --git a/include/linux/serialP.h b/include/linux/serialP.h
index ec27b34bbbd6..c1acdb2c8584 100644
--- a/include/linux/serialP.h
+++ b/include/linux/serialP.h
@@ -26,32 +26,23 @@
26#include <linux/wait.h> 26#include <linux/wait.h>
27 27
28struct serial_state { 28struct serial_state {
29 int magic;
30 int baud_base; 29 int baud_base;
31 unsigned long port; 30 unsigned long port;
32 int irq; 31 int irq;
33 int flags; 32 int flags;
34 int hub6;
35 int type; 33 int type;
36 int line; 34 int line;
37 int revision; /* Chip revision (950) */
38 int xmit_fifo_size; 35 int xmit_fifo_size;
39 int custom_divisor; 36 int custom_divisor;
40 int count; 37 int count;
41 u8 *iomem_base;
42 u16 iomem_reg_shift;
43 unsigned short close_delay; 38 unsigned short close_delay;
44 unsigned short closing_wait; /* time to wait before closing */ 39 unsigned short closing_wait; /* time to wait before closing */
45 struct async_icount icount; 40 struct async_icount icount;
46 int io_type;
47 struct async_struct *info; 41 struct async_struct *info;
48 struct pci_dev *dev;
49}; 42};
50 43
51struct async_struct { 44struct async_struct {
52 int magic;
53 unsigned long port; 45 unsigned long port;
54 int hub6;
55 int flags; 46 int flags;
56 int xmit_fifo_size; 47 int xmit_fifo_size;
57 struct serial_state *state; 48 struct serial_state *state;
@@ -63,21 +54,12 @@ struct async_struct {
63 int x_char; /* xon/xoff character */ 54 int x_char; /* xon/xoff character */
64 int close_delay; 55 int close_delay;
65 unsigned short closing_wait; 56 unsigned short closing_wait;
66 unsigned short closing_wait2; /* obsolete */
67 int IER; /* Interrupt Enable Register */ 57 int IER; /* Interrupt Enable Register */
68 int MCR; /* Modem control register */ 58 int MCR; /* Modem control register */
69 int LCR; /* Line control register */
70 int ACR; /* 16950 Additional Control Reg. */
71 unsigned long event; 59 unsigned long event;
72 unsigned long last_active;
73 int line; 60 int line;
74 int blocked_open; /* # of blocked opens */ 61 int blocked_open; /* # of blocked opens */
75 struct circ_buf xmit; 62 struct circ_buf xmit;
76 spinlock_t xmit_lock;
77 u8 *iomem_base;
78 u16 iomem_reg_shift;
79 int io_type;
80 struct work_struct work;
81 struct tasklet_struct tlet; 63 struct tasklet_struct tlet;
82 wait_queue_head_t open_wait; 64 wait_queue_head_t open_wait;
83 wait_queue_head_t close_wait; 65 wait_queue_head_t close_wait;
@@ -86,51 +68,10 @@ struct async_struct {
86 struct async_struct *prev_port; 68 struct async_struct *prev_port;
87}; 69};
88 70
89#define CONFIGURED_SERIAL_PORT(info) ((info)->port || ((info)->iomem_base))
90
91#define SERIAL_MAGIC 0x5301
92#define SSTATE_MAGIC 0x5302
93
94/* 71/*
95 * Events are used to schedule things to happen at timer-interrupt 72 * Events are used to schedule things to happen at timer-interrupt
96 * time, instead of at rs interrupt time. 73 * time, instead of at rs interrupt time.
97 */ 74 */
98#define RS_EVENT_WRITE_WAKEUP 0 75#define RS_EVENT_WRITE_WAKEUP 0
99 76
100/*
101 * Multiport serial configuration structure --- internal structure
102 */
103struct rs_multiport_struct {
104 int port1;
105 unsigned char mask1, match1;
106 int port2;
107 unsigned char mask2, match2;
108 int port3;
109 unsigned char mask3, match3;
110 int port4;
111 unsigned char mask4, match4;
112 int port_monitor;
113};
114
115#if defined(__alpha__) && !defined(CONFIG_PCI)
116/*
117 * Digital did something really horribly wrong with the OUT1 and OUT2
118 * lines on at least some ALPHA's. The failure mode is that if either
119 * is cleared, the machine locks up with endless interrupts.
120 *
121 * This is still used by arch/mips/au1000/common/serial.c for some weird
122 * reason (mips != alpha!)
123 */
124#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2 | UART_MCR_OUT1)
125#elif defined(CONFIG_SBC8560)
126/*
127 * WindRiver did something similarly broken on their SBC8560 board. The
128 * UART tristates its IRQ output while OUT2 is clear, but they pulled
129 * the interrupt line _up_ instead of down, so if we register the IRQ
130 * while the UART is in that state, we die in an IRQ storm. */
131#define ALPHA_KLUDGE_MCR (UART_MCR_OUT2)
132#else
133#define ALPHA_KLUDGE_MCR 0
134#endif
135
136#endif /* _LINUX_SERIAL_H */ 77#endif /* _LINUX_SERIAL_H */