xref: /netbsd-src/sys/arch/amiga/dev/serreg.h (revision 95e1ffb15694e54f29f8baaa4232152b703c2a5a)
1*95e1ffb1Schristos /*	$NetBSD: serreg.h,v 1.10 2005/12/11 12:16:28 christos Exp $	*/
2ec77f0b3Scgd 
333e84123Smw /*
433e84123Smw  * Copyright (c) 1982, 1986, 1990 Regents of the University of California.
533e84123Smw  * All rights reserved.
633e84123Smw  *
733e84123Smw  * Redistribution and use in source and binary forms, with or without
833e84123Smw  * modification, are permitted provided that the following conditions
933e84123Smw  * are met:
1033e84123Smw  * 1. Redistributions of source code must retain the above copyright
1133e84123Smw  *    notice, this list of conditions and the following disclaimer.
1233e84123Smw  * 2. Redistributions in binary form must reproduce the above copyright
1333e84123Smw  *    notice, this list of conditions and the following disclaimer in the
1433e84123Smw  *    documentation and/or other materials provided with the distribution.
15aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
1633e84123Smw  *    may be used to endorse or promote products derived from this software
1733e84123Smw  *    without specific prior written permission.
1833e84123Smw  *
1933e84123Smw  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
2033e84123Smw  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2133e84123Smw  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2233e84123Smw  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
2333e84123Smw  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2433e84123Smw  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2533e84123Smw  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2633e84123Smw  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2733e84123Smw  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2833e84123Smw  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2933e84123Smw  * SUCH DAMAGE.
3033e84123Smw  *
314e382ac0Smw  *	@(#)dcareg.h	7.3 (Berkeley) 5/7/91
3233e84123Smw  */
3333e84123Smw 
3433e84123Smw struct serdevice {
3533e84123Smw 	int	dummy;
3633e84123Smw };
3733e84123Smw 
3833e84123Smw /*
3933e84123Smw  * WARNING: Serial console is assumed to be at SC9
4033e84123Smw  * and CONUNIT must be 0.
4133e84123Smw  */
4233e84123Smw #define CONUNIT		(0)
4333e84123Smw 
4433e84123Smw /* seems this is nowhere defined in the system headers.. do it here */
4533e84123Smw #define SERDATRF_OVRUN	(1<<15)
4633e84123Smw #define SERDATRF_RBF	(1<<14)
4733e84123Smw #define SERDATRF_TBE	(1<<13)
4833e84123Smw #define SERDATRF_TSRE	(1<<12)
4933e84123Smw #define SERDATRF_RXD	(1<<11)
5033e84123Smw #define SERDATRF_RSVD	(1<<10)
5133e84123Smw #define SERDATRF_STP2	(1<<9)
5233e84123Smw #define SERDATRF_STP1	(1<<8)
5333e84123Smw 
5433e84123Smw #define ADKCONF_SETCLR	(1<<15)
5533e84123Smw #define ADKCONF_UARTBRK	(1<<11)
5633e84123Smw 
5733e84123Smw 
5833e84123Smw #define SERBRD(val)	((3579545/val-1) < 32768 ? 3579545/val-1 : 0)
59bdb2629dSmw #define SER_VBL_PRIORITY (1)
60bdb2629dSmw 
61bdb2629dSmw /* unit is in lower 7 bits (for now, only one unit:-))
62bdb2629dSmw    dialin:    open blocks until carrier present, hangup on carrier drop
63bdb2629dSmw    dialout:   carrier is ignored */
64bdb2629dSmw 
65bdb2629dSmw #define SERUNIT(dev)   (minor(dev) & 0x7f)
6693a62a00Sis #define DIALOUT(dev)   (minor(dev) & 0x80)
67