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