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