xref: /netbsd/share/man/man4/man4.sparc/magma.4 (revision bf9ec67e)
1.\"     $NetBSD: magma.4,v 1.7 2002/02/13 08:18:03 ross Exp $
2.\"
3.\" Copyright (c) 1998 Iain Hibbert
4.\" All rights reserved.
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.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. All advertising materials mentioning features or use of this software
14.\"    must display the following acknowledgement:
15.\"	This product includes software developed by Iain Hibbert
16.\" 4. The name of the author may not be used to endorse or promote products
17.\"    derived from this software without specific prior written permission.
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29.\"
30.Dd April 21, 1998
31.Dt MAGMA 4 sparc
32.Sh NAME
33.Nm magma
34.Nd
35Magma Sp Serial/Parallel board device driver
36.Sh SYNOPSIS
37.Cd "magma* at sbus? slot ? offset ?"
38.Cd "mtty* at magma?"
39.Cd "mbpp* at magma?"
40.Sh DESCRIPTION
41The
42.Nm
43driver provides an interface to Magma LC2+1Sp, 2+1Sp, 4+1Sp, 8+2Sp,
444Sp, 8Sp, 12Sp, 16Sp, 1P and 2P boards.
45These boards are based around the Cirrus Logic CD1400 serial/parallel
46communications engine and the Cirrus Logic CD1190 parallel
47communications engine.
48.Pp
49The device minor numbers for this driver are encoded as follows:
50.Pp
51.Bd -literal
52    +---+---+---+---+---+---+---+---+
53    | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
54    +---+---+---+---+---+---+---+---+
55      |   |   |   |   |   |   |   |
56      |   |   |   |   +---+---+---+---\*[Gt] port number
57      |   |   |   |
58      |   |   |   +-------------------\*[Gt] dialout (on tty ports)
59      |   |   |
60      |   |   +-----------------------\*[Gt] unused
61      |   |
62      +---+---------------------------\*[Gt] card number
63.Ed
64.Pp
65Up to four cards are supported in the system.
66.Pp
67All tty ports have full automatic hardware (RTS/CTS) flow control available
68and a 12 byte FIFO on the chip in each direction so errors should be minimal.
69.Sh FILES
70.Bl -tag -width /dev/bpp[0-3][0-1] -compact
71.It Pa /dev/tty[0-3][0-a]
72Serial ports
73.It Pa /dev/bpp[0-3][0-1]
74Parallel ports
75.El
76.Sh DIAGNOSTICS
77.Bl -diag
78.It "mtty%d%x: ring buffer overflow"
79Incoming characters have been discarded due to a buffer overflow.
80This is caused by the process in control of the device not reading
81characters fast enough.
82.Pp
83If need be you can make the ring buffer bigger by changing the
84.Dv MAGMA_RBUF_SIZE
85#define to something bigger, but it should be a multiple
86of two.
87.It "mtty%d%x: fifo overflow"
88Incoming characters have been discarded due to a CD1400 channel overrun.
89This is caused by interrupts not being serviced sufficiently quickly
90to prevent the 12 byte receive FIFO on a serial channel from overflowing.
91.Pp
92Reducing the value of either the
93.Dv MTTY_RX_FIFO_THRESHOLD
94or
95.Dv MTTY_RX_DTR_THRESHOLD
96#define's to something smaller may help slow machines avoid this problem.
97.El
98.Sh SEE ALSO
99.Xr read 2 ,
100.Xr termios 4 ,
101.Xr tty 4
102.Sh HISTORY
103The driver was loosely based upon the
104.Xr cy 4
105Cyclades Cyclom device driver written
106by Andrew Herbert and Timo Rossi.
107.Sh AUTHORS
108The driver was written by
109.An Iain Hibbert
110.Aq plunky@skate.demon.co.uk .
111.Sh TO DO
112CD1190 parallel support.
113.Pp
114.Qq bpp
115input.
116.Pp
117Dialout (cua) devices are not yet supported.
118.Pp
119.Qq mdmbuf
120is unsupported (see
121.Xr tty 4
122and
123.Xr termios 4 ) .
124.Pp
125Automatic XON/XOFF handshaking could be implemented fairly easily.
126.Pp
127It would be good if the tty port waited for the FIFO to empty before allowing
128a close, so that I could turn off the channel interrupts at that time.
129It can be done.
130