aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/epca.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /drivers/char/epca.h
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'drivers/char/epca.h')
-rw-r--r--drivers/char/epca.h165
1 files changed, 165 insertions, 0 deletions
diff --git a/drivers/char/epca.h b/drivers/char/epca.h
new file mode 100644
index 000000000000..52205ef71314
--- /dev/null
+++ b/drivers/char/epca.h
@@ -0,0 +1,165 @@
1#define XEMPORTS 0xC02
2#define XEPORTS 0xC22
3
4#define MAX_ALLOC 0x100
5
6#define MAXBOARDS 12
7#define FEPCODESEG 0x0200L
8#define FEPCODE 0x2000L
9#define BIOSCODE 0xf800L
10
11#define MISCGLOBAL 0x0C00L
12#define NPORT 0x0C22L
13#define MBOX 0x0C40L
14#define PORTBASE 0x0C90L
15
16/* Begin code defines used for epca_setup */
17
18#define INVALID_BOARD_TYPE 0x1
19#define INVALID_NUM_PORTS 0x2
20#define INVALID_MEM_BASE 0x4
21#define INVALID_PORT_BASE 0x8
22#define INVALID_BOARD_STATUS 0x10
23#define INVALID_ALTPIN 0x20
24
25/* End code defines used for epca_setup */
26
27
28#define FEPCLR 0x00
29#define FEPMEM 0x02
30#define FEPRST 0x04
31#define FEPINT 0x08
32#define FEPMASK 0x0e
33#define FEPWIN 0x80
34
35#define PCXE 0
36#define PCXEVE 1
37#define PCXEM 2
38#define EISAXEM 3
39#define PC64XE 4
40#define PCXI 5
41#define PCIXEM 7
42#define PCICX 8
43#define PCIXR 9
44#define PCIXRJ 10
45#define EPCA_NUM_TYPES 6
46
47
48static char *board_desc[] =
49{
50 "PC/Xe",
51 "PC/Xeve",
52 "PC/Xem",
53 "EISA/Xem",
54 "PC/64Xe",
55 "PC/Xi",
56 "unknown",
57 "PCI/Xem",
58 "PCI/CX",
59 "PCI/Xr",
60 "PCI/Xrj",
61};
62
63#define STARTC 021
64#define STOPC 023
65#define IAIXON 0x2000
66
67
68#define TXSTOPPED 0x1
69#define LOWWAIT 0x2
70#define EMPTYWAIT 0x4
71#define RXSTOPPED 0x8
72#define TXBUSY 0x10
73
74#define DISABLED 0
75#define ENABLED 1
76#define OFF 0
77#define ON 1
78
79#define FEPTIMEOUT 200000
80#define SERIAL_TYPE_NORMAL 1
81#define SERIAL_TYPE_INFO 3
82#define EPCA_EVENT_HANGUP 1
83#define EPCA_MAGIC 0x5c6df104L
84
85struct channel
86{
87 long magic;
88 unchar boardnum;
89 unchar channelnum;
90 unchar omodem; /* FEP output modem status */
91 unchar imodem; /* FEP input modem status */
92 unchar modemfake; /* Modem values to be forced */
93 unchar modem; /* Force values */
94 unchar hflow;
95 unchar dsr;
96 unchar dcd;
97 unchar m_rts ; /* The bits used in whatever FEP */
98 unchar m_dcd ; /* is indiginous to this board to */
99 unchar m_dsr ; /* represent each of the physical */
100 unchar m_cts ; /* handshake lines */
101 unchar m_ri ;
102 unchar m_dtr ;
103 unchar stopc;
104 unchar startc;
105 unchar stopca;
106 unchar startca;
107 unchar fepstopc;
108 unchar fepstartc;
109 unchar fepstopca;
110 unchar fepstartca;
111 unchar txwin;
112 unchar rxwin;
113 ushort fepiflag;
114 ushort fepcflag;
115 ushort fepoflag;
116 ushort txbufhead;
117 ushort txbufsize;
118 ushort rxbufhead;
119 ushort rxbufsize;
120 int close_delay;
121 int count;
122 int blocked_open;
123 ulong event;
124 int asyncflags;
125 uint dev;
126 ulong statusflags;
127 ulong c_iflag;
128 ulong c_cflag;
129 ulong c_lflag;
130 ulong c_oflag;
131 unchar *txptr;
132 unchar *rxptr;
133 unchar *tmp_buf;
134 struct board_info *board;
135 volatile struct board_chan *brdchan;
136 struct digi_struct digiext;
137 struct tty_struct *tty;
138 wait_queue_head_t open_wait;
139 wait_queue_head_t close_wait;
140 struct work_struct tqueue;
141 volatile struct global_data *mailbox;
142};
143
144struct board_info
145{
146 unchar status;
147 unchar type;
148 unchar altpin;
149 ushort numports;
150 unchar *port;
151 unchar *membase;
152 unchar __iomem *re_map_port;
153 unchar *re_map_membase;
154 ulong memory_seg;
155 void ( * memwinon ) (struct board_info *, unsigned int) ;
156 void ( * memwinoff ) (struct board_info *, unsigned int) ;
157 void ( * globalwinon ) (struct channel *) ;
158 void ( * txwinon ) (struct channel *) ;
159 void ( * rxwinon ) (struct channel *) ;
160 void ( * memoff ) (struct channel *) ;
161 void ( * assertgwinon ) (struct channel *) ;
162 void ( * assertmemoff ) (struct channel *) ;
163 unchar poller_inhibited ;
164};
165