xref: /illumos-gate/usr/src/uts/common/sys/nexusdefs.h (revision 8dfe5547fbf0979fc1065a8b6fddc1e940a7cf4f)
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_NEXUSDEFS_H
28 #define	_SYS_NEXUSDEFS_H
29 
30 #ifdef	__cplusplus
31 extern "C" {
32 #endif
33 
34 /*
35  * Bus Nexus Control Operations
36  */
37 
38 typedef enum {
39 	DDI_CTLOPS_DMAPMAPC,
40 	DDI_CTLOPS_INITCHILD,
41 	DDI_CTLOPS_UNINITCHILD,
42 	DDI_CTLOPS_REPORTDEV,
43 	DDI_CTLOPS_REPORTINT,
44 	DDI_CTLOPS_REGSIZE,
45 	DDI_CTLOPS_NREGS,
46 	DDI_CTLOPS_RESERVED0,	/* Originally DDI_CTLOPS_NINTRS, obsolete */
47 	DDI_CTLOPS_SIDDEV,
48 	DDI_CTLOPS_SLAVEONLY,
49 	DDI_CTLOPS_AFFINITY,
50 	DDI_CTLOPS_IOMIN,
51 	DDI_CTLOPS_PTOB,
52 	DDI_CTLOPS_BTOP,
53 	DDI_CTLOPS_BTOPR,
54 	DDI_CTLOPS_RESERVED1,	/* Originally DDI_CTLOPS_POKE_INIT, obsolete */
55 	DDI_CTLOPS_RESERVED2,	/* Originally DDI_CTLOPS_POKE_FLUSH, obsolete */
56 	DDI_CTLOPS_RESERVED3,	/* Originally DDI_CTLOPS_POKE_FINI, obsolete */
57 	DDI_CTLOPS_RESERVED4, /* Originally DDI_CTLOPS_INTR_HILEVEL, obsolete */
58 	DDI_CTLOPS_RESERVED5, /* Originally DDI_CTLOPS_XLATE_INTRS, obsolete */
59 	DDI_CTLOPS_DVMAPAGESIZE,
60 	DDI_CTLOPS_POWER,
61 	DDI_CTLOPS_ATTACH,
62 	DDI_CTLOPS_DETACH,
63 	DDI_CTLOPS_QUIESCE,
64 	DDI_CTLOPS_UNQUIESCE,
65 	DDI_CTLOPS_PEEK,
66 	DDI_CTLOPS_POKE
67 } ddi_ctl_enum_t;
68 
69 /*
70  * For source compatibility, we define the following obsolete code:
71  * Do NOT use this, use the real constant name.
72  */
73 #define	DDI_CTLOPS_REMOVECHILD	DDI_CTLOPS_UNINITCHILD
74 
75 /*
76  * Bus config ops
77  */
78 typedef enum {
79 	BUS_ENUMERATE = 0,
80 	BUS_CONFIG_ONE,
81 	BUS_CONFIG_ALL,
82 	BUS_CONFIG_AP,
83 	BUS_CONFIG_DRIVER,
84 	BUS_UNCONFIG_ONE,
85 	BUS_UNCONFIG_DRIVER,
86 	BUS_UNCONFIG_ALL,
87 	BUS_UNCONFIG_AP,
88 	BUS_CONFIG_OBP_ARGS
89 } ddi_bus_config_op_t;
90 
91 /*
92  * Bus Power Operations
93  */
94 typedef enum {
95 	BUS_POWER_CHILD_PWRCHG = 0,
96 	BUS_POWER_NEXUS_PWRUP,
97 	BUS_POWER_PRE_NOTIFICATION,
98 	BUS_POWER_POST_NOTIFICATION,
99 	BUS_POWER_HAS_CHANGED,
100 	BUS_POWER_NOINVOL
101 } pm_bus_power_op_t;
102 
103 #ifdef	__cplusplus
104 }
105 #endif
106 
107 #endif	/* _SYS_NEXUSDEFS_H */
108