xref: /netbsd-src/sys/arch/sparc/sparc/auxiotwo.h (revision 8ad8b5528b902ecee850b92b95e10305695fcdc8)
1 /*	$NetBSD: auxiotwo.h,v 1.5 2012/07/29 00:04:05 matt Exp $	*/
2 
3 /*
4  * Copyright (c) 2000 The NetBSD Foundation, Inc.
5  * All rights reserved.
6  *
7  * This code is derived from software contributed to The NetBSD Foundation
8  * by Julian Coleman.
9  *
10  * Redistribution and use in source and binary forms, with or without
11  * modification, are permitted provided that the following conditions
12  * are met:
13  * 1. Redistributions of source code must retain the above copyright
14  *    notice, this list of conditions and the following disclaimer.
15  * 2. Redistributions in binary form must reproduce the above copyright
16  *    notice, this list of conditions and the following disclaimer in the
17  *    documentation and/or other materials provided with the distribution.
18  *
19  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
20  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
21  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
22  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
23  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29  * POSSIBILITY OF SUCH DAMAGE.
30  */
31 
32 /*
33  * Based on software developed by the Computer Systems Engineering group
34  * at Lawrence Berkeley Laboratory.
35  */
36 
37 /*
38  * The Tadpole Sparcbook 3 technical manual says :
39  *	bit 5 (0x20)	Power Failure Detect (1 = power fail)
40  *	bit 1 (0x02)	Clear Power Fail Detect (1 = clear)
41  *	bit 0 (0x01)	Power Off (1 = off)
42  * Setting bit 0 to 1 appears to have no effect.  Bits 1:6 are untested
43  */
44 
45 #define AUXIOTWO_SOF	0x80		/* Serial ports off (when set) */
46 #define	AUXIOTWO_PFD	0x20		/* Power Failure Detect */
47 #define	AUXIOTWO_CPF	0x02		/* Clear Power Fail Detect */
48 #define	AUXIOTWO_SON	0x01		/* Serial ports on (when cleared) */
49 
50 /*
51  * Serial port open/close
52  */
53 
54 #define ZS_ENABLE	0
55 #define ZS_DISABLE	1
56 
57 #ifndef _LOCORE
58 extern volatile u_char *auxiotwo_reg;
59 extern u_char auxiotwo_regval;
60 unsigned int auxiotwobisc(int, int);
61 void auxiotwoserialendis(int);
62 void auxiotwoserialsetapm(int);
63 int auxiotwoserialgetapm(void);
64 #endif
65