FreeBSD/Linux Kernel Cross Reference
sys/i386at/i8250.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: i8250.h,v $
29 * Revision 2.6 91/05/14 16:23:53 mrt
30 * Correcting copyright
31 *
32 * Revision 2.5 91/02/05 17:17:21 mrt
33 * Changed to new Mach copyright
34 * [91/02/01 17:43:23 mrt]
35 *
36 * Revision 2.4 90/11/26 14:49:43 rvb
37 * jsb bet me to XMK34, sigh ...
38 * [90/11/26 rvb]
39 * Synched 2.5 & 3.0 at I386q (r1.3.1.4) & XMK35 (r2.4)
40 * [90/11/15 rvb]
41 *
42 * Revision 1.3.1.3 90/07/27 11:26:01 rvb
43 * Fix Intel Copyright as per B. Davies authorization.
44 * [90/07/27 rvb]
45 *
46 * Revision 2.2 90/05/21 13:26:57 dbg
47 * First checkin.
48 * [90/05/17 15:42:20 dbg]
49 *
50 * Revision 1.3.1.2 90/01/08 13:31:32 rvb
51 * Add Intel copyright.
52 * [90/01/08 rvb]
53 *
54 * Revision 1.3.1.1 89/10/22 11:34:05 rvb
55 * Received from Intel October 13, 1989.
56 * [89/10/13 rvb]
57 *
58 * Revision 1.3 89/02/26 12:41:51 gm0w
59 * Changes for cleanup.
60 *
61 */
62
63 /*
64 Copyright 1988, 1989 by Intel Corporation, Santa Clara, California.
65
66 All Rights Reserved
67
68 Permission to use, copy, modify, and distribute this software and
69 its documentation for any purpose and without fee is hereby
70 granted, provided that the above copyright notice appears in all
71 copies and that both the copyright notice and this permission notice
72 appear in supporting documentation, and that the name of Intel
73 not be used in advertising or publicity pertaining to distribution
74 of the software without specific, written prior permission.
75
76 INTEL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE
77 INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
78 IN NO EVENT SHALL INTEL BE LIABLE FOR ANY SPECIAL, INDIRECT, OR
79 CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
80 LOSS OF USE, DATA OR PROFITS, WHETHER IN ACTION OF CONTRACT,
81 NEGLIGENCE, OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
82 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
83 */
84
85 /*
86 * Header file for i8250 chip
87 */
88
89 /* port offsets from the base i/o address */
90
91 #define RDAT 0
92 #define RIE 1
93 #define RID 2
94 #define RFC 2
95 #define RLC 3
96 #define RMC 4
97 #define RLS 5
98 #define RMS 6
99 #define RDLSB 0
100 #define RDMSB 1
101
102 /* interrupt control register */
103
104 #define IERD 0x01 /* read int */
105 #define IETX 0x02 /* xmit int */
106 #define IELS 0x04 /* line status int */
107 #define IEMS 0x08 /* modem int */
108
109 /* interrupt status register */
110
111 #define IDIP 0x01 /* not interrupt pending */
112 #define IDMS 0x00 /* modem int */
113 #define IDTX 0x02 /* xmit int */
114 #define IDRD 0x04 /* read int */
115 #define IDLS 0x06 /* line status int */
116 #define IDMASK 0x0f /* interrupt ID mask */
117
118 /* line control register */
119
120 #define LC5 0x00 /* word length 5 */
121 #define LC6 0x01 /* word length 6 */
122 #define LC7 0x02 /* word length 7 */
123 #define LC8 0x03 /* word length 8 */
124 #define LCSTB 0x04 /* 2 stop */
125 #define LCPEN 0x08 /* parity enable */
126 #define LCEPS 0x10 /* even parity select */
127 #define LCSP 0x20 /* stick parity */
128 #define LCBRK 0x40 /* send break */
129 #define LCDLAB 0x80 /* divisor latch access bit */
130 #define LCPAR 0x38 /* parity mask */
131
132 /* line status register */
133
134 #define LSDR 0x01 /* data ready */
135 #define LSOR 0x02 /* overrun error */
136 #define LSPE 0x04 /* parity error */
137 #define LSFE 0x08 /* framing error */
138 #define LSBI 0x10 /* break interrupt */
139 #define LSTHRE 0x20 /* xmit holding reg empty */
140 #define LSTSRE 0x40 /* xmit shift reg empty */
141
142 /* modem control register */
143
144 #define MCDTR 0x01 /* DTR */
145 #define MCRTS 0x02 /* RTS */
146 #define MCOUT1 0x04 /* OUT1 */
147 #define MCOUT2 0x08 /* OUT2 */
148 #define MCLOOP 0x10 /* loopback */
149
150 /* modem status register */
151
152 #define MSDCTS 0x01 /* delta CTS */
153 #define MSDDSR 0x02 /* delta DSR */
154 #define MSTERI 0x04 /* delta RE */
155 #define MSDRLSD 0x08 /* delta CD */
156 #define MSCTS 0x10 /* CTS */
157 #define MSDSR 0x20 /* DSR */
158 #define MSRI 0x40 /* RE */
159 #define MSRLSD 0x80 /* CD */
160
161 /* divisor latch register settings for various baud rates */
162
163 #define BCNT1200 0x60
164 #define BCNT2400 0x30
165 #define BCNT4800 0x18
166 #define BCNT9600 0x0c
Cache object: 8d823072c1e9fce9909f44e48ff8a1c7
|