xref: /titanic_51/usr/src/uts/sun4u/sunfire/sys/simmstat.h (revision 29949e866e40b95795203f3ee46f44a197c946e4)
1*29949e86Sstevel /*
2*29949e86Sstevel  * CDDL HEADER START
3*29949e86Sstevel  *
4*29949e86Sstevel  * The contents of this file are subject to the terms of the
5*29949e86Sstevel  * Common Development and Distribution License (the "License").
6*29949e86Sstevel  * You may not use this file except in compliance with the License.
7*29949e86Sstevel  *
8*29949e86Sstevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*29949e86Sstevel  * or http://www.opensolaris.org/os/licensing.
10*29949e86Sstevel  * See the License for the specific language governing permissions
11*29949e86Sstevel  * and limitations under the License.
12*29949e86Sstevel  *
13*29949e86Sstevel  * When distributing Covered Code, include this CDDL HEADER in each
14*29949e86Sstevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*29949e86Sstevel  * If applicable, add the following below this CDDL HEADER, with the
16*29949e86Sstevel  * fields enclosed by brackets "[]" replaced with your own identifying
17*29949e86Sstevel  * information: Portions Copyright [yyyy] [name of copyright owner]
18*29949e86Sstevel  *
19*29949e86Sstevel  * CDDL HEADER END
20*29949e86Sstevel  */
21*29949e86Sstevel 
22*29949e86Sstevel /*
23*29949e86Sstevel  * Copyright 1998 Sun Microsystems, Inc.  All rights reserved.
24*29949e86Sstevel  * Use is subject to license terms.
25*29949e86Sstevel  */
26*29949e86Sstevel 
27*29949e86Sstevel #ifndef	_SYS_SIMMSTAT_H
28*29949e86Sstevel #define	_SYS_SIMMSTAT_H
29*29949e86Sstevel 
30*29949e86Sstevel #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*29949e86Sstevel 
32*29949e86Sstevel #ifdef	__cplusplus
33*29949e86Sstevel extern "C" {
34*29949e86Sstevel #endif
35*29949e86Sstevel 
36*29949e86Sstevel /* useful debugging stuff */
37*29949e86Sstevel #define	SIMMSTAT_ATTACH_DEBUG		0x1
38*29949e86Sstevel #define	SIMMSTAT_REGISTERS_DEBUG	0x2
39*29949e86Sstevel 
40*29949e86Sstevel /*
41*29949e86Sstevel  * OBP supplies us with 1 register set for the simm-staus node, so
42*29949e86Sstevel  * we do not need multiple register set number defines and
43*29949e86Sstevel  * register offsets.
44*29949e86Sstevel  */
45*29949e86Sstevel 
46*29949e86Sstevel /* Use predefined strings to name the kstats from this driver. */
47*29949e86Sstevel #define	SIMMSTAT_KSTAT_NAME	"simm-status"
48*29949e86Sstevel 
49*29949e86Sstevel /* Number of SIMM slots in Sunfire System Board */
50*29949e86Sstevel #define	SIMM_COUNT		16
51*29949e86Sstevel 
52*29949e86Sstevel #if defined(_KERNEL)
53*29949e86Sstevel 
54*29949e86Sstevel struct simmstat_soft_state {
55*29949e86Sstevel 	dev_info_t *dip;	/* dev info of myself */
56*29949e86Sstevel 	dev_info_t *pdip;	/* dev info of my parent */
57*29949e86Sstevel 	int board;		/* Board number for this FHC */
58*29949e86Sstevel 	/* Mapped addresses of registers */
59*29949e86Sstevel 	volatile uchar_t *simmstat_base; /* base of simmstatus registers */
60*29949e86Sstevel 	kstat_t *simmstat_ksp;
61*29949e86Sstevel };
62*29949e86Sstevel 
63*29949e86Sstevel #endif	/* _KERNEL */
64*29949e86Sstevel 
65*29949e86Sstevel #ifdef	__cplusplus
66*29949e86Sstevel }
67*29949e86Sstevel #endif
68*29949e86Sstevel 
69*29949e86Sstevel #endif	/* _SYS_SIMMSTAT_H */
70