1.\" $NetBSD: magma.4,v 1.4 1999/12/15 23:44:54 abs 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 21 April, 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 | | | | +---+---+---+---> port number 57 | | | | 58 | | | +-------------------> dialout (on tty ports) 59 | | | 60 | | +-----------------------> unused 61 | | 62 +---+---------------------------> 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 DIAGNOSTICS 70.Bl -diag 71.It "mtty%d%x: ring buffer overflow" 72Incoming characters have been discarded due to a buffer overflow. 73This is caused by the process in control of the device not reading 74characters fast enough. 75.Pp 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 79of two. 80.It "mtty%d%x: fifo overflow" 81Incoming characters have been discarded due to a CD1400 channel overrun. 82This is caused by interrupts not being serviced sufficiently quickly 83to prevent the 12 byte receive FIFO on a serial channel from overflowing. 84.Pp 85Reducing the value of either the 86.Dv MTTY_RX_FIFO_THRESHOLD 87or 88.Dv MTTY_RX_DTR_THRESHOLD 89#define's to something smaller may help slow machines avoid this problem. 90.El 91.Sh FILES 92.Bl -tag -width /dev/bpp[0-3][0-1] -compact 93.It Pa /dev/tty[0-3][0-a] 94Serial ports 95.It Pa /dev/bpp[0-3][0-1] 96Parallel ports 97.El 98.Sh SEE ALSO 99.Xr read 2 , 100.Xr termios 4 , 101.Xr tty 4 102.Sh AUTHORS 103The driver was written by Iain Hibbert 104.Aq plunky@skate.demon.co.uk 105.Sh HISTORY 106The driver was loosely based upon the 107.Xr cy 4 108Cyclades Cyclom device driver written 109by Andrew Herbert and Timo Rossi. 110.Sh TO DO 111CD1190 parallel support. 112.Pp 113.Qq bpp 114input. 115.Pp 116Dialout (cua) devices are not yet supported. 117.Pp 118.Qq mdmbuf 119is unsupported (see 120.Xr tty 4 121and 122.Xr termios 4 ) . 123.Pp 124Automatic XON/XOFF handshaking could be implemented fairly easily. 125.Pp 126It would be good if the tty port waited for the FIFO to empty before allowing 127a close, so that I could turn off the channel interrupts at that time. 128It can be done. 129