xref: /titanic_44/usr/src/uts/sun4u/mpxu/sys/lom_io.h (revision 0cd13cbfb4270b840b4bd22ec5f673b2b6a2c02b)
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	_SYS_LOM_IO_H
28 #define	_SYS_LOM_IO_H
29 
30 #pragma ident	"%Z%%M%	%I%	%E% SMI"
31 
32 /*
33  * I/O header file for Alarm
34  */
35 
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39 
40 #include <sys/ioccom.h>
41 
42 /* ioctls for the alarm card */
43 
44 #define	TSIOCALSTATE	_IOWR('a', 1, ts_aldata_t)
45 #define	TSIOCALCTL	_IOW('a',  2, ts_aldata_t)
46 
47 /* ioctls for watchdog */
48 
49 #define	TSIOCDOGSTATE	_IOR('a', 6, ts_dogstate_t)
50 #define	TSIOCDOGCTL	_IOW('a', 7, ts_dogctl_t)
51 #define	TSIOCDOGTIME	_IOW('a', 8, uint_t)
52 #define	TSIOCDOGPAT	_IO('a', 9)
53 
54 
55 /*
56  * Defines for identifying the four alarms
57  */
58 #define	ALARM_NUM_0	0
59 #define	ALARM_NUM_1	1
60 #define	ALARM_NUM_2	2
61 #define	ALARM_NUM_3	3
62 
63 #define	ALARM_CRITICAL	ALARM_NUM_0
64 #define	ALARM_MAJOR		ALARM_NUM_1
65 #define	ALARM_MINOR		ALARM_NUM_2
66 #define	ALARM_USER		ALARM_NUM_3
67 
68 /*
69  * typedefs used in alarm ioctl definitions
70  */
71 
72 typedef
73 struct {
74 		int alarm_no;
75 		int alarm_state;
76 } ts_aldata_t;
77 
78 typedef
79 struct {
80 	int reset_enable;
81 	int dog_enable;
82 } ts_dogctl_t;
83 
84 typedef
85 struct {
86 	int reset_enable;
87 	int dog_enable;
88 	uint_t dog_timeout;
89 } ts_dogstate_t;
90 
91 /*
92  * Values for alarm_state
93  */
94 #define	ALARM_OFF	0
95 #define	ALARM_ON	1
96 
97 /*
98  * old commands to manipulate the control node
99  */
100 
101 #define	LOMIOCALCTL	TSIOCALCTL
102 #define	LOMIOCALSTATE	TSIOCALSTATE
103 
104 /*
105  * typedefs used in LOMlite ioctl definitions
106  */
107 
108 typedef
109 struct {
110 	int alarm_no;
111 	int state;
112 } lom_aldata_t;
113 
114 #define	LOMIOCDOGSTATE	TSIOCDOGSTATE
115 #define	LOMIOCDOGCTL	TSIOCDOGCTL
116 #define	LOMIOCDOGTIME	TSIOCDOGTIME
117 #define	LOMIOCDOGPAT	TSIOCDOGPAT
118 
119 typedef
120 struct {
121 	int reset_enable;
122 	int dog_enable;
123 } lom_dogctl_t;
124 
125 typedef
126 struct {
127 	int reset_enable;
128 	int dog_enable;
129 	uint_t dog_timeout;
130 } lom_dogstate_t;
131 
132 #ifdef __cplusplus
133 }
134 #endif
135 
136 #endif	/* _SYS_LOM_IO_H */
137