xref: /netbsd-src/sys/arch/sparc/include/openpromio.h (revision 25d3b9e7cbaca1403601fd183d24e28ebfab52f1)
1*25d3b9e7Sdholland /*	$NetBSD: openpromio.h,v 1.7 2015/09/07 03:49:46 dholland Exp $ */
2274a9076Sderaadt 
34588caefSderaadt /*
44588caefSderaadt  * Copyright (c) 1992, 1993
54588caefSderaadt  *	The Regents of the University of California.  All rights reserved.
64588caefSderaadt  *
74588caefSderaadt  * This software was developed by the Computer Systems Engineering group
84588caefSderaadt  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
94588caefSderaadt  * contributed to Berkeley.
104588caefSderaadt  *
114588caefSderaadt  * All advertising materials mentioning features or use of this software
124588caefSderaadt  * must display the following acknowledgement:
134588caefSderaadt  *	This product includes software developed by the University of
144588caefSderaadt  *	California, Lawrence Berkeley Laboratory.
154588caefSderaadt  *
164588caefSderaadt  * Redistribution and use in source and binary forms, with or without
174588caefSderaadt  * modification, are permitted provided that the following conditions
184588caefSderaadt  * are met:
194588caefSderaadt  * 1. Redistributions of source code must retain the above copyright
204588caefSderaadt  *    notice, this list of conditions and the following disclaimer.
214588caefSderaadt  * 2. Redistributions in binary form must reproduce the above copyright
224588caefSderaadt  *    notice, this list of conditions and the following disclaimer in the
234588caefSderaadt  *    documentation and/or other materials provided with the distribution.
24aad01611Sagc  * 3. Neither the name of the University nor the names of its contributors
254588caefSderaadt  *    may be used to endorse or promote products derived from this software
264588caefSderaadt  *    without specific prior written permission.
274588caefSderaadt  *
284588caefSderaadt  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
294588caefSderaadt  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
304588caefSderaadt  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
314588caefSderaadt  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
324588caefSderaadt  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
334588caefSderaadt  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
344588caefSderaadt  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
354588caefSderaadt  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
364588caefSderaadt  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
374588caefSderaadt  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
384588caefSderaadt  * SUCH DAMAGE.
394588caefSderaadt  *
404588caefSderaadt  *	@(#)openpromio.h	8.1 (Berkeley) 6/11/93
414588caefSderaadt  */
424588caefSderaadt 
4382161a9cShannken #ifndef _SPARC_OPENPROMIO_H_
4482161a9cShannken #define _SPARC_OPENPROMIO_H_
4582161a9cShannken 
46*25d3b9e7Sdholland #include <sys/ioccom.h>
47*25d3b9e7Sdholland 
484588caefSderaadt struct opiocdesc {
494588caefSderaadt 	int	op_nodeid;		/* passed or returned node id */
504588caefSderaadt 	int	op_namelen;		/* length of op_name */
514588caefSderaadt 	char	*op_name;		/* pointer to field name */
524588caefSderaadt 	int	op_buflen;		/* length of op_buf (value-result) */
534588caefSderaadt 	char	*op_buf;		/* pointer to field value */
544588caefSderaadt };
554588caefSderaadt 
564588caefSderaadt #define	OPIOCGET	_IOWR('O', 1, struct opiocdesc) /* get openprom field */
574588caefSderaadt #define	OPIOCSET	_IOW('O', 2, struct opiocdesc) /* set openprom field */
584588caefSderaadt #define	OPIOCNEXTPROP	_IOWR('O', 3, struct opiocdesc) /* get next property */
594588caefSderaadt #define	OPIOCGETOPTNODE	_IOR('O', 4, int)	/* get openprom field */
604588caefSderaadt #define	OPIOCGETNEXT	_IOWR('O', 5, int)	/* get next node of node */
614588caefSderaadt #define	OPIOCGETCHILD	_IOWR('O', 6, int)	/* get first child of node */
6244a3eec3Smrg #define	OPIOCFINDDEVICE	_IOWR('O', 7, struct opiocdesc) /* find a specific device */
6382161a9cShannken 
6482161a9cShannken #endif /* _SPARC_OPENPROMIO_H_ */
65