FreeBSD/Linux Kernel Cross Reference
sys/ipsc/usm.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991 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 * Copyright 1988, 1989, 1990, 1991 by Intel Corporation,
28 * Santa Clara, California.
29 *
30 * All Rights Reserved
31 *
32 * Permission to use, copy, modify, and distribute this software and its
33 * documentation for any purpose and without fee is hereby granted,
34 * provided that the above copyright notice appears in all copies and that
35 * both the copyright notice and this permission notice appear in
36 * supporting documentation, and that the name of Intel not be used in
37 * advertising or publicity pertaining to distribution of the software
38 * without specific, written prior permission.
39 *
40 * INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING
41 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT
42 * SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR CONSEQUENTIAL
43 * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
44 * PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR OTHER TORTIOUS
45 * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
46 * THIS SOFTWARE.
47 */
48 /*
49 * Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
50 * Cupertino, California.
51 *
52 * All Rights Reserved
53 *
54 * Permission to use, copy, modify, and distribute this software and
55 * its documentation for any purpose and without fee is hereby
56 * granted, provided that the above copyright notice appears in all
57 * copies and that both the copyright notice and this permission notice
58 * appear in supporting documentation, and that the name of Olivetti
59 * not be used in advertising or publicity pertaining to distribution
60 * of the software without specific, written prior permission.
61 *
62 * OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
63 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
64 * IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
65 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
66 * LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
67 * NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
68 * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
69 */
70 /*
71 * HISTORY
72 * $Log: usm.h,v $
73 * Revision 2.4 91/08/28 11:14:11 jsb
74 * From Intel SSD: added some i860 UART register definitions.
75 * [91/08/27 17:21:00 jsb]
76 *
77 * Revision 2.3 91/06/18 20:52:57 jsb
78 * New copyright from Intel.
79 * [91/06/18 19:06:07 jsb]
80 *
81 * Revision 2.2 90/12/04 14:50:57 jsb
82 * First checkin.
83 * [90/12/03 21:58:20 jsb]
84 *
85 */
86
87 #define MAX_COM_PORTS 1
88 #define COM_PORTS 1
89 #define MAXTIME 2 /* 2 sec */
90
91 /* line control register */
92 #define iWLS0 0x01 /*word length select bit 0 */
93 #define iWLS1 0x02 /*word length select bit 2 */
94 #define iSTB 0x04 /* number of stop bits */
95 #define iPEN 0x08 /* parity enable */
96 #define iEPS 0x10 /* even parity select */
97 #define iSP 0x20 /* stick parity */
98 #define iSETBREAK 0x40 /* break key */
99 #define iDLAB 0x80 /* divisor latch access bit */
100 #define i5BITS 0x00 /* 5 bits per char */
101 #define i6BITS 0x01 /* 6 bits per char */
102 #define i7BITS 0x02 /* 7 bits per char */
103 #define i8BITS 0x03 /* 8 bits per char */
104
105 /* line status register */
106 #define iDR 0x01 /* data ready */
107 #define iOR 0x02 /* overrun error */
108 #define iPE 0x04 /* parity error */
109 #define iFE 0x08 /* framing error */
110 #define iBRKINTR 0x10 /* a break has arrived */
111 #define iTHRE 0x20 /* tx hold reg is now empty */
112 #define iTSRE 0x40 /* tx shift reg is now empty */
113
114 /* interrupt id register */
115 #define iMODEM_INTR 0x01
116 #define iTX_INTR 0x02
117 #define iRX_INTR 0x04
118 #define iERROR_INTR 0x08
119
120 /* bank select register */
121 #define iBANK0 0x00
122 #define iBANK1 0x20
123 #define iBANK2 0x40
124 #define iBANK3 0x60
125
126 /* interrupt enable register */
127 #define iRX_ENAB 0x01
128 #define iTX_ENAB 0x02
129 #define iERROR_ENAB 0x04
130 #define iMODEM_ENAB 0x08
131
132 /* modem control register */
133 #define iDTR 0x01 /* data terminal ready */
134 #define iRTS 0x02 /* request to send */
135 #define iOUT1 0x04 /* COM aux line -not used */
136 #define iOUT2 0x08 /* turns intr to 386 on/off */
137 #define iLOOP 0x10 /* loopback for diagnostics */
138
139 /* modem status register */
140 #define iDCTS 0x01 /* delta clear to send */
141 #define iDDSR 0x02 /* delta data set ready */
142 #define iTERI 0x04 /* trail edge ring indicator */
143 #define iDRLSD 0x08 /* delta rx line sig detect */
144 #define iCTS 0x10 /* clear to send */
145 #define iDSR 0x20 /* data set ready */
146 #define iRI 0x40 /* ring indicator */
147 #define iRLSD 0x80 /* rx line sig detect */
148
149
150 /*
151 * UART Registers
152 */
153
154 #if i860
155 /* Values from i860ipsc/nodehw.h */
156 #define iUSM_REG0 UART_REG0
157 #define iUSM_REG1 UART_REG1
158 #define iUSM_REG2 UART_REG2
159 #define iUSM_REG3 UART_REG3
160 #define iUSM_REG4 UART_REG4
161 #define iUSM_REG5 UART_REG5
162 #define iUSM_REG6 UART_REG6
163 #define iUSM_REG7 UART_REG7
164 #else i860
165 #define iUSM_REG0 0xa0
166 #define iUSM_REG1 0xa2
167 #define iUSM_REG2 0xa4
168 #define iUSM_REG3 0xa6
169 #define iUSM_REG4 0xa8
170 #define iUSM_REG5 0xaa
171 #define iUSM_REG6 0xac
172 #define iUSM_REG7 0xae
173 #endif i860
174
175 /* Bank 0 */
176 #define iUSM_RXD iUSM_REG0
177 #define iUSM_TXD iUSM_REG0
178 #define iUSM_BAL iUSM_REG0
179 #define iUSM_BAH iUSM_REG1
180 #define iUSM_GER iUSM_REG1
181 #define iUSM_BANK iUSM_REG2
182 #define iUSM_GIR iUSM_REG2
183 #define iUSM_LCR iUSM_REG3
184 #define iUSM_MCR iUSM_REG4
185 #define iUSM_LSR iUSM_REG5
186 #define iUSM_MSR iUSM_REG6
187 #define iUSM_ACR0 iUSM_REG7
188
189 /* Bank 1 */
190 #define iUSM_RXF iUSM_REG1
191 #define iUSM_TXF iUSM_REG1
192 #define iUSM_TMST iUSM_REG3
193 #define iUSM_TMCR iUSM_REG3
194 #define iUSM_FLR iUSM_REG4
195 #define iUSM_RST iUSM_REG5
196 #define iUSM_RCM iUSM_REG5
197 #define iUSM_TCM iUSM_REG6
198 #define iUSM_GSR iUSM_REG7
199 #define iUSM_ICM iUSM_REG7
200
201 /* Bank 2 */
202 #define iUSM_FMD iUSM_REG1
203 #define iUSM_TMD iUSM_REG3
204 #define iUSM_IMD iUSM_REG4
205 #define iUSM_ACR1 iUSM_REG5
206 #define iUSM_RIE iUSM_REG6
207 #define iUSM_RMD iUSM_REG7
208
209 /* Bank 3 */
210 #define iUSM_CLCF iUSM_REG0
211 #define iUSM_BACF iUSM_REG1
212 #define iUSM_BBL iUSM_REG0
213 #define iUSM_BBH iUSM_REG1
214 #define iUSM_BBCF iUSM_REG3
215 #define iUSM_PMD iUSM_REG4
216 #define iUSM_MIE iUSM_REG5
217 #define iUSM_TMIE iUSM_REG6
Cache object: 9a4d8926fe110adea09de16c08994605
|