xref: /onnv-gate/usr/src/lib/fm/topo/modules/sun4/ioboard/ioboard.h (revision 3062:46d280f5351d)
11414Scindi /*
21414Scindi  * CDDL HEADER START
31414Scindi  *
41414Scindi  * The contents of this file are subject to the terms of the
51414Scindi  * Common Development and Distribution License (the "License").
61414Scindi  * You may not use this file except in compliance with the License.
71414Scindi  *
81414Scindi  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
91414Scindi  * or http://www.opensolaris.org/os/licensing.
101414Scindi  * See the License for the specific language governing permissions
111414Scindi  * and limitations under the License.
121414Scindi  *
131414Scindi  * When distributing Covered Code, include this CDDL HEADER in each
141414Scindi  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
151414Scindi  * If applicable, add the following below this CDDL HEADER, with the
161414Scindi  * fields enclosed by brackets "[]" replaced with your own identifying
171414Scindi  * information: Portions Copyright [yyyy] [name of copyright owner]
181414Scindi  *
191414Scindi  * CDDL HEADER END
201414Scindi  */
211414Scindi 
221414Scindi /*
231414Scindi  * Copyright 2006 Sun Microsystems, Inc.  All rights reserved.
241414Scindi  * Use is subject to license terms.
251414Scindi  */
261414Scindi 
271414Scindi #ifndef _IOBOARD_H
281414Scindi #define	_IOBOARD_H
291414Scindi 
301414Scindi #pragma ident	"%Z%%M%	%I%	%E% SMI"
311414Scindi 
321414Scindi #include <libdevinfo.h>
331426Scindi #include <did.h>
341414Scindi 
351414Scindi #ifdef __cplusplus
361414Scindi extern "C" {
371414Scindi #endif
381414Scindi 
391414Scindi #define	IOB_ENUMR_VERS	1
401414Scindi 
411414Scindi /*
421414Scindi  * For all machines that currently use this enumerator, buses have one
431414Scindi  * of the following addresses.
441414Scindi  */
451414Scindi #define	IOB_BUSADDR1	0x600000
461414Scindi #define	IOB_BUSADDR2	0x700000
471414Scindi 
48*3062Scindi extern tnode_t *ioboard_declare(topo_mod_t *, tnode_t *, topo_instance_t,
49*3062Scindi     void *);
501414Scindi 
51*3062Scindi extern int platform_iob_enum(topo_mod_t *, tnode_t *, topo_instance_t,
52*3062Scindi     topo_instance_t);
53*3062Scindi extern int platform_iob_label(topo_mod_t *, tnode_t *, nvlist_t *, nvlist_t **);
541414Scindi 
551414Scindi /*
561414Scindi  * This routine works for splitting up the string we get from
571414Scindi  * di_bus_addr() for all machines that currently use this enumerator.
581414Scindi  */
59*3062Scindi extern did_t *split_bus_address(topo_mod_t *, di_node_t, uint_t, uint_t,
60*3062Scindi     int, int, int *, int *, int *);
611414Scindi 
621414Scindi #ifdef __cplusplus
631414Scindi }
641414Scindi #endif
651414Scindi 
661414Scindi #endif /* _IOBOARD_H */
67