xref: /titanic_44/usr/src/uts/common/sys/lom_io.h (revision 7c478bd95313f5f23a4c958a745db2134aa03244)
1*7c478bd9Sstevel@tonic-gate /*
2*7c478bd9Sstevel@tonic-gate  * CDDL HEADER START
3*7c478bd9Sstevel@tonic-gate  *
4*7c478bd9Sstevel@tonic-gate  * The contents of this file are subject to the terms of the
5*7c478bd9Sstevel@tonic-gate  * Common Development and Distribution License, Version 1.0 only
6*7c478bd9Sstevel@tonic-gate  * (the "License").  You may not use this file except in compliance
7*7c478bd9Sstevel@tonic-gate  * with the License.
8*7c478bd9Sstevel@tonic-gate  *
9*7c478bd9Sstevel@tonic-gate  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10*7c478bd9Sstevel@tonic-gate  * or http://www.opensolaris.org/os/licensing.
11*7c478bd9Sstevel@tonic-gate  * See the License for the specific language governing permissions
12*7c478bd9Sstevel@tonic-gate  * and limitations under the License.
13*7c478bd9Sstevel@tonic-gate  *
14*7c478bd9Sstevel@tonic-gate  * When distributing Covered Code, include this CDDL HEADER in each
15*7c478bd9Sstevel@tonic-gate  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16*7c478bd9Sstevel@tonic-gate  * If applicable, add the following below this CDDL HEADER, with the
17*7c478bd9Sstevel@tonic-gate  * fields enclosed by brackets "[]" replaced with your own identifying
18*7c478bd9Sstevel@tonic-gate  * information: Portions Copyright [yyyy] [name of copyright owner]
19*7c478bd9Sstevel@tonic-gate  *
20*7c478bd9Sstevel@tonic-gate  * CDDL HEADER END
21*7c478bd9Sstevel@tonic-gate  */
22*7c478bd9Sstevel@tonic-gate /*
23*7c478bd9Sstevel@tonic-gate  * Copyright 1999-2002 Sun Microsystems, Inc.  All rights reserved.
24*7c478bd9Sstevel@tonic-gate  * Use is subject to license terms.
25*7c478bd9Sstevel@tonic-gate  */
26*7c478bd9Sstevel@tonic-gate 
27*7c478bd9Sstevel@tonic-gate #ifndef	_SYS_LOM_IO_H
28*7c478bd9Sstevel@tonic-gate #define	_SYS_LOM_IO_H
29*7c478bd9Sstevel@tonic-gate 
30*7c478bd9Sstevel@tonic-gate #pragma ident	"%Z%%M%	%I%	%E% SMI"
31*7c478bd9Sstevel@tonic-gate 
32*7c478bd9Sstevel@tonic-gate /*
33*7c478bd9Sstevel@tonic-gate  * I/O header file for LOMlite Driver.
34*7c478bd9Sstevel@tonic-gate  */
35*7c478bd9Sstevel@tonic-gate 
36*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
37*7c478bd9Sstevel@tonic-gate extern "C" {
38*7c478bd9Sstevel@tonic-gate #endif
39*7c478bd9Sstevel@tonic-gate 
40*7c478bd9Sstevel@tonic-gate #include <sys/ioccom.h>
41*7c478bd9Sstevel@tonic-gate 
42*7c478bd9Sstevel@tonic-gate /* ioctls for the TSalarm card */
43*7c478bd9Sstevel@tonic-gate 
44*7c478bd9Sstevel@tonic-gate /*
45*7c478bd9Sstevel@tonic-gate  * commands to access the alarm monitor node
46*7c478bd9Sstevel@tonic-gate  */
47*7c478bd9Sstevel@tonic-gate 
48*7c478bd9Sstevel@tonic-gate #define	TSIOCNBMON	_IOR('a', 1, int)
49*7c478bd9Sstevel@tonic-gate #define	TSIOCWTMON	_IOWR('a', 2, int)
50*7c478bd9Sstevel@tonic-gate #define	TSIOCGETMASK	_IOR('a', 3, int)
51*7c478bd9Sstevel@tonic-gate 
52*7c478bd9Sstevel@tonic-gate /*
53*7c478bd9Sstevel@tonic-gate  * commands to manipulate the control node
54*7c478bd9Sstevel@tonic-gate  */
55*7c478bd9Sstevel@tonic-gate 
56*7c478bd9Sstevel@tonic-gate #define	TSIOCALCTL	_IOW('a', 4, ts_aldata_t)
57*7c478bd9Sstevel@tonic-gate #define	TSIOCALSTATE	_IOWR('a', 5, ts_aldata_t)
58*7c478bd9Sstevel@tonic-gate #define	TSIOCDOGSTATE	_IOR('a', 6, ts_dogstate_t)
59*7c478bd9Sstevel@tonic-gate #define	TSIOCDOGCTL	_IOW('a', 7, ts_dogctl_t)
60*7c478bd9Sstevel@tonic-gate #define	TSIOCDOGTIME	_IOW('a', 8, uint_t)
61*7c478bd9Sstevel@tonic-gate #define	TSIOCDOGPAT	_IO('a', 9)
62*7c478bd9Sstevel@tonic-gate #define	TSIOCUNLOCK	_IO('a', 10)
63*7c478bd9Sstevel@tonic-gate 
64*7c478bd9Sstevel@tonic-gate /*
65*7c478bd9Sstevel@tonic-gate  * Defines for the number of the three alarms
66*7c478bd9Sstevel@tonic-gate  */
67*7c478bd9Sstevel@tonic-gate 
68*7c478bd9Sstevel@tonic-gate #define	ALARM_NUM_1	1
69*7c478bd9Sstevel@tonic-gate #define	ALARM_NUM_2	2
70*7c478bd9Sstevel@tonic-gate #define	ALARM_NUM_3	3
71*7c478bd9Sstevel@tonic-gate 
72*7c478bd9Sstevel@tonic-gate /*
73*7c478bd9Sstevel@tonic-gate  * command to tell the driver to output debug information. This information
74*7c478bd9Sstevel@tonic-gate  * includes :
75*7c478bd9Sstevel@tonic-gate  * - the hardware monitor port (R/O)
76*7c478bd9Sstevel@tonic-gate  * - in-core monitor status byte
77*7c478bd9Sstevel@tonic-gate  * - the in-core control port
78*7c478bd9Sstevel@tonic-gate  * - the watchdog timeout setting
79*7c478bd9Sstevel@tonic-gate  */
80*7c478bd9Sstevel@tonic-gate #define	TSIOCDUMP	_IO('a', 11)
81*7c478bd9Sstevel@tonic-gate #define	TSIOCDBCTL	_IOW('a', 12, ts_dbctl_t)
82*7c478bd9Sstevel@tonic-gate 
83*7c478bd9Sstevel@tonic-gate /*
84*7c478bd9Sstevel@tonic-gate  * typedefs used in alarm ioctl definitions
85*7c478bd9Sstevel@tonic-gate  */
86*7c478bd9Sstevel@tonic-gate 
87*7c478bd9Sstevel@tonic-gate typedef
88*7c478bd9Sstevel@tonic-gate struct {
89*7c478bd9Sstevel@tonic-gate 	int alarm_no;
90*7c478bd9Sstevel@tonic-gate 	int alarm_state;
91*7c478bd9Sstevel@tonic-gate } ts_aldata_t;
92*7c478bd9Sstevel@tonic-gate 
93*7c478bd9Sstevel@tonic-gate typedef
94*7c478bd9Sstevel@tonic-gate struct {
95*7c478bd9Sstevel@tonic-gate 	int reset_enable;
96*7c478bd9Sstevel@tonic-gate 	int dog_enable;
97*7c478bd9Sstevel@tonic-gate } ts_dogctl_t;
98*7c478bd9Sstevel@tonic-gate 
99*7c478bd9Sstevel@tonic-gate typedef
100*7c478bd9Sstevel@tonic-gate struct {
101*7c478bd9Sstevel@tonic-gate 	int reset_enable;
102*7c478bd9Sstevel@tonic-gate 	int dog_enable;
103*7c478bd9Sstevel@tonic-gate 	uint_t dog_timeout;
104*7c478bd9Sstevel@tonic-gate } ts_dogstate_t;
105*7c478bd9Sstevel@tonic-gate 
106*7c478bd9Sstevel@tonic-gate 
107*7c478bd9Sstevel@tonic-gate typedef
108*7c478bd9Sstevel@tonic-gate struct {
109*7c478bd9Sstevel@tonic-gate 	int db_timing;
110*7c478bd9Sstevel@tonic-gate 	int db_debug;
111*7c478bd9Sstevel@tonic-gate } ts_dbctl_t;
112*7c478bd9Sstevel@tonic-gate 
113*7c478bd9Sstevel@tonic-gate #define	MAX_PSUS	3
114*7c478bd9Sstevel@tonic-gate #define	MAX_FANS	4
115*7c478bd9Sstevel@tonic-gate #define	NUM_EVENTS	10
116*7c478bd9Sstevel@tonic-gate #define	NUM_ALARMS	3
117*7c478bd9Sstevel@tonic-gate 
118*7c478bd9Sstevel@tonic-gate /*
119*7c478bd9Sstevel@tonic-gate  * Defines for the lom_ctl_t events/fault led flag.
120*7c478bd9Sstevel@tonic-gate  */
121*7c478bd9Sstevel@tonic-gate 
122*7c478bd9Sstevel@tonic-gate #define	OFF	1
123*7c478bd9Sstevel@tonic-gate #define	ON	2
124*7c478bd9Sstevel@tonic-gate 
125*7c478bd9Sstevel@tonic-gate /*
126*7c478bd9Sstevel@tonic-gate  * Defines for a3mode.
127*7c478bd9Sstevel@tonic-gate  */
128*7c478bd9Sstevel@tonic-gate 
129*7c478bd9Sstevel@tonic-gate #define	WATCHDOG	0x02
130*7c478bd9Sstevel@tonic-gate #define	USER		0x01
131*7c478bd9Sstevel@tonic-gate 
132*7c478bd9Sstevel@tonic-gate /*
133*7c478bd9Sstevel@tonic-gate  * Defines for PSUSTATE
134*7c478bd9Sstevel@tonic-gate  */
135*7c478bd9Sstevel@tonic-gate #define	LOM_PSU_NOACCESS	0x20
136*7c478bd9Sstevel@tonic-gate 
137*7c478bd9Sstevel@tonic-gate /* ioctls for the LOMlite card */
138*7c478bd9Sstevel@tonic-gate 
139*7c478bd9Sstevel@tonic-gate /*
140*7c478bd9Sstevel@tonic-gate  * old commands to access the monitor node
141*7c478bd9Sstevel@tonic-gate  */
142*7c478bd9Sstevel@tonic-gate 
143*7c478bd9Sstevel@tonic-gate #define	LOMIOCNBMON	TSIOCNBMON
144*7c478bd9Sstevel@tonic-gate #define	LOMIOCWTMON	TSIOCWTMON
145*7c478bd9Sstevel@tonic-gate #define	LOMIOCGETMASK	TSIOCGETMASK
146*7c478bd9Sstevel@tonic-gate 
147*7c478bd9Sstevel@tonic-gate /*
148*7c478bd9Sstevel@tonic-gate  * old commands to manipulate the control node
149*7c478bd9Sstevel@tonic-gate  */
150*7c478bd9Sstevel@tonic-gate 
151*7c478bd9Sstevel@tonic-gate #define	LOMIOCALCTL	TSIOCALCTL
152*7c478bd9Sstevel@tonic-gate #define	LOMIOCALSTATE	TSIOCALSTATE
153*7c478bd9Sstevel@tonic-gate #define	LOMIOCDOGSTATE	TSIOCDOGSTATE
154*7c478bd9Sstevel@tonic-gate #define	LOMIOCDOGCTL	TSIOCDOGCTL
155*7c478bd9Sstevel@tonic-gate #define	LOMIOCDOGTIME	TSIOCDOGTIME
156*7c478bd9Sstevel@tonic-gate #define	LOMIOCDOGPAT	TSIOCDOGPAT
157*7c478bd9Sstevel@tonic-gate #define	LOMIOCUNLOCK	TSIOCUNLOCK
158*7c478bd9Sstevel@tonic-gate 
159*7c478bd9Sstevel@tonic-gate /*
160*7c478bd9Sstevel@tonic-gate  * new commands to access the monitor node
161*7c478bd9Sstevel@tonic-gate  */
162*7c478bd9Sstevel@tonic-gate 
163*7c478bd9Sstevel@tonic-gate #define	LOMIOCPSUSTATE	_IOR('a', 21, lom_psudata_t)
164*7c478bd9Sstevel@tonic-gate #define	LOMIOCEVENTLOG	_IOR('a', 22, lom_eventlog_t)
165*7c478bd9Sstevel@tonic-gate #define	LOMIOCFANSTATE	_IOR('a', 23, lom_fandata_t)
166*7c478bd9Sstevel@tonic-gate #define	LOMIOCFLEDSTATE _IOR('a', 24, lom_fled_info_t)
167*7c478bd9Sstevel@tonic-gate #define	LOMIOCINFO	_IOR('a', 25, lom_info_t)
168*7c478bd9Sstevel@tonic-gate 
169*7c478bd9Sstevel@tonic-gate /*
170*7c478bd9Sstevel@tonic-gate  * new commands to manipulate the control node
171*7c478bd9Sstevel@tonic-gate  */
172*7c478bd9Sstevel@tonic-gate 
173*7c478bd9Sstevel@tonic-gate #define	LOMIOCCLEARLOG	_IO('a', 26)
174*7c478bd9Sstevel@tonic-gate #define	LOMIOCCTL	_IOW('a', 27, lom_ctl_t)
175*7c478bd9Sstevel@tonic-gate #define	LOMIOCPROG	_IOWR('a', 28, lom_prog_t)
176*7c478bd9Sstevel@tonic-gate #define	LOMIOCDAEMON	_IOWR('a', 29, int)
177*7c478bd9Sstevel@tonic-gate #define	LOMIOCDMON	_IOWR('a', 30, int)
178*7c478bd9Sstevel@tonic-gate 
179*7c478bd9Sstevel@tonic-gate /*
180*7c478bd9Sstevel@tonic-gate  * Command to read general purpose LOMlite inputs.
181*7c478bd9Sstevel@tonic-gate  * There are only 3 bits to general purpose inputs.
182*7c478bd9Sstevel@tonic-gate  */
183*7c478bd9Sstevel@tonic-gate 
184*7c478bd9Sstevel@tonic-gate #define	LOMIOCGPINPUTS	_IOWR('a', 31, int)
185*7c478bd9Sstevel@tonic-gate 
186*7c478bd9Sstevel@tonic-gate /*
187*7c478bd9Sstevel@tonic-gate  * Manufacture programming command.
188*7c478bd9Sstevel@tonic-gate  */
189*7c478bd9Sstevel@tonic-gate 
190*7c478bd9Sstevel@tonic-gate #define	LOMIOCMPROG	_IOW('a', 32, lom_mprog_t)
191*7c478bd9Sstevel@tonic-gate #define	LOMIOCMREAD	_IOR('a', 33, lom_mprog_t)
192*7c478bd9Sstevel@tonic-gate 
193*7c478bd9Sstevel@tonic-gate #define	LOMIOCLEDSTATE 	_IOR('a', 34, lom_led_state_t)
194*7c478bd9Sstevel@tonic-gate 
195*7c478bd9Sstevel@tonic-gate /*
196*7c478bd9Sstevel@tonic-gate  * command to tell the driver to output debug information. This information
197*7c478bd9Sstevel@tonic-gate  * includes :
198*7c478bd9Sstevel@tonic-gate  * - the hardware monitor port (R/O)
199*7c478bd9Sstevel@tonic-gate  * - in-core monitor status byte
200*7c478bd9Sstevel@tonic-gate  * - the in-core control port
201*7c478bd9Sstevel@tonic-gate  * - the watchdog timeout setting
202*7c478bd9Sstevel@tonic-gate  */
203*7c478bd9Sstevel@tonic-gate #define	LOMIOCDUMP	TSIOCDUMP
204*7c478bd9Sstevel@tonic-gate #define	LOMIOCDBCTL	TSIOCDBCTL
205*7c478bd9Sstevel@tonic-gate 
206*7c478bd9Sstevel@tonic-gate /*
207*7c478bd9Sstevel@tonic-gate  * typedefs used in LOMlite ioctl definitions
208*7c478bd9Sstevel@tonic-gate  */
209*7c478bd9Sstevel@tonic-gate 
210*7c478bd9Sstevel@tonic-gate typedef
211*7c478bd9Sstevel@tonic-gate struct {
212*7c478bd9Sstevel@tonic-gate 	int alarm_no;
213*7c478bd9Sstevel@tonic-gate 	int state;
214*7c478bd9Sstevel@tonic-gate } lom_aldata_t;
215*7c478bd9Sstevel@tonic-gate 
216*7c478bd9Sstevel@tonic-gate typedef
217*7c478bd9Sstevel@tonic-gate struct {
218*7c478bd9Sstevel@tonic-gate 	int reset_enable;
219*7c478bd9Sstevel@tonic-gate 	int dog_enable;
220*7c478bd9Sstevel@tonic-gate } lom_dogctl_t;
221*7c478bd9Sstevel@tonic-gate 
222*7c478bd9Sstevel@tonic-gate typedef
223*7c478bd9Sstevel@tonic-gate struct {
224*7c478bd9Sstevel@tonic-gate 	int reset_enable;
225*7c478bd9Sstevel@tonic-gate 	int dog_enable;
226*7c478bd9Sstevel@tonic-gate 	uint_t dog_timeout;
227*7c478bd9Sstevel@tonic-gate } lom_dogstate_t;
228*7c478bd9Sstevel@tonic-gate 
229*7c478bd9Sstevel@tonic-gate 
230*7c478bd9Sstevel@tonic-gate typedef
231*7c478bd9Sstevel@tonic-gate struct {
232*7c478bd9Sstevel@tonic-gate 	int db_timing;
233*7c478bd9Sstevel@tonic-gate 	int db_debug;
234*7c478bd9Sstevel@tonic-gate } lom_dbctl_t;
235*7c478bd9Sstevel@tonic-gate 
236*7c478bd9Sstevel@tonic-gate 
237*7c478bd9Sstevel@tonic-gate typedef
238*7c478bd9Sstevel@tonic-gate struct {
239*7c478bd9Sstevel@tonic-gate 	int fitted[MAX_PSUS];
240*7c478bd9Sstevel@tonic-gate 	int output[MAX_PSUS];
241*7c478bd9Sstevel@tonic-gate 	int supplya[MAX_PSUS];
242*7c478bd9Sstevel@tonic-gate 	int supplyb[MAX_PSUS];
243*7c478bd9Sstevel@tonic-gate 	int standby[MAX_PSUS];
244*7c478bd9Sstevel@tonic-gate } lom_psudata_t;
245*7c478bd9Sstevel@tonic-gate 
246*7c478bd9Sstevel@tonic-gate typedef
247*7c478bd9Sstevel@tonic-gate struct {
248*7c478bd9Sstevel@tonic-gate 	int fitted[MAX_FANS];
249*7c478bd9Sstevel@tonic-gate 	int speed[MAX_FANS];
250*7c478bd9Sstevel@tonic-gate 	int minspeed[MAX_FANS];
251*7c478bd9Sstevel@tonic-gate } lom_fandata_t;
252*7c478bd9Sstevel@tonic-gate 
253*7c478bd9Sstevel@tonic-gate typedef
254*7c478bd9Sstevel@tonic-gate struct {
255*7c478bd9Sstevel@tonic-gate 	int events[NUM_EVENTS];
256*7c478bd9Sstevel@tonic-gate 	int fatalevent;
257*7c478bd9Sstevel@tonic-gate } lom_eventlog_t;
258*7c478bd9Sstevel@tonic-gate 
259*7c478bd9Sstevel@tonic-gate /*
260*7c478bd9Sstevel@tonic-gate  * The event codes as used in lom_eventlog_t are coded as described here:
261*7c478bd9Sstevel@tonic-gate  *
262*7c478bd9Sstevel@tonic-gate  * Event codes encode, in a single byte, the source and type
263*7c478bd9Sstevel@tonic-gate  * of event/failure in the system.
264*7c478bd9Sstevel@tonic-gate  *
265*7c478bd9Sstevel@tonic-gate  * There are two types of failure - fan and PSU.
266*7c478bd9Sstevel@tonic-gate  *
267*7c478bd9Sstevel@tonic-gate  * Other events need to be stored but do not constitue faults.
268*7c478bd9Sstevel@tonic-gate  */
269*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_NONE		0x00	/* No fault */
270*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_LOST		0x01	/* Event lost due to buffer overflow */
271*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_RESET		0x02	/* Reset is asserted by the LOM */
272*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_PWR_ON	0x03	/* Power is turned on by the LOM */
273*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_PWR_OFF	0x04	/* Power is turned off by the LOM */
274*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_WDOG_ON	0x05	/* Host watchdog enabled */
275*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_WDOG_OFF	0x06	/* Host watchdog disabled */
276*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_WDOG_TRIG	0x07	/* Host watchdog triggered */
277*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_LOM_RESET	0x08	/* LOMlite has been reset */
278*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_CHECKSUM	0x09	/* ROM checksum failure */
279*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_BUSY		0x0a	/* Event not ready yet (being read) */
280*7c478bd9Sstevel@tonic-gate 
281*7c478bd9Sstevel@tonic-gate /*
282*7c478bd9Sstevel@tonic-gate  * Fault LED events
283*7c478bd9Sstevel@tonic-gate  */
284*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FAULT		0x20	/* Fault events - codes 0x20-0x2f */
285*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FAULT_MASK	0xf0	/* Fault events - codes 0x20-0x2f */
286*7c478bd9Sstevel@tonic-gate 
287*7c478bd9Sstevel@tonic-gate /*
288*7c478bd9Sstevel@tonic-gate  * Fault LED events are encoded thus
289*7c478bd9Sstevel@tonic-gate  *
290*7c478bd9Sstevel@tonic-gate  *  7	 4 3		       0
291*7c478bd9Sstevel@tonic-gate  *  ----------------------------
292*7c478bd9Sstevel@tonic-gate  * | 0010 | Fault LED frequency |
293*7c478bd9Sstevel@tonic-gate  *  ----------------------------
294*7c478bd9Sstevel@tonic-gate  *
295*7c478bd9Sstevel@tonic-gate  * The "Fault LED frequency" is a 4 bit code allowing for LED
296*7c478bd9Sstevel@tonic-gate  * falshing rates of 0 to 14 Hz with a rate of 15 signifying off.
297*7c478bd9Sstevel@tonic-gate  *
298*7c478bd9Sstevel@tonic-gate  * For example the event code for the assertion of a fault LED rate of 2Hz is:
299*7c478bd9Sstevel@tonic-gate  *    LOM_EVENT_FAULT_ENCODE(2);
300*7c478bd9Sstevel@tonic-gate  */
301*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FAULT_ENCODE(faultRate) \
302*7c478bd9Sstevel@tonic-gate 	(LOM_EVENT_FAULT | ((faultRate)&0xf))
303*7c478bd9Sstevel@tonic-gate 
304*7c478bd9Sstevel@tonic-gate /*
305*7c478bd9Sstevel@tonic-gate  * Alarm events
306*7c478bd9Sstevel@tonic-gate  */
307*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_ALARM		0x30	/* Alarm events - codes 0x30-0x3f */
308*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_ALARM_MASK	0xf0	/* Alarm events - codes 0x30-0x3f */
309*7c478bd9Sstevel@tonic-gate 
310*7c478bd9Sstevel@tonic-gate /*
311*7c478bd9Sstevel@tonic-gate  * Alarm events are encoded thus
312*7c478bd9Sstevel@tonic-gate  *
313*7c478bd9Sstevel@tonic-gate  *  7	 4 3		1    0
314*7c478bd9Sstevel@tonic-gate  *  --------------------------
315*7c478bd9Sstevel@tonic-gate  * | 0011 | Alarm number | On |
316*7c478bd9Sstevel@tonic-gate  *  --------------------------
317*7c478bd9Sstevel@tonic-gate  *
318*7c478bd9Sstevel@tonic-gate  * The "Alarm number" is a 3 bit code allowing for up to 8 alarms
319*7c478bd9Sstevel@tonic-gate  *
320*7c478bd9Sstevel@tonic-gate  * For example the event code for the assertion of alarm 2 is:
321*7c478bd9Sstevel@tonic-gate  *    LOM_EVENT_ALARM_ENCODE(2, 1);
322*7c478bd9Sstevel@tonic-gate  */
323*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_ALARM_ENCODE(alarmNum, alarmOn) \
324*7c478bd9Sstevel@tonic-gate 	(LOM_EVENT_ALARM | (alarmNum<<1) | ((alarmOn)&0x1))
325*7c478bd9Sstevel@tonic-gate 
326*7c478bd9Sstevel@tonic-gate /*
327*7c478bd9Sstevel@tonic-gate  * These alarms are considered fatal errors
328*7c478bd9Sstevel@tonic-gate  */
329*7c478bd9Sstevel@tonic-gate 
330*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FAN		0x40	/* Fan failure - codes 0x40-0x7f */
331*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FAN_MASK	0xc0	/* Fan failure - codes 0x40-0x7f */
332*7c478bd9Sstevel@tonic-gate 
333*7c478bd9Sstevel@tonic-gate /*
334*7c478bd9Sstevel@tonic-gate  * Fan events are encoded thus
335*7c478bd9Sstevel@tonic-gate  *
336*7c478bd9Sstevel@tonic-gate  *  7  6 5	    3 2	     0
337*7c478bd9Sstevel@tonic-gate  *  --------------------------
338*7c478bd9Sstevel@tonic-gate  * | 01 | Fan number | Status |
339*7c478bd9Sstevel@tonic-gate  *  --------------------------
340*7c478bd9Sstevel@tonic-gate  *
341*7c478bd9Sstevel@tonic-gate  * The "Fan number" is a 3 bit code allowing for up to 8 fans
342*7c478bd9Sstevel@tonic-gate  *
343*7c478bd9Sstevel@tonic-gate  * As yet there are no defined fan statuses.
344*7c478bd9Sstevel@tonic-gate  *
345*7c478bd9Sstevel@tonic-gate  * For example the event code for a failure on fan 3 is:
346*7c478bd9Sstevel@tonic-gate  *    LOM_EVENT_FAN_ENCODE(3, 0);
347*7c478bd9Sstevel@tonic-gate  */
348*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FAN_ENCODE(fanNum, fanStatus) \
349*7c478bd9Sstevel@tonic-gate 	(LOM_EVENT_FAN | (fanNum<<3) | ((fanStatus)&0x7))
350*7c478bd9Sstevel@tonic-gate 
351*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_PSU		0x80	/* PSU failure - codes 0x80-0xbf */
352*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_PSU_MASK	0xc0	/* PSU failure - codes 0x80-0xbf */
353*7c478bd9Sstevel@tonic-gate 
354*7c478bd9Sstevel@tonic-gate /*
355*7c478bd9Sstevel@tonic-gate  * These definitions will be picked up elsewhere in embedded code
356*7c478bd9Sstevel@tonic-gate  */
357*7c478bd9Sstevel@tonic-gate #ifndef LOM_PSU_PRESENT
358*7c478bd9Sstevel@tonic-gate /*
359*7c478bd9Sstevel@tonic-gate  * PSU status flags
360*7c478bd9Sstevel@tonic-gate  */
361*7c478bd9Sstevel@tonic-gate #define	LOM_PSU_PRESENT		0x08
362*7c478bd9Sstevel@tonic-gate #define	LOM_PSU_INPUT_A_OK	0x01
363*7c478bd9Sstevel@tonic-gate #define	LOM_PSU_INPUT_B_OK	0x02
364*7c478bd9Sstevel@tonic-gate #define	LOM_PSU_OUTPUT_OK	0x04
365*7c478bd9Sstevel@tonic-gate #define	LOM_PSU_STATUS_MASK	(LOM_PSU_INPUT_A_OK | LOM_PSU_INPUT_B_OK | \
366*7c478bd9Sstevel@tonic-gate 				LOM_PSU_OUTPUT_OK)
367*7c478bd9Sstevel@tonic-gate #endif
368*7c478bd9Sstevel@tonic-gate 
369*7c478bd9Sstevel@tonic-gate /*
370*7c478bd9Sstevel@tonic-gate  * PSU events are encoded thus
371*7c478bd9Sstevel@tonic-gate  *
372*7c478bd9Sstevel@tonic-gate  *  7  6 5	    3		    2		     1		      0
373*7c478bd9Sstevel@tonic-gate  *  -------------------------------------------------------------------
374*7c478bd9Sstevel@tonic-gate  * | 10 | PSU number | Output Status | Input B Status | Input A Status |
375*7c478bd9Sstevel@tonic-gate  *  -------------------------------------------------------------------
376*7c478bd9Sstevel@tonic-gate  *
377*7c478bd9Sstevel@tonic-gate  * The PSU number is a 3 bit code allowing for up to 8 PSUs
378*7c478bd9Sstevel@tonic-gate  *
379*7c478bd9Sstevel@tonic-gate  * The PSU status is derived from the LOM_PSU... definitions.
380*7c478bd9Sstevel@tonic-gate  *
381*7c478bd9Sstevel@tonic-gate  * For example the event code for an "Input B" failure on PSU 2 is:
382*7c478bd9Sstevel@tonic-gate  *    LOM_EVENT_PSU_ENCODE(2, LOM_PSU_INPUT_A_OK | LOM_PSU_OUTPUT_OK);
383*7c478bd9Sstevel@tonic-gate  */
384*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_PSU_ENCODE(psuNum, psuStatus) \
385*7c478bd9Sstevel@tonic-gate 	(LOM_EVENT_PSU | (psuNum<<3) | ((psuStatus)&0x7))
386*7c478bd9Sstevel@tonic-gate 
387*7c478bd9Sstevel@tonic-gate #define	MAX_LOM2_NAME_STR	16
388*7c478bd9Sstevel@tonic-gate 
389*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_OFF		0x00
390*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_ON_STEADY		0x01
391*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_ON_FLASHING	0x02
392*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_ON_SLOWFLASH	0x03
393*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_INACCESSIBLE	0xfd
394*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_STANDBY		0xfe
395*7c478bd9Sstevel@tonic-gate #define	LOM_LED_STATE_NOT_PRESENT	0xff
396*7c478bd9Sstevel@tonic-gate 
397*7c478bd9Sstevel@tonic-gate enum states {
398*7c478bd9Sstevel@tonic-gate 	LOM_LED_OUTOFRANGE = -3,
399*7c478bd9Sstevel@tonic-gate 	LOM_LED_NOT_IMPLEMENTED,
400*7c478bd9Sstevel@tonic-gate 	LOM_LED_ACCESS_ERROR,
401*7c478bd9Sstevel@tonic-gate 	LOM_LED_OFF,
402*7c478bd9Sstevel@tonic-gate 	LOM_LED_ON,
403*7c478bd9Sstevel@tonic-gate 	LOM_LED_BLINKING
404*7c478bd9Sstevel@tonic-gate };
405*7c478bd9Sstevel@tonic-gate 
406*7c478bd9Sstevel@tonic-gate enum colours {
407*7c478bd9Sstevel@tonic-gate 	LOM_LED_COLOUR_NONE = -1,
408*7c478bd9Sstevel@tonic-gate 	LOM_LED_COLOUR_ANY,
409*7c478bd9Sstevel@tonic-gate 	LOM_LED_COLOUR_WHITE,
410*7c478bd9Sstevel@tonic-gate 	LOM_LED_COLOUR_BLUE,
411*7c478bd9Sstevel@tonic-gate 	LOM_LED_COLOUR_GREEN,
412*7c478bd9Sstevel@tonic-gate 	LOM_LED_COLOUR_AMBER
413*7c478bd9Sstevel@tonic-gate };
414*7c478bd9Sstevel@tonic-gate 
415*7c478bd9Sstevel@tonic-gate 
416*7c478bd9Sstevel@tonic-gate typedef
417*7c478bd9Sstevel@tonic-gate struct {
418*7c478bd9Sstevel@tonic-gate 	int on;
419*7c478bd9Sstevel@tonic-gate } lom_fled_info_t;
420*7c478bd9Sstevel@tonic-gate 
421*7c478bd9Sstevel@tonic-gate typedef
422*7c478bd9Sstevel@tonic-gate struct {
423*7c478bd9Sstevel@tonic-gate 	int16_t index;
424*7c478bd9Sstevel@tonic-gate 	int8_t state;
425*7c478bd9Sstevel@tonic-gate 	int8_t colour;
426*7c478bd9Sstevel@tonic-gate 	char label[MAX_LOM2_NAME_STR];
427*7c478bd9Sstevel@tonic-gate } lom_led_state_t;
428*7c478bd9Sstevel@tonic-gate 
429*7c478bd9Sstevel@tonic-gate typedef
430*7c478bd9Sstevel@tonic-gate struct {
431*7c478bd9Sstevel@tonic-gate 	char ser_char;
432*7c478bd9Sstevel@tonic-gate 	int a3mode;
433*7c478bd9Sstevel@tonic-gate 	int fver;
434*7c478bd9Sstevel@tonic-gate 	int fchksum;
435*7c478bd9Sstevel@tonic-gate 	int prod_rev;
436*7c478bd9Sstevel@tonic-gate 	char prod_id[12];
437*7c478bd9Sstevel@tonic-gate 	int events;
438*7c478bd9Sstevel@tonic-gate } lom_info_t;
439*7c478bd9Sstevel@tonic-gate 
440*7c478bd9Sstevel@tonic-gate typedef
441*7c478bd9Sstevel@tonic-gate struct {
442*7c478bd9Sstevel@tonic-gate 	char ser_char;
443*7c478bd9Sstevel@tonic-gate 	int a3mode;
444*7c478bd9Sstevel@tonic-gate 	int fault_led;
445*7c478bd9Sstevel@tonic-gate 	int events;
446*7c478bd9Sstevel@tonic-gate 	int check;
447*7c478bd9Sstevel@tonic-gate } lom_ctl_t;
448*7c478bd9Sstevel@tonic-gate 
449*7c478bd9Sstevel@tonic-gate /*
450*7c478bd9Sstevel@tonic-gate  * in mprog, config is:
451*7c478bd9Sstevel@tonic-gate  *  bits 5-7 no. fans
452*7c478bd9Sstevel@tonic-gate  *  bits 3-4 no.psus
453*7c478bd9Sstevel@tonic-gate  *  bit 2 tty_con
454*7c478bd9Sstevel@tonic-gate  *  bit 1 set to stop fault LED flashing
455*7c478bd9Sstevel@tonic-gate  *  bit 0 set if DC PSUs fitted
456*7c478bd9Sstevel@tonic-gate  *
457*7c478bd9Sstevel@tonic-gate  * fanhz is hz for 100% and fanmin is min speed as %.
458*7c478bd9Sstevel@tonic-gate  */
459*7c478bd9Sstevel@tonic-gate 
460*7c478bd9Sstevel@tonic-gate typedef
461*7c478bd9Sstevel@tonic-gate struct {
462*7c478bd9Sstevel@tonic-gate 	char mod_id[12];
463*7c478bd9Sstevel@tonic-gate 	int mod_rev;
464*7c478bd9Sstevel@tonic-gate 	int config;
465*7c478bd9Sstevel@tonic-gate 	int fanhz[4];
466*7c478bd9Sstevel@tonic-gate 	int fanmin[4];
467*7c478bd9Sstevel@tonic-gate } lom_mprog_t;
468*7c478bd9Sstevel@tonic-gate 
469*7c478bd9Sstevel@tonic-gate typedef
470*7c478bd9Sstevel@tonic-gate struct {
471*7c478bd9Sstevel@tonic-gate 	int index;	    /* top bit should be set if last buffer */
472*7c478bd9Sstevel@tonic-gate 	uint8_t data[0x400];
473*7c478bd9Sstevel@tonic-gate 	int size;
474*7c478bd9Sstevel@tonic-gate } lom_prog_t;
475*7c478bd9Sstevel@tonic-gate 
476*7c478bd9Sstevel@tonic-gate /*
477*7c478bd9Sstevel@tonic-gate  * LOMlite2 specific support.
478*7c478bd9Sstevel@tonic-gate  */
479*7c478bd9Sstevel@tonic-gate 
480*7c478bd9Sstevel@tonic-gate #define	LOMIOCCTL2	_IOW('a', 40, lom_ctl2_t)
481*7c478bd9Sstevel@tonic-gate 
482*7c478bd9Sstevel@tonic-gate typedef
483*7c478bd9Sstevel@tonic-gate struct {
484*7c478bd9Sstevel@tonic-gate 	char  escape_chars[6];
485*7c478bd9Sstevel@tonic-gate 	int   serial_events;
486*7c478bd9Sstevel@tonic-gate } lom_ctl2_t;
487*7c478bd9Sstevel@tonic-gate 
488*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_NOREP	0
489*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_FATAL	1
490*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_WARN	2
491*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_INFO	3
492*7c478bd9Sstevel@tonic-gate #define	LOM_EVENT_USER	4
493*7c478bd9Sstevel@tonic-gate #define	LOM_SER_EVENTS_ON	0x100
494*7c478bd9Sstevel@tonic-gate #define	LOM_SER_EVENTS_OFF	0x200
495*7c478bd9Sstevel@tonic-gate #define	LOM_SER_EVENTS_DEF	0x300
496*7c478bd9Sstevel@tonic-gate #define	DEFAULT_NUM_EVENTS	10
497*7c478bd9Sstevel@tonic-gate 
498*7c478bd9Sstevel@tonic-gate #define	LOMIOCVOLTS	_IOR('a', 41, lom_volts_t)
499*7c478bd9Sstevel@tonic-gate #define	MAX_VOLTS	16
500*7c478bd9Sstevel@tonic-gate 
501*7c478bd9Sstevel@tonic-gate typedef
502*7c478bd9Sstevel@tonic-gate struct {
503*7c478bd9Sstevel@tonic-gate 	int   num;  /* No. of voltage lines being monitored on that system */
504*7c478bd9Sstevel@tonic-gate 	char  name[MAX_VOLTS][MAX_LOM2_NAME_STR];
505*7c478bd9Sstevel@tonic-gate 	int   status[MAX_VOLTS]; /* 0=ok 1=faulty */
506*7c478bd9Sstevel@tonic-gate 	int   shutdown_enabled[MAX_VOLTS];
507*7c478bd9Sstevel@tonic-gate } lom_volts_t;
508*7c478bd9Sstevel@tonic-gate 
509*7c478bd9Sstevel@tonic-gate /* status flags (circuit breakers) */
510*7c478bd9Sstevel@tonic-gate 
511*7c478bd9Sstevel@tonic-gate #define	LOMIOCSTATS	_IOR('a', 42, lom_sflags_t)
512*7c478bd9Sstevel@tonic-gate #define	MAX_STATS	8
513*7c478bd9Sstevel@tonic-gate 
514*7c478bd9Sstevel@tonic-gate typedef
515*7c478bd9Sstevel@tonic-gate struct {
516*7c478bd9Sstevel@tonic-gate 	int   num;  /* No. of status flags being monitored on that system */
517*7c478bd9Sstevel@tonic-gate 	char  name[MAX_STATS][MAX_LOM2_NAME_STR];
518*7c478bd9Sstevel@tonic-gate 	int   status[MAX_STATS]; /* 0=ok 1=faulty */
519*7c478bd9Sstevel@tonic-gate } lom_sflags_t;
520*7c478bd9Sstevel@tonic-gate 
521*7c478bd9Sstevel@tonic-gate #define	LOMIOCTEMP	_IOR('a', 43, lom_temp_t)
522*7c478bd9Sstevel@tonic-gate #define	MAX_TEMPS	8
523*7c478bd9Sstevel@tonic-gate 
524*7c478bd9Sstevel@tonic-gate typedef
525*7c478bd9Sstevel@tonic-gate struct {
526*7c478bd9Sstevel@tonic-gate 	int   num;  /* No. of temps being monitored on that system */
527*7c478bd9Sstevel@tonic-gate 	char  name[MAX_TEMPS][MAX_LOM2_NAME_STR];
528*7c478bd9Sstevel@tonic-gate 	int   temp[MAX_TEMPS]; /* degrees C */
529*7c478bd9Sstevel@tonic-gate 	int   warning[MAX_TEMPS]; /* degrees C - zero if not enabled */
530*7c478bd9Sstevel@tonic-gate 	int   shutdown[MAX_TEMPS]; /* degrees C - zero if not enabled */
531*7c478bd9Sstevel@tonic-gate 	int   num_ov;  /* No. of overtemp sensors being monitored */
532*7c478bd9Sstevel@tonic-gate 	char  name_ov[MAX_TEMPS][MAX_LOM2_NAME_STR];
533*7c478bd9Sstevel@tonic-gate 	int   status_ov[MAX_TEMPS]; /* 0=ok 1=faulty */
534*7c478bd9Sstevel@tonic-gate } lom_temp_t;
535*7c478bd9Sstevel@tonic-gate 
536*7c478bd9Sstevel@tonic-gate #define	LOMIOCCONS	_IOR('a', 44, lom_cbuf_t)
537*7c478bd9Sstevel@tonic-gate #define	CONS_BUF_SIZE	256
538*7c478bd9Sstevel@tonic-gate 
539*7c478bd9Sstevel@tonic-gate typedef
540*7c478bd9Sstevel@tonic-gate struct {
541*7c478bd9Sstevel@tonic-gate 	char  lrbuf[CONS_BUF_SIZE];
542*7c478bd9Sstevel@tonic-gate } lom_cbuf_t;
543*7c478bd9Sstevel@tonic-gate 
544*7c478bd9Sstevel@tonic-gate #define	LOMIOCEVENTLOG2	_IOWR('a', 45, lom_eventlog2_t)
545*7c478bd9Sstevel@tonic-gate #define	MAX_EVENTS	128
546*7c478bd9Sstevel@tonic-gate #define	MAX_EVENT_STR	80
547*7c478bd9Sstevel@tonic-gate 
548*7c478bd9Sstevel@tonic-gate /*
549*7c478bd9Sstevel@tonic-gate  * NB no need for 1st fatal as the ioctl can ask for ONLY fatal events.
550*7c478bd9Sstevel@tonic-gate  * The driver will return the whole event string, but include the code
551*7c478bd9Sstevel@tonic-gate  * and time for mgmt applications.
552*7c478bd9Sstevel@tonic-gate  */
553*7c478bd9Sstevel@tonic-gate 
554*7c478bd9Sstevel@tonic-gate typedef
555*7c478bd9Sstevel@tonic-gate struct {
556*7c478bd9Sstevel@tonic-gate 	int   num; /* no. events requested and no. returned */
557*7c478bd9Sstevel@tonic-gate 	int   level; /* level of events requested */
558*7c478bd9Sstevel@tonic-gate 	int   code[MAX_EVENTS];
559*7c478bd9Sstevel@tonic-gate 	char  string[MAX_EVENTS][MAX_EVENT_STR];
560*7c478bd9Sstevel@tonic-gate 	int   time[MAX_EVENTS];
561*7c478bd9Sstevel@tonic-gate } lom_eventlog2_t;
562*7c478bd9Sstevel@tonic-gate 
563*7c478bd9Sstevel@tonic-gate #define	LOMIOCINFO2	_IOWR('a', 46, lom2_info_t)
564*7c478bd9Sstevel@tonic-gate 
565*7c478bd9Sstevel@tonic-gate /*
566*7c478bd9Sstevel@tonic-gate  * We may not display all these properties by default, but add them all
567*7c478bd9Sstevel@tonic-gate  * into IOCTL structure to cover future enhancements.
568*7c478bd9Sstevel@tonic-gate  */
569*7c478bd9Sstevel@tonic-gate 
570*7c478bd9Sstevel@tonic-gate typedef
571*7c478bd9Sstevel@tonic-gate struct {
572*7c478bd9Sstevel@tonic-gate 	char escape_chars[6];
573*7c478bd9Sstevel@tonic-gate 	int  serial_events; /* as defined for LOMIOCCTL2 */
574*7c478bd9Sstevel@tonic-gate 	int a3mode;
575*7c478bd9Sstevel@tonic-gate 	int fver;
576*7c478bd9Sstevel@tonic-gate 	int fchksum;
577*7c478bd9Sstevel@tonic-gate 	int prod_rev;
578*7c478bd9Sstevel@tonic-gate 	char prod_id[12];
579*7c478bd9Sstevel@tonic-gate 	int serial_config; /* security, timeout, etc */
580*7c478bd9Sstevel@tonic-gate 	int baud_rate;
581*7c478bd9Sstevel@tonic-gate 	int serial_hw_config; /* stop bit, parity etc */
582*7c478bd9Sstevel@tonic-gate 	int phone_home_config; /* TRUE is enabled */
583*7c478bd9Sstevel@tonic-gate 	char phone_home_script[128];
584*7c478bd9Sstevel@tonic-gate 	char fan_names[MAX_FANS][MAX_LOM2_NAME_STR];
585*7c478bd9Sstevel@tonic-gate } lom2_info_t;
586*7c478bd9Sstevel@tonic-gate 
587*7c478bd9Sstevel@tonic-gate /* serial_config defn - bottom 8bits are serial return timeout */
588*7c478bd9Sstevel@tonic-gate #define	LOM_SER_SECURITY 0x10000
589*7c478bd9Sstevel@tonic-gate #define	LOM_SER_RETURN	 0x20000
590*7c478bd9Sstevel@tonic-gate #define	LOM_DISABLE_WDOG_BREAK 0x40000
591*7c478bd9Sstevel@tonic-gate 
592*7c478bd9Sstevel@tonic-gate /*
593*7c478bd9Sstevel@tonic-gate  * For test ioctl low byte is test number and 2nd byte is the argument supplied
594*7c478bd9Sstevel@tonic-gate  * with the test.  Usually, it indicates the number of iterations to perform.
595*7c478bd9Sstevel@tonic-gate  * The result is returned in the low byte.
596*7c478bd9Sstevel@tonic-gate  */
597*7c478bd9Sstevel@tonic-gate #define	BSCV_LED_TEST			0x06
598*7c478bd9Sstevel@tonic-gate #define	BSCV_LED_TEST_FLASH_ALL		0x01
599*7c478bd9Sstevel@tonic-gate #define	BSCV_LED_TEST_SVC_REQD		0x02
600*7c478bd9Sstevel@tonic-gate #define	BSCV_LED_TEST_DONE		0x00
601*7c478bd9Sstevel@tonic-gate #define	LOMIOCTEST	_IOWR('a', 47, uint32_t)
602*7c478bd9Sstevel@tonic-gate 
603*7c478bd9Sstevel@tonic-gate #define	LOMIOCMPROG2	_IOW('a', 48, lom2_mprog_t)
604*7c478bd9Sstevel@tonic-gate #define	LOMIOCMREAD2	_IOR('a', 49, lom2_mprog_t)
605*7c478bd9Sstevel@tonic-gate 
606*7c478bd9Sstevel@tonic-gate typedef
607*7c478bd9Sstevel@tonic-gate struct {
608*7c478bd9Sstevel@tonic-gate 	int   addr_space;
609*7c478bd9Sstevel@tonic-gate 	uint8_t	data[255];
610*7c478bd9Sstevel@tonic-gate } lom2_mprog_t;
611*7c478bd9Sstevel@tonic-gate 
612*7c478bd9Sstevel@tonic-gate #define	LOMIOCEVNT	_IOWR('a', 50, int)
613*7c478bd9Sstevel@tonic-gate 
614*7c478bd9Sstevel@tonic-gate /*
615*7c478bd9Sstevel@tonic-gate  * Due to poll being broken in S8su2 add in ioctl to sleep for arg microsecs
616*7c478bd9Sstevel@tonic-gate  */
617*7c478bd9Sstevel@tonic-gate 
618*7c478bd9Sstevel@tonic-gate #define	LOMIOCSLEEP	_IOWR('a', 51, int)
619*7c478bd9Sstevel@tonic-gate 
620*7c478bd9Sstevel@tonic-gate /*
621*7c478bd9Sstevel@tonic-gate  * IOCTL defines for lomp - LOMlite field programming driver.
622*7c478bd9Sstevel@tonic-gate  */
623*7c478bd9Sstevel@tonic-gate 
624*7c478bd9Sstevel@tonic-gate #define	LOMPIOCRESON	_IO('p', 1)
625*7c478bd9Sstevel@tonic-gate #define	LOMPIOCRESOFF	_IO('p', 2)
626*7c478bd9Sstevel@tonic-gate #define	LOMPIOCFVPPON	_IO('p', 3)
627*7c478bd9Sstevel@tonic-gate #define	LOMPIOCFVPPOFF	_IO('p', 4)
628*7c478bd9Sstevel@tonic-gate 
629*7c478bd9Sstevel@tonic-gate 
630*7c478bd9Sstevel@tonic-gate 
631*7c478bd9Sstevel@tonic-gate #ifdef __cplusplus
632*7c478bd9Sstevel@tonic-gate }
633*7c478bd9Sstevel@tonic-gate #endif
634*7c478bd9Sstevel@tonic-gate 
635*7c478bd9Sstevel@tonic-gate #endif	/* _SYS_LOM_IO_H */
636