xref: /titanic_41/usr/src/uts/sun4u/sunfire/sys/environ.h (revision 29949e866e40b95795203f3ee46f44a197c946e4)
1*29949e86Sstevel /*
2*29949e86Sstevel  * CDDL HEADER START
3*29949e86Sstevel  *
4*29949e86Sstevel  * The contents of this file are subject to the terms of the
5*29949e86Sstevel  * Common Development and Distribution License (the "License").
6*29949e86Sstevel  * You may not use this file except in compliance with the License.
7*29949e86Sstevel  *
8*29949e86Sstevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*29949e86Sstevel  * or http://www.opensolaris.org/os/licensing.
10*29949e86Sstevel  * See the License for the specific language governing permissions
11*29949e86Sstevel  * and limitations under the License.
12*29949e86Sstevel  *
13*29949e86Sstevel  * When distributing Covered Code, include this CDDL HEADER in each
14*29949e86Sstevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*29949e86Sstevel  * If applicable, add the following below this CDDL HEADER, with the
16*29949e86Sstevel  * fields enclosed by brackets "[]" replaced with your own identifying
17*29949e86Sstevel  * information: Portions Copyright [yyyy] [name of copyright owner]
18*29949e86Sstevel  *
19*29949e86Sstevel  * CDDL HEADER END
20*29949e86Sstevel  */
21*29949e86Sstevel 
22*29949e86Sstevel /*
23*29949e86Sstevel  * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
24*29949e86Sstevel  * Use is subject to license terms.
25*29949e86Sstevel  */
26*29949e86Sstevel 
27*29949e86Sstevel #ifndef	_SYS_ENVIRON_H
28*29949e86Sstevel #define	_SYS_ENVIRON_H
29*29949e86Sstevel 
30*29949e86Sstevel #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*29949e86Sstevel 
32*29949e86Sstevel #ifdef	__cplusplus
33*29949e86Sstevel extern "C" {
34*29949e86Sstevel #endif
35*29949e86Sstevel 
36*29949e86Sstevel /* useful debugging stuff */
37*29949e86Sstevel #define	ENVIRON_ATTACH_DEBUG	0x1
38*29949e86Sstevel #define	ENVIRON_INTERRUPT_DEBUG	0x2
39*29949e86Sstevel #define	ENVIRON_REGISTERS_DEBUG	0x4
40*29949e86Sstevel 
41*29949e86Sstevel /*
42*29949e86Sstevel  * OBP supplies us with 1 register set for the environment node
43*29949e86Sstevel  *
44*29949e86Sstevel  * It is:
45*29949e86Sstevel  * 	0	Temperature register
46*29949e86Sstevel  */
47*29949e86Sstevel 
48*29949e86Sstevel #if defined(_KERNEL)
49*29949e86Sstevel 
50*29949e86Sstevel /* Structures used in the driver to manage the hardware */
51*29949e86Sstevel struct environ_soft_state {
52*29949e86Sstevel 	dev_info_t *dip;		/* dev info of myself */
53*29949e86Sstevel 	dev_info_t *pdip;		/* dev info of parent */
54*29949e86Sstevel 	struct environ_soft_state *next;
55*29949e86Sstevel 	int board;			/* Board number for this FHC */
56*29949e86Sstevel 	volatile uchar_t *temp_reg;	/* VA of temperature register */
57*29949e86Sstevel 	struct temp_stats tempstat;	/* in memory storage of temperature */
58*29949e86Sstevel 	kstat_t *environ_ksp;		/* kstat pointer for temperature */
59*29949e86Sstevel 	kstat_t *environ_oksp;		/* kstat pointer for temp override */
60*29949e86Sstevel };
61*29949e86Sstevel 
62*29949e86Sstevel #endif /* _KERNEL */
63*29949e86Sstevel 
64*29949e86Sstevel #ifdef	__cplusplus
65*29949e86Sstevel }
66*29949e86Sstevel #endif
67*29949e86Sstevel 
68*29949e86Sstevel #endif	/* _SYS_ENVIRON_H */
69