]> CyberLeo.Net >> Repos - FreeBSD/releng/7.2.git/blob - share/man/man4/uart.4
Create releng/7.2 from stable/7 in preparation for 7.2-RELEASE.
[FreeBSD/releng/7.2.git] / share / man / man4 / uart.4
1 .\"
2 .\" Copyright (c) 2003 Marcel Moolenaar
3 .\" All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\"
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 ``AS IS'' AND ANY EXPRESS OR
16 .\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 .\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18 .\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19 .\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20 .\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21 .\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22 .\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 .\"
26 .\" $FreeBSD$
27 .\"
28 .Dd March 12, 2008
29 .Dt UART 4
30 .Os
31 .\"
32 .Sh NAME
33 .Nm uart
34 .Nd driver for Universal Asynchronous Receiver/Transmitter (UART) devices
35 .\"
36 .Sh SYNOPSIS
37 .Cd "device uart"
38 .Pp
39 .Cd "device puc"
40 .Cd "device uart"
41 .Pp
42 .Cd "device scc"
43 .Cd "device uart"
44 .Pp
45 .Bd -ragged offset -compact
46 In
47 .Pa /boot/device.hints :
48 .Cd hint.uart.0.disabled="1"
49 .Cd hint.uart.0.baud="38400"
50 .Cd hint.uart.0.port="0x3f8"
51 .Cd hint.uart.0.flags="0x10"
52 .Ed
53 .Pp
54 With
55 .Ar flags
56 encoded as:
57 .Bl -tag -compact -width 0x000000
58 .It 0x00010
59 device is potential system console
60 .It 0x00080
61 use this port for remote kernel debugging
62 .It 0x00100
63 set RX FIFO trigger level to ``low'' (NS8250 only)
64 .It 0x00200
65 set RX FIFO trigger level to ``medium low'' (NS8250 only)
66 .It 0x00400
67 set RX FIFO trigger level to ``medium high'' (default, NS8250 only)
68 .It 0x00800
69 set RX FIFO trigger level to ``high'' (NS8250 only)
70 .El
71 .\"
72 .Sh DESCRIPTION
73 The
74 .Nm
75 device driver provides support for various classes of UARTs implementing the
76 EIA RS-232C (CCITT V.24) serial communications interface.
77 Each such interface is controlled by a separate and independent instance of
78 the
79 .Nm
80 driver.
81 The primary support for devices that contain multiple serial interfaces or
82 that contain other functionality besides one or more serial interfaces is
83 provided by the
84 .Xr puc 4 ,
85 or
86 .Xr scc 4
87 device drivers.
88 However, the serial interfaces of those devices that are managed by the
89 .Xr puc 4 ,
90 or
91 .Xr scc 4
92 driver are each independently controlled by the
93 .Nm
94 driver.
95 As such, the
96 .Xr puc 4 ,
97 or
98 .Xr scc 4
99 driver provides umbrella functionality for the
100 .Nm
101 driver and hides the complexities that are inherent when elementary components
102 are packaged together.
103 .Pp
104 The
105 .Nm
106 driver has a modular design to allow it to be used on differing hardware and
107 for various purposes.
108 In the following sections the components are discussed in detail.
109 Options are described in the section that covers the component to which each
110 option applies.
111 .\"
112 .Ss CORE COMPONENT
113 At the heart of the
114 .Nm
115 driver is the core component.
116 It contains the bus attachments and the low-level interrupt handler.
117 .\"
118 .Ss HARDWARE DRIVERS
119 The core component and the kernel interfaces talk to the hardware through the
120 hardware interface.
121 This interface serves as an abstraction of the hardware and allows varying
122 UARTs to be used for serial communications.
123 .\"
124 .Ss SYSTEM DEVICES
125 System devices are UARTs that have a special purpose by way of hardware
126 design or software setup.
127 For example, Sun UltraSparc machines use UARTs as their keyboard interface.
128 Such an UART cannot be used for general purpose communications.
129 Likewise, when the kernel is configured for a serial console, the
130 corresponding UART will in turn be a system device so that the kernel can
131 output boot messages early on in the boot process.
132 .\"
133 .Ss KERNEL INTERFACES
134 The last but not least of the components is the kernel interface.
135 This component ultimately determines how the UART is made visible to the
136 kernel in particular and to users in general.
137 The default kernel interface is the TTY interface.
138 This allows the UART to be used for terminals, modems and serial line IP
139 applications.
140 System devices, with the notable exception of serial consoles, generally
141 have specialized kernel interfaces.
142 .\"
143 .Sh HARDWARE
144 The
145 .Nm
146 driver supports the following classes of UARTs:
147 .Pp
148 .Bl -bullet -compact
149 .It
150 NS8250: standard hardware based on the 8250, 16450, 16550, 16650, 16750 or
151 the 16950 UARTs.
152 .It
153 SCC: serial communications controllers supported by the
154 .Xr scc 4
155 device driver.
156 .El
157 .\"
158 .Sh FILES
159 .Bl -tag -width ".Pa /dev/ttyu?.init" -compact
160 .It Pa /dev/ttyu?
161 for callin ports
162 .It Pa /dev/ttyu?.init
163 .It Pa /dev/ttyu?.lock
164 corresponding callin initial-state and lock-state devices
165 .Pp
166 .It Pa /dev/cuau?
167 for callout ports
168 .It Pa /dev/cuau?.init
169 .It Pa /dev/cuau?.lock
170 corresponding callout initial-state and lock-state devices
171 .El
172 .Sh SEE ALSO
173 .Xr puc 4 ,
174 .Xr scc 4
175 .\"
176 .Sh HISTORY
177 The
178 .Nm
179 device driver first appeared in
180 .Fx 5.2 .
181 .Sh AUTHORS
182 The
183 .Nm
184 device driver and this manual page were written by
185 .An Marcel Moolenaar Aq marcel@xcllnt.net .