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