xref: /openbsd-src/sys/arch/arm/include/openpromio.h (revision d571cddaf002c9688a3c8828e85e8b69bad9e2d3)
1*d571cddaSkettenis /*	$OpenBSD: openpromio.h,v 1.1 2016/05/21 21:24:36 kettenis Exp $	*/
2*d571cddaSkettenis /*	$NetBSD: openpromio.h,v 1.1.1.1 1998/06/20 04:58:52 eeh Exp $ */
3*d571cddaSkettenis 
4*d571cddaSkettenis /*
5*d571cddaSkettenis  * Copyright (c) 1992, 1993
6*d571cddaSkettenis  *	The Regents of the University of California.  All rights reserved.
7*d571cddaSkettenis  *
8*d571cddaSkettenis  * This software was developed by the Computer Systems Engineering group
9*d571cddaSkettenis  * at Lawrence Berkeley Laboratory under DARPA contract BG 91-66 and
10*d571cddaSkettenis  * contributed to Berkeley.
11*d571cddaSkettenis  *
12*d571cddaSkettenis  * All advertising materials mentioning features or use of this software
13*d571cddaSkettenis  * must display the following acknowledgement:
14*d571cddaSkettenis  *	This product includes software developed by the University of
15*d571cddaSkettenis  *	California, Lawrence Berkeley Laboratory.
16*d571cddaSkettenis  *
17*d571cddaSkettenis  * Redistribution and use in source and binary forms, with or without
18*d571cddaSkettenis  * modification, are permitted provided that the following conditions
19*d571cddaSkettenis  * are met:
20*d571cddaSkettenis  * 1. Redistributions of source code must retain the above copyright
21*d571cddaSkettenis  *    notice, this list of conditions and the following disclaimer.
22*d571cddaSkettenis  * 2. Redistributions in binary form must reproduce the above copyright
23*d571cddaSkettenis  *    notice, this list of conditions and the following disclaimer in the
24*d571cddaSkettenis  *    documentation and/or other materials provided with the distribution.
25*d571cddaSkettenis  * 3. Neither the name of the University nor the names of its contributors
26*d571cddaSkettenis  *    may be used to endorse or promote products derived from this software
27*d571cddaSkettenis  *    without specific prior written permission.
28*d571cddaSkettenis  *
29*d571cddaSkettenis  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
30*d571cddaSkettenis  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
31*d571cddaSkettenis  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
32*d571cddaSkettenis  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
33*d571cddaSkettenis  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
34*d571cddaSkettenis  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
35*d571cddaSkettenis  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
36*d571cddaSkettenis  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
37*d571cddaSkettenis  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
38*d571cddaSkettenis  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
39*d571cddaSkettenis  * SUCH DAMAGE.
40*d571cddaSkettenis  *
41*d571cddaSkettenis  *	@(#)openpromio.h	8.1 (Berkeley) 6/11/93
42*d571cddaSkettenis  */
43*d571cddaSkettenis 
44*d571cddaSkettenis struct opiocdesc {
45*d571cddaSkettenis 	int	op_nodeid;		/* passed or returned node id */
46*d571cddaSkettenis 	int	op_namelen;		/* length of op_name */
47*d571cddaSkettenis 	char	*op_name;		/* pointer to field name */
48*d571cddaSkettenis 	int	op_buflen;		/* length of op_buf (value-result) */
49*d571cddaSkettenis 	char	*op_buf;		/* pointer to field value */
50*d571cddaSkettenis };
51*d571cddaSkettenis 
52*d571cddaSkettenis #define	OPIOCGET	_IOWR('O', 1, struct opiocdesc) /* get openprom field */
53*d571cddaSkettenis #define	OPIOCSET	_IOW('O', 2, struct opiocdesc) /* set openprom field */
54*d571cddaSkettenis #define	OPIOCNEXTPROP	_IOWR('O', 3, struct opiocdesc) /* get next property */
55*d571cddaSkettenis #define	OPIOCGETOPTNODE	_IOR('O', 4, int)	/* get openprom field */
56*d571cddaSkettenis #define	OPIOCGETNEXT	_IOWR('O', 5, int)	/* get next node of node */
57*d571cddaSkettenis #define	OPIOCGETCHILD	_IOWR('O', 6, int)	/* get first child of node */
58