xref: /onnv-gate/usr/src/uts/sun4u/javelin/sys/envctrltwo.h (revision 2305:7954d746a1b5)
1*2305Sstevel /*
2*2305Sstevel  * CDDL HEADER START
3*2305Sstevel  *
4*2305Sstevel  * The contents of this file are subject to the terms of the
5*2305Sstevel  * Common Development and Distribution License (the "License").
6*2305Sstevel  * You may not use this file except in compliance with the License.
7*2305Sstevel  *
8*2305Sstevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*2305Sstevel  * or http://www.opensolaris.org/os/licensing.
10*2305Sstevel  * See the License for the specific language governing permissions
11*2305Sstevel  * and limitations under the License.
12*2305Sstevel  *
13*2305Sstevel  * When distributing Covered Code, include this CDDL HEADER in each
14*2305Sstevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*2305Sstevel  * If applicable, add the following below this CDDL HEADER, with the
16*2305Sstevel  * fields enclosed by brackets "[]" replaced with your own identifying
17*2305Sstevel  * information: Portions Copyright [yyyy] [name of copyright owner]
18*2305Sstevel  *
19*2305Sstevel  * CDDL HEADER END
20*2305Sstevel  */
21*2305Sstevel 
22*2305Sstevel /*
23*2305Sstevel  * Copyright 1997 Sun Microsystems, Inc.  All rights reserved.
24*2305Sstevel  * Use is subject to license terms.
25*2305Sstevel  */
26*2305Sstevel 
27*2305Sstevel #ifndef	_JAV_ENVCTRLTWO_H
28*2305Sstevel #define	_JAV_ENVCTRLTWO_H
29*2305Sstevel 
30*2305Sstevel #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*2305Sstevel 
32*2305Sstevel #ifdef	__cplusplus
33*2305Sstevel extern "C" {
34*2305Sstevel #endif
35*2305Sstevel 
36*2305Sstevel #if defined(_KERNEL)
37*2305Sstevel 
38*2305Sstevel struct envctrlunit {
39*2305Sstevel 	struct envctrl_pcd8584_regs *bus_ctl_regs;
40*2305Sstevel 	ddi_acc_handle_t ctlr_handle;
41*2305Sstevel 	kmutex_t umutex;			/* lock for this structure */
42*2305Sstevel 	int instance;
43*2305Sstevel 	dev_info_t *dip;			/* device information */
44*2305Sstevel 	struct envctrl_ps2 ps_kstats[ENVCTRL_MAX_DEVS];	/* kstats for ps */
45*2305Sstevel 	struct envctrl_fan fan_kstats; 		/* kstats for fans */
46*2305Sstevel 	struct envctrl_encl encl_kstats;		/* kstats for FSP */
47*2305Sstevel 	struct envctrl_temp temp_kstats[ENVCTRL_MAX_DEVS]; /* tempreratures */
48*2305Sstevel 	struct envctrl_disk disk_kstats[ENVCTRL_MAX_DEVS]; /* disks */
49*2305Sstevel 	int cpu_pr_location[ENVCTRL_MAX_CPUS]; /* slot true if cpu present */
50*2305Sstevel 	uint_t num_fans_present;
51*2305Sstevel 	uint_t num_ps_present;
52*2305Sstevel 	uint_t num_encl_present;
53*2305Sstevel 	uint_t num_cpus_present;
54*2305Sstevel 	uint_t num_temps_present;
55*2305Sstevel 	uint_t num_disks_present;
56*2305Sstevel 	kstat_t *psksp;
57*2305Sstevel 	kstat_t *fanksp;
58*2305Sstevel 	kstat_t *enclksp;
59*2305Sstevel 	kstat_t *tempksp;
60*2305Sstevel 	kstat_t *diskksp;
61*2305Sstevel 	ddi_iblock_cookie_t ic_trap_cookie;	/* interrupt cookie */
62*2305Sstevel 	/*  CPR support */
63*2305Sstevel 	boolean_t suspended;			/* TRUE if driver suspended */
64*2305Sstevel 	boolean_t oflag;			/*  already open */
65*2305Sstevel 	int current_mode;			/* NORMAL or DIAG_MODE */
66*2305Sstevel 	timeout_id_t timeout_id;				/* timeout id */
67*2305Sstevel 	timeout_id_t pshotplug_id;			/* ps poll id */
68*2305Sstevel 	int activity_led_blink;
69*2305Sstevel 	int present_led_state; 			/* is it on or off?? */
70*2305Sstevel 	timeout_id_t blink_timeout_id;
71*2305Sstevel 	int initting; /* 1 is TRUE , 0 is FALSE , used to mask intrs */
72*2305Sstevel 	boolean_t shutdown; /* TRUE = power off in error event */
73*2305Sstevel 	boolean_t fan_failed; /* TRUE = fan failure detected */
74*2305Sstevel 	boolean_t tempr_warning; /* TRUE = thermal warning detected */
75*2305Sstevel };
76*2305Sstevel 
77*2305Sstevel #endif	/* _KERNEL */
78*2305Sstevel 
79*2305Sstevel #ifdef	__cplusplus
80*2305Sstevel }
81*2305Sstevel #endif
82*2305Sstevel 
83*2305Sstevel #endif	/* _JAV_ENVCTRLTWO_H */
84