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