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