1 #define FEPCODESEG 0x0200L
2 #define FEPCODE 0x2000L
3 #define BIOSCODE 0xf800L
4
5 #define MISCGLOBAL 0x0C00L
6 #define NPORT 0x0C22L
7 #define MBOX 0x0C40L
8 #define PORTBASE 0x0C90L
9
10 #define FEPCLR 0x00
11 #define FEPMEM 0x02
12 #define FEPRST 0x04
13 #define FEPINT 0x08
14 #define FEPMASK 0x0e
15 #define FEPWIN 0x80
16
17 #define PCXI 0
18 #define PCXE 1
19 #define PCXEVE 2
20
21 static char *board_desc[] = {
22 "PC/Xi (64K)",
23 "PC/Xe (64K)",
24 "PC/Xe (8K) ",
25 };
26
27 #define STARTC 021
28 #define STOPC 023
29 #define IAIXON 0x2000
30
31
32 struct board_info {
33 unchar status;
34 unchar type;
35 unchar altpin;
36 ushort numports;
37 ushort port;
38 ulong membase;
39 };
40
41
42 #define TXSTOPPED 0x01
43 #define LOWWAIT 0x02
44 #define EMPTYWAIT 0x04
45 #define RXSTOPPED 0x08
46 #define TXBUSY 0x10
47
48 #define DISABLED 0
49 #define ENABLED 1
50 #define OFF 0
51 #define ON 1
52
53 #define FEPTIMEOUT 200000
54 #define SERIAL_TYPE_NORMAL 1
55 #define SERIAL_TYPE_CALLOUT 2
56 #define PCXE_EVENT_HANGUP 1
57 #define PCXX_MAGIC 0x5c6df104L
58
59 struct channel {
60
61 long magic;
62 unchar boardnum;
63 unchar channelnum;
64 uint dev;
65 long session;
66 long pgrp;
67 struct tty_struct *tty;
68 struct board_info *board;
69 volatile struct board_chan *brdchan;
70 volatile struct global_data *mailbox;
71 int asyncflags;
72 int count;
73 int blocked_open;
74 int close_delay;
75 int event;
76 struct wait_queue *open_wait;
77 struct wait_queue *close_wait;
78 struct tq_struct tqueue;
79
80 unchar modemfake;
81 unchar modem;
82 ulong statusflags;
83 unchar omodem;
84 unchar imodem;
85 unchar hflow;
86 unchar dsr;
87 unchar dcd;
88 unchar stopc;
89 unchar startc;
90 unchar stopca;
91 unchar startca;
92 unchar fepstopc;
93 unchar fepstartc;
94 unchar fepstopca;
95 unchar fepstartca;
96 ushort fepiflag;
97 ushort fepcflag;
98 ushort fepoflag;
99
100 unchar txwin;
101 unchar rxwin;
102 ushort txbufsize;
103 ushort rxbufsize;
104 unchar *txptr;
105 unchar *rxptr;
106 unchar *tmp_buf;
107
108 ulong c_iflag;
109 ulong c_cflag;
110 ulong c_lflag;
111 ulong c_oflag;
112 struct termios normal_termios;
113 struct termios callout_termios;
114 struct digi_struct digiext;
115 ulong dummy[8];
116 };