FreeBSD/Linux Kernel Cross Reference
sys/chips/dz_7085.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
4 * All Rights Reserved.
5 *
6 * Permission to use, copy, modify and distribute this software and its
7 * documentation is hereby granted, provided that both the copyright
8 * notice and this permission notice appear in all copies of the
9 * software, derivative works or modified versions, and any portions
10 * thereof, and that both notices appear in supporting documentation.
11 *
12 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
13 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
14 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
15 *
16 * Carnegie Mellon requests users of this software to return to
17 *
18 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
19 * School of Computer Science
20 * Carnegie Mellon University
21 * Pittsburgh PA 15213-3890
22 *
23 * any improvements or extensions that they make and grant Carnegie Mellon
24 * the rights to redistribute these changes.
25 */
26 /*
27 * HISTORY
28 * $Log: dz_7085.h,v $
29 * Revision 2.7 91/08/24 11:51:44 af
30 * Moved padding down in impl file.
31 * [91/08/02 02:14:58 af]
32 *
33 * Revision 2.6 91/06/19 11:47:26 rvb
34 * mips->DECSTATION; vax->VAXSTATION
35 * [91/06/12 14:01:26 rvb]
36 *
37 * File moved here from mips/PMAX since it tries to be generic;
38 * it is used on the PMAX and the Vax3100.
39 * [91/06/04 rvb]
40 *
41 * Split out machine specific details to machine/dev/dz_7085.h
42 * [91/05/20 rvb]
43 *
44 * Revision 2.5 91/05/14 17:20:49 mrt
45 * Correcting copyright
46 *
47 * Revision 2.4 91/02/05 17:40:27 mrt
48 * Added author notices
49 * [91/02/04 11:12:51 mrt]
50 *
51 * Changed to use new Mach copyright
52 * [91/02/02 12:10:38 mrt]
53 *
54 * Revision 2.3 90/12/05 23:30:46 af
55 * Cleaned up.
56 * [90/12/03 23:14:00 af]
57 *
58 * Revision 2.1.1.1 90/11/01 03:37:28 af
59 * Created, from the DEC specs:
60 * "DECstation 5000/200 KN02 System Module Functional Specification"
61 * Workstation Systems Engineering, Palo Alto, CA. Aug 27, 1990.
62 * [90/09/03 af]
63 */
64 /*
65 * File: dz_7085.h
66 * Author: Alessandro Forin, Carnegie Mellon University
67 * Date: 9/90
68 *
69 * Defines for the DEC 7085 Serial Line Controller Chip
70 */
71
72 #define NDZ_LINE 4
73
74 /*
75 * What's hanging off those 4 lines
76 */
77
78 #define DZ_LINE_KEYBOARD 0
79 #define DZ_LINE_MOUSE 1
80 #define DZ_LINE_MODEM 2
81 #define DZ_LINE_PRINTER 3
82
83 /*
84 * Register layout, ignoring padding
85 */
86 typedef struct {
87 volatile unsigned short dz_csr; /* Control and Status */
88 volatile unsigned short dz_rbuf; /* Rcv buffer (RONLY) */
89 volatile unsigned short dz_tcr; /* Xmt control (R/W)*/
90 volatile unsigned short dz_tbuf; /* Xmt buffer (WONLY)*/
91 # define dz_lpr dz_rbuf /* Line parameters (WONLY)*/
92 # define dz_msr dz_tbuf /* Modem status (RONLY)*/
93 } dz_regmap_t;
94
95 /*
96 * CSR bits
97 */
98
99 #define DZ_CSR_MBZ 0x3c07 /* Must be zero */
100 #define DZ_CSR_MAINT 0x0008 /* rw: Maintenance mode */
101 #define DZ_CSR_CLR 0x0010 /* rw: Master clear (init) */
102 #define DZ_CSR_MSE 0x0020 /* rw: Master scan enable */
103 #define DZ_CSR_RIE 0x0040 /* rw: Rcv Interrupt Enable */
104 #define DZ_CSR_RDONE 0x0080 /* ro: Rcv done (silo avail) */
105 #define DZ_CSR_TLINE 0x0300 /* ro: Lineno ready for xmt */
106 #define DZ_CSR_TIE 0x4000 /* rw: Xmt Interrupt Enable */
107 #define DZ_CSR_TRDY 0x8000 /* ro: Xmt ready */
108
109 /*
110 * Receiver buffer (top of silo). Read-only.
111 */
112
113 #define DZ_SILO_DEEP 64
114
115 #define DZ_RBUF_CHAR 0x00ff /* Received character */
116 #define DZ_RBUF_RLINE 0x0300 /* Line it came from */
117 #define DZ_RBUF_XXXX 0x0c00 /* Reads as zero */
118 #define DZ_RBUF_PERR 0x1000 /* Parity error */
119 #define DZ_RBUF_FERR 0x2000 /* Framing error (break) */
120 #define DZ_RBUF_OERR 0x4000 /* Silo overrun */
121 #define DZ_RBUF_VALID 0x8000 /* Info is valid */
122
123 /*
124 * Line parameters register. Write-only.
125 */
126
127 #define DZ_LPAR_LINE 0x0003 /* Bin encoded line no */
128 #define DZ_LPAR_MBZ 0xe004 /* Must be zero */
129 #define DZ_LPAR_CLEN 0x0018 /* Character length: */
130 # define DZ_LPAR_5BITS 0x0000 /* 5 bits per char */
131 # define DZ_LPAR_6BITS 0x0008 /* 6 bits per char */
132 # define DZ_LPAR_7BITS 0x0010 /* 7 bits per char */
133 # define DZ_LPAR_8BITS 0x0018 /* 8 bits per char */
134 #define DZ_LPAR_STOP 0x0020 /* stop bits: off->1, on->2 */
135 #define DZ_LPAR_PAR_ENB 0x0040 /* generate/detect parity */
136 #define DZ_LPAR_ODD_PAR 0x0080 /* generate/detect ODD parity */
137 #define DZ_LPAR_SPEED 0x0f00 /* Speed code: */
138 # define DZ_LPAR_50 0x0000 /* 50 baud */
139 # define DZ_LPAR_75 0x0100 /* 75 baud */
140 # define DZ_LPAR_110 0x0200 /* 110 baud */
141 # define DZ_LPAR_134_5 0x0300 /* 134.5 baud */
142 # define DZ_LPAR_150 0x0400 /* 150 baud */
143 # define DZ_LPAR_300 0x0500 /* 300 baud */
144 # define DZ_LPAR_600 0x0600 /* 600 baud */
145 # define DZ_LPAR_1200 0x0700 /* 1200 baud */
146 # define DZ_LPAR_1800 0x0800 /* 1800 baud */
147 # define DZ_LPAR_2000 0x0900 /* 2000 baud */
148 # define DZ_LPAR_2400 0x0a00 /* 2400 baud */
149 # define DZ_LPAR_3600 0x0b00 /* 3600 baud */
150 # define DZ_LPAR_4800 0x0c00 /* 4800 baud */
151 # define DZ_LPAR_7200 0x0d00 /* 7200 baud */
152 # define DZ_LPAR_9600 0x0e00 /* 9600 baud */
153 # define DZ_LPAR_MAX_SPEED 0x0f00 /* 19200/38400 baud */
154 #define DZ_LPAR_ENABLE 0x1000 /* Enable receiver */
155
156 /*
157 * Xmt control register
158 */
159
160 #define DZ_TCR_LNENB 0x000f /* rw: Xmt line enable */
161 #define DZ_TCR_MBZ 0xf0f0 /* Must be zero */
162 #define DZ_TCR_DTR3 0x0100 /* rw: DTR on printer line */
163 #define DZ_TCR_RTS3 0x0200 /* rw: RTS on printer line */
164 #define DZ_TCR_DTR2 0x0400 /* rw: DTR on modem line */
165 #define DZ_TCR_RTS2 0x0800 /* rw: RTS on modem line */
166
167 /*
168 * Modem status register. Read-only.
169 */
170
171 #define DZ_MSR_CTS3 0x0001 /* Clear To Send, printer line */
172 #define DZ_MSR_DSR3 0x0002 /* Data Set Ready, printer line */
173 #define DZ_MSR_CD3 0x0004 /* Carrier Detect, printer line */
174 #define DZ_MSR_RI3 0x0008 /* Ring Indicator, printer line */
175 #define DZ_MSR_XXXX 0xf0f0 /* Reads as zero */
176 #define DZ_MSR_CTS2 0x0100 /* Clear To Send, modem line */
177 #define DZ_MSR_DSR2 0x0200 /* Data Set Ready, modem line */
178 #define DZ_MSR_CD2 0x0400 /* Carrier Detect, modem line */
179 #define DZ_MSR_RI2 0x0800 /* Ring Indicator, modem line */
180
181
182 /*
183 * Xmt buffer
184 */
185
186 #define DZ_TBUF_CHAR 0x00ff /* Xmt character */
187 #define DZ_TBUF_BREAK_0 0x0100 /* set line 0 to space */
188 #define DZ_TBUF_BREAK_1 0x0200 /* set line 1 to space */
189 #define DZ_TBUF_BREAK_2 0x0400 /* set line 2 to space */
190 #define DZ_TBUF_BREAK_3 0x0800 /* set line 3 to space */
191 #define DZ_TBUF_MBZ 0xf000 /* Must be zero */
Cache object: dd80adce4df2a782bd1e5d04e51c8310
|