FreeBSD/Linux Kernel Cross Reference
sys/i386at/comreg.h
1 /*
2 * Mach Operating System
3 * Copyright (c) 1991,1990 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: comreg.h,v $
29 * Revision 2.6 93/05/10 21:18:55 rvb
30 * Added mask for interrupt register.
31 * [93/05/06 09:29:39 af]
32 *
33 * Revision 2.5 93/01/14 17:30:06 danner
34 * Finessing Fifos From Finland.
35 * [92/12/19 10:56:33 af]
36 *
37 * Revision 2.4 91/05/14 16:21:42 mrt
38 * Correcting copyright
39 *
40 * Revision 2.3 91/02/05 17:16:39 mrt
41 * Changed to new Mach copyright
42 * [91/02/01 17:42:28 mrt]
43 *
44 * Revision 2.2 90/11/26 14:49:28 rvb
45 * jsb bet me to XMK34, sigh ...
46 * [90/11/26 rvb]
47 * Apparently first revision is r2.2
48 * [90/11/25 10:46:52 rvb]
49 *
50 * Synched 2.5 & 3.0 at I386q (r2.3.1.5) & XMK35 (r2.2)
51 * [90/11/15 rvb]
52 *
53 * Revision 2.3.1.4 90/08/25 15:44:03 rvb
54 * Flush New Ioctls.
55 * [90/08/14 rvb]
56 *
57 * Revision 2.3.1.3 90/07/10 11:43:13 rvb
58 * Merge csr offsets macros into this file.
59 * [90/07/06 rvb]
60 *
61 * Revision 2.3.1.2 90/02/28 15:49:16 rvb
62 * Fix numerous typo's in Olivetti disclaimer.
63 * [90/02/28 rvb]
64 *
65 * Revision 2.3.1.1 90/01/08 13:30:02 rvb
66 * Add Olivetti copyright.
67 * [90/01/08 rvb]
68 *
69 * Revision 2.3 89/09/09 15:21:09 rvb
70 * com.h -> comreg.h; com.h is now used vs pccom.h for
71 * configuration.
72 * [89/09/09 rvb]
73 *
74 * Revision 2.2 89/07/17 10:39:48 rvb
75 * New from Oilvetti.
76 *
77 */
78
79 /*
80 * Olivetti serial port driver v1.0
81 * Copyright Ing. C. Olivetti & C. S.p.A. 1988, 1989
82 * All rights reserved.
83 *
84 */
85 /*
86 Copyright 1988, 1989 by Olivetti Advanced Technology Center, Inc.,
87 Cupertino, California.
88
89 All Rights Reserved
90
91 Permission to use, copy, modify, and distribute this software and
92 its documentation for any purpose and without fee is hereby
93 granted, provided that the above copyright notice appears in all
94 copies and that both the copyright notice and this permission notice
95 appear in supporting documentation, and that the name of Olivetti
96 not be used in advertising or publicity pertaining to distribution
97 of the software without specific, written prior permission.
98
99 OLIVETTI DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
100 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
101 IN NO EVENT SHALL OLIVETTI BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
102 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
103 LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
104 NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
105 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
106 */
107
108 #define TXRX(addr) (addr + 0)
109 #define BAUD_LSB(addr) (addr + 0)
110 #define BAUD_MSB(addr) (addr + 1)
111 #define INTR_ENAB(addr) (addr + 1)
112 #define INTR_ID(addr) (addr + 2)
113 #define FIFO_CTL(addr) (addr + 2)
114 #define LINE_CTL(addr) (addr + 3)
115 #define MODEM_CTL(addr) (addr + 4)
116 #define LINE_STAT(addr) (addr + 5)
117 #define MODEM_STAT(addr)(addr + 6)
118 #define SCR(addr) (addr + 7)
119
120 #define MODi 0
121 #define TRAi 2
122 #define RECi 4
123 #define LINi 6
124 #define CTIi 0xc
125 #define MASKi 0xf
126
127 /* line control register */
128 #define iWLS0 0x01 /*word length select bit 0 */
129 #define iWLS1 0x02 /*word length select bit 2 */
130 #define iSTB 0x04 /* number of stop bits */
131 #define iPEN 0x08 /* parity enable */
132 #define iEPS 0x10 /* even parity select */
133 #define iSP 0x20 /* stick parity */
134 #define iSETBREAK 0x40 /* break key */
135 #define iDLAB 0x80 /* divisor latch access bit */
136 #define i5BITS 0x00 /* 5 bits per char */
137 #define i6BITS 0x01 /* 6 bits per char */
138 #define i7BITS 0x02 /* 7 bits per char */
139 #define i8BITS 0x03 /* 8 bits per char */
140
141 /* line status register */
142 #define iDR 0x01 /* data ready */
143 #define iOR 0x02 /* overrun error */
144 #define iPE 0x04 /* parity error */
145 #define iFE 0x08 /* framing error */
146 #define iBRKINTR 0x10 /* a break has arrived */
147 #define iTHRE 0x20 /* tx hold reg is now empty */
148 #define iTSRE 0x40 /* tx shift reg is now empty */
149
150 /* interrupt id regisger */
151 #define iMODEM_INTR 0x01
152 #define iTX_INTR 0x02
153 #define iRX_INTR 0x04
154 #define iERROR_INTR 0x08
155
156 /* interrupt enable register */
157 #define iRX_ENAB 0x01
158 #define iTX_ENAB 0x02
159 #define iERROR_ENAB 0x04
160 #define iMODEM_ENAB 0x08
161
162 /* modem control register */
163 #define iDTR 0x01 /* data terminal ready */
164 #define iRTS 0x02 /* request to send */
165 #define iOUT1 0x04 /* COM aux line -not used */
166 #define iOUT2 0x08 /* turns intr to 386 on/off */
167 #define iLOOP 0x10 /* loopback for diagnostics */
168
169 /* modem status register */
170 #define iDCTS 0x01 /* delta clear to send */
171 #define iDDSR 0x02 /* delta data set ready */
172 #define iTERI 0x04 /* trail edge ring indicator */
173 #define iDRLSD 0x08 /* delta rx line sig detect */
174 #define iCTS 0x10 /* clear to send */
175 #define iDSR 0x20 /* data set ready */
176 #define iRI 0x40 /* ring indicator */
177 #define iRLSD 0x80 /* rx line sig detect */
178
179 /* fifo control register (only in 16550) */
180 #define iFIFOENA 0x01 /* Enable fifos */
181 #define iCLRRCVRFIFO 0x02 /* Clear receive fifo */
182 #define iCLRXMITFIFO 0x04 /* Clear transmit fifo */
183 #define iDMAMODE 0x08 /* DMA transfer enable */
184 #define iFIFO1CH 0x00 /* Receive fifo trigger level 1 char */
185 #define iFIFO4CH 0x40 /* Receive fifo trigger level 4 chars*/
186 #define iFIFO8CH 0x80 /* Receive fifo trigger level 8 chars*/
187 #define iFIFO14CH 0xc0 /* Receive fifo trigger level 14 chars*/
Cache object: 8538e922c2467f71e0aac59f771159ea
|