Coarsly sort out 32-bit-only, 64-bit-only and ``portable'' MIPS lib/
[linux-2.6/linux-mips.git] / drivers / char / pcxx.h
blob1e1bcccf42e6cd86058770af3581cad7747cfe8e
1 #define FEPCODESEG 0x0200L
2 #define FEPCODE 0x2000L
3 #define BIOSCODE 0xf800L
5 #define MISCGLOBAL 0x0C00L
6 #define NPORT 0x0C22L
7 #define MBOX 0x0C40L
8 #define PORTBASE 0x0C90L
10 #define FEPCLR 0x00
11 #define FEPMEM 0x02
12 #define FEPRST 0x04
13 #define FEPINT 0x08
14 #define FEPMASK 0x0e
15 #define FEPWIN 0x80
17 /* Maximum Number of Boards supported */
18 #define MAX_DIGI_BOARDS 4
20 #define PCXX_NUM_TYPES 4
22 #define PCXI 0
23 #define PCXE 1
24 #define PCXEVE 2
25 #define PCXEM 3
27 static char *board_desc[] = {
28 "PC/Xi",
29 "PC/Xe",
30 "PC/Xeve",
31 "PC/Xem",
34 static char *board_mem[] = {
35 "64k",
36 "64k",
37 "8k",
38 "32k",
40 #define STARTC 021
41 #define STOPC 023
42 #define IAIXON 0x2000
45 struct board_info {
46 unchar status;
47 unchar type;
48 unchar altpin;
49 ushort numports;
50 ushort port;
51 ulong membase;
52 ulong memsize;
53 ushort first_minor;
54 void *region;
58 #define TXSTOPPED 0x01
59 #define LOWWAIT 0x02
60 #define EMPTYWAIT 0x04
61 #define RXSTOPPED 0x08
62 #define TXBUSY 0x10
64 #define DISABLED 0
65 #define ENABLED 1
66 #define OFF 0
67 #define ON 1
69 #define FEPTIMEOUT 200000
70 #define SERIAL_TYPE_NORMAL 1
71 #define PCXE_EVENT_HANGUP 1
72 #define PCXX_MAGIC 0x5c6df104L
74 struct channel {
75 /* --------- Board/channel information ---------- */
76 long magic;
77 unchar boardnum;
78 unchar channelnum;
79 uint dev;
80 struct tty_struct *tty;
81 struct board_info *board;
82 volatile struct board_chan *brdchan;
83 volatile struct global_data *mailbox;
84 int asyncflags;
85 int count;
86 int blocked_open;
87 int close_delay;
88 int event;
89 wait_queue_head_t open_wait;
90 wait_queue_head_t close_wait;
91 struct tq_struct tqueue;
92 /* ------------ Async control data ------------- */
93 unchar modemfake; /* Modem values to be forced */
94 unchar modem; /* Force values */
95 ulong statusflags;
96 unchar omodem; /* FEP output modem status */
97 unchar imodem; /* FEP input modem status */
98 unchar hflow;
99 unchar dsr;
100 unchar dcd;
101 unchar stopc;
102 unchar startc;
103 unchar stopca;
104 unchar startca;
105 unchar fepstopc;
106 unchar fepstartc;
107 unchar fepstopca;
108 unchar fepstartca;
109 ushort fepiflag;
110 ushort fepcflag;
111 ushort fepoflag;
112 /* ---------- Transmit/receive system ---------- */
113 unchar txwin;
114 unchar rxwin;
115 ushort txbufsize;
116 ushort rxbufsize;
117 unchar *txptr;
118 unchar *rxptr;
119 unchar *tmp_buf; /* Temp buffer */
120 struct semaphore tmp_buf_sem;
121 /* ---- Termios data ---- */
122 ulong c_iflag;
123 ulong c_cflag;
124 ulong c_lflag;
125 ulong c_oflag;
126 struct digi_struct digiext;
127 ulong dummy[8];