xref: /netbsd-src/share/man/man4/man4.sparc/magma.4 (revision 404fbe5fb94ca1e054339640cabb2801ce52dd30)
1.\"     $NetBSD: magma.4,v 1.10 2008/07/02 10:16:20 plunky Exp $
2.\"
3.\" Copyright (c) 1998 Iain Hibbert
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
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.Dd April 21, 1998
27.Dt MAGMA 4 sparc
28.Sh NAME
29.Nm magma
30.Nd
31Magma Sp Serial/Parallel board device driver
32.Sh SYNOPSIS
33.Cd "magma* at sbus? slot ? offset ?"
34.Cd "mtty* at magma?"
35.Cd "mbpp* at magma?"
36.Sh DESCRIPTION
37The
38.Nm
39driver provides an interface to Magma LC2+1Sp, 2+1Sp, 4+1Sp, 8+2Sp,
404Sp, 8Sp, 12Sp, 16Sp, 1P and 2P boards.
41These boards are based around the Cirrus Logic CD1400 serial/parallel
42communications engine and the Cirrus Logic CD1190 parallel
43communications engine.
44.Pp
45The device minor numbers for this driver are encoded as follows:
46.Pp
47.Bd -literal
48    +---+---+---+---+---+---+---+---+
49    | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
50    +---+---+---+---+---+---+---+---+
51      |   |   |   |   |   |   |   |
52      |   |   |   |   +---+---+---+---\*[Gt] port number
53      |   |   |   |
54      |   |   |   +-------------------\*[Gt] dial-out (on tty ports)
55      |   |   |
56      |   |   +-----------------------\*[Gt] unused
57      |   |
58      +---+---------------------------\*[Gt] card number
59.Ed
60.Pp
61Up to four cards are supported in the system.
62.Pp
63All tty ports have full automatic hardware (RTS/CTS) flow control available
64and a 12 byte FIFO on the chip in each direction so errors should be minimal.
65.Sh FILES
66.Bl -tag -width /dev/bpp[0-3][0-1] -compact
67.It Pa /dev/tty[0-3][0-a]
68Serial ports
69.It Pa /dev/bpp[0-3][0-1]
70Parallel ports
71.El
72.Sh DIAGNOSTICS
73.Bl -diag
74.It "mtty%d%x: ring buffer overflow"
75Incoming characters have been discarded due to a buffer overflow.
76This is caused by the process in control of the device not reading
77characters fast enough.
78.Pp
79If need be you can make the ring buffer bigger by changing the
80.Dv MAGMA_RBUF_SIZE
81#define to something bigger, but it should be a multiple
82of two.
83.It "mtty%d%x: fifo overflow"
84Incoming characters have been discarded due to a CD1400 channel overrun.
85This is caused by interrupts not being serviced sufficiently quickly
86to prevent the 12 byte receive FIFO on a serial channel from overflowing.
87.Pp
88Reducing the value of either the
89.Dv MTTY_RX_FIFO_THRESHOLD
90or
91.Dv MTTY_RX_DTR_THRESHOLD
92#define's to something smaller may help slow machines avoid this problem.
93.El
94.Sh SEE ALSO
95.Xr read 2 ,
96.Xr termios 4 ,
97.Xr tty 4
98.Sh HISTORY
99The driver was loosely based upon the
100.Xr cy 4
101Cyclades Cyclom device driver written
102by Andrew Herbert and Timo Rossi.
103.Sh AUTHORS
104The driver was written by
105.An Iain Hibbert .
106.Sh TO DO
107CD1190 parallel support.
108.Pp
109.Qq bpp
110input.
111.Pp
112Dial-out (cua) devices are not yet supported.
113.Pp
114.Qq mdmbuf
115is unsupported (see
116.Xr tty 4
117and
118.Xr termios 4 ) .
119.Pp
120Automatic XON/XOFF handshaking could be implemented fairly easily.
121.Pp
122It would be good if the tty port waited for the FIFO to empty before allowing
123a close, so that I could turn off the channel interrupts at that time.
124It can be done.
125