Deleted Added
full compact
digireg.h (76195) digireg.h (78412)
1/*-
2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
1/*-
2 * Copyright (c) 2001 Brian Somers <brian@Awfulhak.org>
3 * based on work by Slawa Olhovchenkov
3 * based on work by Slawa Olhovchenkov
4 * John Prince <johnp@knight-trosoft.com>
5 * Eric Hernes
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
8 * are met:
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 *
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the
15 * documentation and/or other materials provided with the distribution.
16 *
17 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
18 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
20 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
21 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
22 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
23 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
24 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
25 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
26 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
27 * SUCH DAMAGE.
28 *
27 * $FreeBSD: head/sys/dev/digi/digireg.h 76195 2001-05-02 01:08:09Z brian $
29 * $FreeBSD: head/sys/dev/digi/digireg.h 78412 2001-06-18 15:02:33Z brian $
28 */
29
30struct global_data {
31 volatile ushort cin;
32 volatile ushort cout;
33 volatile ushort cstart;
34 volatile ushort cmax;
35 volatile ushort ein;
36 volatile ushort eout;
37 volatile ushort istart;
38 volatile ushort imax;
39};
40
41
42struct board_chan {
43 volatile ushort tpjmp;
44 volatile ushort tcjmp;
45 volatile ushort fil1;
46 volatile ushort rpjmp;
47
48 volatile ushort tseg;
49 volatile ushort tin;
50 volatile ushort tout;
51 volatile ushort tmax;
52
53 volatile ushort rseg;
54 volatile ushort rin;
55 volatile ushort rout;
56 volatile ushort rmax;
57
58 volatile ushort tlow;
59 volatile ushort rlow;
60 volatile ushort rhigh;
61 volatile ushort incr;
62
63 volatile ushort dev;
64 volatile ushort edelay;
65 volatile ushort blen;
66 volatile ushort btime;
67
68 volatile ushort iflag;
69 volatile ushort oflag;
70 volatile ushort cflag;
71 volatile ushort gmask;
72
73 volatile ushort col;
74 volatile ushort delay;
75 volatile ushort imask;
76 volatile ushort tflush;
77
78 volatile u_char _1[16];
79
80 volatile u_char num;
81 volatile u_char ract;
82 volatile u_char bstat;
83 volatile u_char tbusy;
84 volatile u_char iempty;
85 volatile u_char ilow;
86 volatile u_char idata;
87 volatile u_char eflag;
88
89 volatile u_char tflag;
90 volatile u_char rflag;
91 volatile u_char xmask;
92 volatile u_char xval;
93 volatile u_char mstat;
94 volatile u_char mchange;
95 volatile u_char mint;
96 volatile u_char lstat;
97
98 volatile u_char mtran;
99 volatile u_char orun;
100 volatile u_char startca;
101 volatile u_char stopca;
102 volatile u_char startc;
103 volatile u_char stopc;
104 volatile u_char vnext;
105 volatile u_char hflow;
106
107 volatile u_char fillc;
108 volatile u_char ochar;
109 volatile u_char omask;
110 volatile u_char _2;
111
112 volatile u_char _3[28];
113};
114
115#define SRXLWATER 0xe0
116#define SRXHWATER 0xe1
117#define STPTR 0xe2
118#define PAUSETX 0xe3
119#define RESUMETX 0xe4
120#define SAUXONOFFC 0xe6
121#define SENDBREAK 0xe8
122#define SETMODEM 0xe9
123#define SETIFLAGS 0xeA
124#define SONOFFC 0xeB
125#define STXLWATER 0xeC
126#define PAUSERX 0xeE
127#define RESUMERX 0xeF
128#define RESETCHAN 0xf0
129#define SETBUFFER 0xf2
130#define SETCOOKED 0xf3
131#define SETHFLOW 0xf4
132#define SETCFLAGS 0xf5
133#define SETVNEXT 0xf6
134#define SETBSLICE 0xf7
135#define SETRSMODE 0xfd
136#define SETCMDACK 0xfe
137#define RESERV 0xff
138
139#define BREAK_IND 0x01
140#define LOWTX_IND 0x02
141#define EMPTYTX_IND 0x04
142#define DATA_IND 0x08
143#define MODEMCHG_IND 0x20
144#define RECV_OVR_IND 0x40
145#define CMD_ACK_IND 0x40
146#define UART_OVR_IND 0x80
147
148#define ALL_IND (BREAK_IND|LOWTX_IND|EMPTYTX_IND|DATA_IND|MODEMCHG_IND)
149
150#define FEPTIMEOUT 2000
151
152#define FEPCLR 0x0
153#define FEPMEM 0x2
154#define FEPRST 0x4
155#define FEPREQ 0x8
156#define FEPWIN 0x80
157#define FEPMASK 0xe
158/* #define FEPMASK 0x4 */
159
160#define BOTWIN 0x100L
161#define TOPWIN 0xFF00L
162#define MISCGLOBAL 0x0C00L
163#define FEPCODESEG 0x0200L
164
165/* #define BIOSCODE 0xff800 */ /* Window 15, offset 7800h */
166#define FEPCODE 0x0d000
167
168#define FEP_CSTART 0x400L
169#define FEP_CMAX 0x800L
170#define FEP_ISTART 0x800L
171#define FEP_IMAX 0xC00L
172#define MBOX 0xC40L
173#define FEP_CIN 0xD10L
174#define FEP_GLOBAL 0xD10L
175#define FEP_EIN 0xD18L
176#define FEPSTAT 0xD20L
177#define CHANSTRUCT 0x1000L
178#define RXTXBUF 0x4000L
179
180#define BIOSOFFSET 0x1000L
181#define BIOSCODE 0xf800L
182#define FEPOFFSET 0x2000L
183
184/* c_cflag bits */
185#define FEP_CSIZE 0x000030
186#define FEP_CS5 0x000000
187#define FEP_CS6 0x000010
188#define FEP_CS7 0x000020
189#define FEP_CS8 0x000030
190#define FEP_CSTOPB 0x000040
191#define FEP_CREAD 0x000080
192#define FEP_PARENB 0x000100
193#define FEP_PARODD 0x000200
194#define FEP_CLOCAL 0x000800
195#define FEP_FASTBAUD 0x000400
196
197/* c_iflag bits */
198#define FEP_IGNBRK 0000001
199#define FEP_BRKINT 0000002
200#define FEP_IGNPAR 0000004
201#define FEP_PARMRK 0000010
202#define FEP_INPCK 0000020
203#define FEP_ISTRIP 0000040
204#define FEP_IXON 0002000
205#define FEP_IXANY 0004000
206#define FEP_IXOFF 0010000
30 */
31
32struct global_data {
33 volatile ushort cin;
34 volatile ushort cout;
35 volatile ushort cstart;
36 volatile ushort cmax;
37 volatile ushort ein;
38 volatile ushort eout;
39 volatile ushort istart;
40 volatile ushort imax;
41};
42
43
44struct board_chan {
45 volatile ushort tpjmp;
46 volatile ushort tcjmp;
47 volatile ushort fil1;
48 volatile ushort rpjmp;
49
50 volatile ushort tseg;
51 volatile ushort tin;
52 volatile ushort tout;
53 volatile ushort tmax;
54
55 volatile ushort rseg;
56 volatile ushort rin;
57 volatile ushort rout;
58 volatile ushort rmax;
59
60 volatile ushort tlow;
61 volatile ushort rlow;
62 volatile ushort rhigh;
63 volatile ushort incr;
64
65 volatile ushort dev;
66 volatile ushort edelay;
67 volatile ushort blen;
68 volatile ushort btime;
69
70 volatile ushort iflag;
71 volatile ushort oflag;
72 volatile ushort cflag;
73 volatile ushort gmask;
74
75 volatile ushort col;
76 volatile ushort delay;
77 volatile ushort imask;
78 volatile ushort tflush;
79
80 volatile u_char _1[16];
81
82 volatile u_char num;
83 volatile u_char ract;
84 volatile u_char bstat;
85 volatile u_char tbusy;
86 volatile u_char iempty;
87 volatile u_char ilow;
88 volatile u_char idata;
89 volatile u_char eflag;
90
91 volatile u_char tflag;
92 volatile u_char rflag;
93 volatile u_char xmask;
94 volatile u_char xval;
95 volatile u_char mstat;
96 volatile u_char mchange;
97 volatile u_char mint;
98 volatile u_char lstat;
99
100 volatile u_char mtran;
101 volatile u_char orun;
102 volatile u_char startca;
103 volatile u_char stopca;
104 volatile u_char startc;
105 volatile u_char stopc;
106 volatile u_char vnext;
107 volatile u_char hflow;
108
109 volatile u_char fillc;
110 volatile u_char ochar;
111 volatile u_char omask;
112 volatile u_char _2;
113
114 volatile u_char _3[28];
115};
116
117#define SRXLWATER 0xe0
118#define SRXHWATER 0xe1
119#define STPTR 0xe2
120#define PAUSETX 0xe3
121#define RESUMETX 0xe4
122#define SAUXONOFFC 0xe6
123#define SENDBREAK 0xe8
124#define SETMODEM 0xe9
125#define SETIFLAGS 0xeA
126#define SONOFFC 0xeB
127#define STXLWATER 0xeC
128#define PAUSERX 0xeE
129#define RESUMERX 0xeF
130#define RESETCHAN 0xf0
131#define SETBUFFER 0xf2
132#define SETCOOKED 0xf3
133#define SETHFLOW 0xf4
134#define SETCFLAGS 0xf5
135#define SETVNEXT 0xf6
136#define SETBSLICE 0xf7
137#define SETRSMODE 0xfd
138#define SETCMDACK 0xfe
139#define RESERV 0xff
140
141#define BREAK_IND 0x01
142#define LOWTX_IND 0x02
143#define EMPTYTX_IND 0x04
144#define DATA_IND 0x08
145#define MODEMCHG_IND 0x20
146#define RECV_OVR_IND 0x40
147#define CMD_ACK_IND 0x40
148#define UART_OVR_IND 0x80
149
150#define ALL_IND (BREAK_IND|LOWTX_IND|EMPTYTX_IND|DATA_IND|MODEMCHG_IND)
151
152#define FEPTIMEOUT 2000
153
154#define FEPCLR 0x0
155#define FEPMEM 0x2
156#define FEPRST 0x4
157#define FEPREQ 0x8
158#define FEPWIN 0x80
159#define FEPMASK 0xe
160/* #define FEPMASK 0x4 */
161
162#define BOTWIN 0x100L
163#define TOPWIN 0xFF00L
164#define MISCGLOBAL 0x0C00L
165#define FEPCODESEG 0x0200L
166
167/* #define BIOSCODE 0xff800 */ /* Window 15, offset 7800h */
168#define FEPCODE 0x0d000
169
170#define FEP_CSTART 0x400L
171#define FEP_CMAX 0x800L
172#define FEP_ISTART 0x800L
173#define FEP_IMAX 0xC00L
174#define MBOX 0xC40L
175#define FEP_CIN 0xD10L
176#define FEP_GLOBAL 0xD10L
177#define FEP_EIN 0xD18L
178#define FEPSTAT 0xD20L
179#define CHANSTRUCT 0x1000L
180#define RXTXBUF 0x4000L
181
182#define BIOSOFFSET 0x1000L
183#define BIOSCODE 0xf800L
184#define FEPOFFSET 0x2000L
185
186/* c_cflag bits */
187#define FEP_CSIZE 0x000030
188#define FEP_CS5 0x000000
189#define FEP_CS6 0x000010
190#define FEP_CS7 0x000020
191#define FEP_CS8 0x000030
192#define FEP_CSTOPB 0x000040
193#define FEP_CREAD 0x000080
194#define FEP_PARENB 0x000100
195#define FEP_PARODD 0x000200
196#define FEP_CLOCAL 0x000800
197#define FEP_FASTBAUD 0x000400
198
199/* c_iflag bits */
200#define FEP_IGNBRK 0000001
201#define FEP_BRKINT 0000002
202#define FEP_IGNPAR 0000004
203#define FEP_PARMRK 0000010
204#define FEP_INPCK 0000020
205#define FEP_ISTRIP 0000040
206#define FEP_IXON 0002000
207#define FEP_IXANY 0004000
208#define FEP_IXOFF 0010000