xref: /illumos-gate/usr/src/cmd/sf880drd/sf880drd.h (revision 141040e8a310da49386b596573e5dde5580572ec)
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 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 #ifndef	_SF880DRD_H
28 #define	_SF880DRD_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 #ifdef	DEBUG
37 int dakdr_debug = 0;
38 #define	DPRINTF(ARGLIST)	if (dakdr_debug & 0x1) printf ARGLIST;
39 #else
40 #define	DPRINTF(ARGLIST)
41 #endif	/* DEBUG */
42 
43 /*
44  * CONSTANTS
45  */
46 #define	SLOTS_PER_CONTROLLER	4
47 #define	NUM_CONTROLLERS		4
48 #define	NUM_FDS			(SLOTS_PER_CONTROLLER * NUM_CONTROLLERS)
49 #define	GPTWO_CONTROLLER	3
50 
51 /*
52  * Device paths/names
53  */
54 #define	EBUS_DEV_NAME		"/devices/pci@9,700000/ebus@1/"
55 #define	SEG5_DEV_NAME		EBUS_DEV_NAME "i2c@1,30/"
56 
57 #define	SSC050_LED_PORT		SEG5_DEV_NAME "ioexp@0,82:port_4"
58 
59 #define	HPC3130_DEV_FMT SEG5_DEV_NAME "hotplug-controller@0,%2x:port_%1x"
60 
61 /*
62  * Front panel leds (Cf. Daktari spec 7.2.5.7).
63  */
64 #define	SYS_FAULT_LED		0
65 #define	SYS_OK2REMOVE_LED	1
66 #define	DISK_FAULT_LED		2
67 #define	POWER_FAULT_LED		3
68 #define	THERM_RIGHT_LED		4
69 #define	LEFT_DOOR_ATTEN_LED	5
70 #define	RIGHT_DOOR_ATTEN_LED	6
71 #define	THERM_LEFT_LED		7
72 
73 #define	LED_ON			0
74 #define	LED_OFF			1
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _SF880DRD_H */
81