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