environ.h revision 1341:6d7c4f090a72
1267306Semaste/*
2267306Semaste * CDDL HEADER START
3267306Semaste *
4267306Semaste * The contents of this file are subject to the terms of the
5267306Semaste * Common Development and Distribution License (the "License").
6267306Semaste * You may not use this file except in compliance with the License.
7267306Semaste *
8267306Semaste * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9267306Semaste * or http://www.opensolaris.org/os/licensing.
10267306Semaste * See the License for the specific language governing permissions
11267306Semaste * and limitations under the License.
12267306Semaste *
13267306Semaste * When distributing Covered Code, include this CDDL HEADER in each
14267306Semaste * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15267306Semaste * If applicable, add the following below this CDDL HEADER, with the
16267306Semaste * fields enclosed by brackets "[]" replaced with your own identifying
17267306Semaste * information: Portions Copyright [yyyy] [name of copyright owner]
18267306Semaste *
19267306Semaste * CDDL HEADER END
20267306Semaste */
21267306Semaste
22267306Semaste/*
23267306Semaste * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
24267306Semaste * Use is subject to license terms.
25267306Semaste */
26267306Semaste
27267306Semaste#ifndef	_SYS_ENVIRON_H
28267306Semaste#define	_SYS_ENVIRON_H
29267306Semaste
30267306Semaste#pragma ident	"%Z%%M%	%I%	%E% SMI"
31267306Semaste
32267306Semaste#ifdef	__cplusplus
33267306Semasteextern "C" {
34267306Semaste#endif
35267306Semaste
36267306Semaste/* useful debugging stuff */
37267306Semaste#define	ENVIRON_ATTACH_DEBUG	0x1
38267306Semaste#define	ENVIRON_INTERRUPT_DEBUG	0x2
39267306Semaste#define	ENVIRON_REGISTERS_DEBUG	0x4
40267306Semaste
41267306Semaste/*
42267306Semaste * OBP supplies us with 1 register set for the environment node
43267306Semaste *
44267306Semaste * It is:
45267306Semaste * 	0	Temperature register
46267306Semaste */
47267306Semaste
48267306Semaste#if defined(_KERNEL)
49267306Semaste
50267306Semaste/* Structures used in the driver to manage the hardware */
51267306Semastestruct environ_soft_state {
52267306Semaste	dev_info_t *dip;		/* dev info of myself */
53267306Semaste	dev_info_t *pdip;		/* dev info of parent */
54267306Semaste	struct environ_soft_state *next;
55267306Semaste	int board;			/* Board number for this FHC */
56267306Semaste	volatile uchar_t *temp_reg;	/* VA of temperature register */
57267306Semaste	struct temp_stats tempstat;	/* in memory storage of temperature */
58267306Semaste	kstat_t *environ_ksp;		/* kstat pointer for temperature */
59267306Semaste	kstat_t *environ_oksp;		/* kstat pointer for temp override */
60267306Semaste};
61267306Semaste
62267306Semaste#endif /* _KERNEL */
63267306Semaste
64267306Semaste#ifdef	__cplusplus
65267306Semaste}
66267306Semaste#endif
67267306Semaste
68267306Semaste#endif	/* _SYS_ENVIRON_H */
69267306Semaste