xref: /onnv-gate/usr/src/uts/sun4u/montecarlo/sys/scsb_led.h (revision 1708:ea74d8598a3a)
1*1708Sstevel /*
2*1708Sstevel  * CDDL HEADER START
3*1708Sstevel  *
4*1708Sstevel  * The contents of this file are subject to the terms of the
5*1708Sstevel  * Common Development and Distribution License (the "License").
6*1708Sstevel  * You may not use this file except in compliance with the License.
7*1708Sstevel  *
8*1708Sstevel  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9*1708Sstevel  * or http://www.opensolaris.org/os/licensing.
10*1708Sstevel  * See the License for the specific language governing permissions
11*1708Sstevel  * and limitations under the License.
12*1708Sstevel  *
13*1708Sstevel  * When distributing Covered Code, include this CDDL HEADER in each
14*1708Sstevel  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15*1708Sstevel  * If applicable, add the following below this CDDL HEADER, with the
16*1708Sstevel  * fields enclosed by brackets "[]" replaced with your own identifying
17*1708Sstevel  * information: Portions Copyright [yyyy] [name of copyright owner]
18*1708Sstevel  *
19*1708Sstevel  * CDDL HEADER END
20*1708Sstevel  */
21*1708Sstevel 
22*1708Sstevel /*
23*1708Sstevel  * Copyright 2000 Sun Microsystems, Inc.  All rights reserved.
24*1708Sstevel  * Use is subject to license terms.
25*1708Sstevel  */
26*1708Sstevel 
27*1708Sstevel /*
28*1708Sstevel  * Netra ct SCB/SSB driver (scsb) support for controlling the
29*1708Sstevel  * LEDs on the System Status Board that represent the cPCI Slots.
30*1708Sstevel  * Each slot has a pair of LEDs, one green (OK) and one amber (NOK).
31*1708Sstevel  * The OK (green) LED can also be made to blink.
32*1708Sstevel  */
33*1708Sstevel 
34*1708Sstevel #ifndef	_SYS_SCSB_LED_H
35*1708Sstevel #define	_SYS_SCSB_LED_H
36*1708Sstevel 
37*1708Sstevel #pragma ident	"%Z%%M%	%I%	%E% SMI"
38*1708Sstevel 
39*1708Sstevel #ifdef	__cplusplus
40*1708Sstevel extern "C" {
41*1708Sstevel #endif
42*1708Sstevel 
43*1708Sstevel #define	_SCSBIOC		('s' << 8)
44*1708Sstevel 
45*1708Sstevel /* The ioctl command */
46*1708Sstevel #define	ENVC_IOC_SETFSP		(_SCSBIOC | 23)
47*1708Sstevel 
48*1708Sstevel /* Netra ct 400 has 5 slots, Netra ct 800 has 8 slots.  Including CPU */
49*1708Sstevel #define	NCT800_MAX_SLOTS	8
50*1708Sstevel #define	NCT400_MAX_SLOTS	5
51*1708Sstevel 
52*1708Sstevel typedef	uint16_t	scsb_unum_t;
53*1708Sstevel 
54*1708Sstevel typedef enum {
55*1708Sstevel 	SLOT	= 0
56*1708Sstevel } scsb_utype_t;
57*1708Sstevel 
58*1708Sstevel typedef enum {
59*1708Sstevel 	NOK =	0,
60*1708Sstevel 	OK  =	1,
61*1708Sstevel } scsb_led_t;
62*1708Sstevel 
63*1708Sstevel typedef enum {
64*1708Sstevel 	OFF =	0,
65*1708Sstevel 	ON  =	1,
66*1708Sstevel 	BLINK =	2
67*1708Sstevel } scsb_ustate_t;
68*1708Sstevel 
69*1708Sstevel typedef struct {
70*1708Sstevel 	scsb_unum_t	unit_number;
71*1708Sstevel 	scsb_utype_t	unit_type;
72*1708Sstevel 	scsb_ustate_t	unit_state;
73*1708Sstevel 	scsb_led_t	led_type;
74*1708Sstevel } scsb_uinfo_t;
75*1708Sstevel 
76*1708Sstevel #ifdef	__cplusplus
77*1708Sstevel }
78*1708Sstevel #endif
79*1708Sstevel 
80*1708Sstevel #endif	/* _SYS_SCSB_LED_H */
81