xref: /titanic_41/usr/src/uts/sun4u/montecarlo/sys/scsb_led.h (revision d89fccd8788afe1e920f842edd883fe192a1b8fe)
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 2000 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  */
26 
27 /*
28  * Netra ct SCB/SSB driver (scsb) support for controlling the
29  * LEDs on the System Status Board that represent the cPCI Slots.
30  * Each slot has a pair of LEDs, one green (OK) and one amber (NOK).
31  * The OK (green) LED can also be made to blink.
32  */
33 
34 #ifndef	_SYS_SCSB_LED_H
35 #define	_SYS_SCSB_LED_H
36 
37 #pragma ident	"%Z%%M%	%I%	%E% SMI"
38 
39 #ifdef	__cplusplus
40 extern "C" {
41 #endif
42 
43 #define	_SCSBIOC		('s' << 8)
44 
45 /* The ioctl command */
46 #define	ENVC_IOC_SETFSP		(_SCSBIOC | 23)
47 
48 /* Netra ct 400 has 5 slots, Netra ct 800 has 8 slots.  Including CPU */
49 #define	NCT800_MAX_SLOTS	8
50 #define	NCT400_MAX_SLOTS	5
51 
52 typedef	uint16_t	scsb_unum_t;
53 
54 typedef enum {
55 	SLOT	= 0
56 } scsb_utype_t;
57 
58 typedef enum {
59 	NOK =	0,
60 	OK  =	1,
61 } scsb_led_t;
62 
63 typedef enum {
64 	OFF =	0,
65 	ON  =	1,
66 	BLINK =	2
67 } scsb_ustate_t;
68 
69 typedef struct {
70 	scsb_unum_t	unit_number;
71 	scsb_utype_t	unit_type;
72 	scsb_ustate_t	unit_state;
73 	scsb_led_t	led_type;
74 } scsb_uinfo_t;
75 
76 #ifdef	__cplusplus
77 }
78 #endif
79 
80 #endif	/* _SYS_SCSB_LED_H */
81