xref: /titanic_44/usr/src/uts/sun4u/montecarlo/sys/netract_gen.h (revision c28749e97052f09388969427adf7df641cdcdc22)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright (c) 1999, 2000 by Sun Microsystems, Inc.
24  * All rights reserved.
25  */
26 
27 /*
28  * MonteCarlo's Common I2C Driver Definitions
29  *
30  * These definitions are derived from, or the same as,
31  * some of the definitions from sun4u/sys/envctrl_gen.h,
32  * which are common definitions for workgroup server platforms.
33  */
34 
35 #ifndef	_SYS_NETRACT_GEN_H
36 #define	_SYS_NETRACT_GEN_H
37 
38 #pragma ident	"%Z%%M%	%I%	%E% SMI"
39 
40 #ifdef	__cplusplus
41 extern "C" {
42 #endif
43 
44 
45 #ifndef	_SYS_ENVCTRL_GEN_H
46 #define	_SYS_ENVCTRL_GEN_H
47 
48 #define	ENVCTRL_NORMAL_MODE	0x01
49 #define	ENVCTRL_DIAG_MODE	0x02
50 #define	ENVC_DEBUG_MODE		0x03
51 
52 /*
53  * Max number of a particular
54  * device on one bus.
55  */
56 #define	ENVCTRL_MAX_DEVS	0x10
57 #define	ENVCTRL_I2C_NODEV	0xFF
58 #define	ENVCTRL_INSTANCE_0	0x00
59 
60 /*
61  * Kstat structure definitions (PSARC 1996/159)
62  */
63 typedef struct envctrl_fan {
64 	int instance;			/* instance of this type */
65 	int type;			/* CPU, PS or AMBIENT fan */
66 	boolean_t fans_ok;		/* are the fans okay */
67 	int fanflt_num;			/* if not okay, which fan faulted */
68 	uint_t fanspeed;			/* chip to set speed of fans */
69 } envctrl_fan_t;
70 
71 #endif	/* _SYS_ENVCTRL_GEN_H */
72 
73 #define	ENVC_IOC_SETMODE	(int)(_IOW('p', 77, uchar_t))
74 #define	ENVC_IOC_GETMODE	(int)(_IOR('p', 87, uchar_t))
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _SYS_NETRACT_GEN_H */
81