1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolaris.org/os/licensing.
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2000-2002 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_GP2CFG_H
#define _SYS_GP2CFG_H
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* Header file for the Safari Configurator (gptwocfg).
*/
#ifdef __cplusplus
extern "C" {
#endif
#include <sys/safari_pcd.h>
#include <sys/fcode.h>
#include <sys/fcgp2.h>
/*
* Interfaces exported by Safari Configurator module, kernel/misc/gp2cfg.
*/
typedef void *gptwocfg_cookie_t;
typedef void *gptwocfg_ops_cookie_t;
typedef uint32_t gptwo_aid_t;
gptwocfg_cookie_t gptwocfg_configure(dev_info_t *, spcd_t *, uint_t);
gptwocfg_cookie_t gptwocfg_unconfigure(dev_info_t *, gptwo_aid_t);
int gptwocfg_next_node(gptwocfg_cookie_t, dev_info_t *, dev_info_t **);
void gptwocfg_save_handle(dev_info_t *, fco_handle_t);
fco_handle_t gptwocfg_get_handle(dev_info_t *);
/*
* Prototypes for the platform specific functions.
*/
#define GP2CFG_SUCCESS 0x00
#define GP2CFG_FAILURE 0x01
struct gptwo_phys_spec {
uint_t gptwo_phys_hi; /* child's address, hi word */
uint_t gptwo_phys_low; /* child's address, low word */
uint_t gptwo_size_hi; /* high word of size field */
uint_t gptwo_size_low; /* low word of size field */
};
typedef struct gptwo_phys_spec gptwo_regspec_t;
#define GP2_VERSION 0
struct gptwo_new_nodes {
uint_t gptwo_version;
uint_t gptwo_number_of_nodes;
dev_info_t *gptwo_nodes[1];
/* actual size is gptwo_number_of_nodes */
};
typedef struct gptwo_new_nodes gptwo_new_nodes_t;
typedef struct gptwocfg_config {
uint_t gptwo_version;
dev_info_t *gptwo_ap;
struct gptwocfg_ops *gptwo_ops;
gptwo_aid_t gptwo_portid;
gptwo_new_nodes_t *gptwo_nodes;
struct gptwocfg_config *gptwo_next;
} gptwocfg_config_t;
typedef struct gptwocfg_handle_list {
dev_info_t *dip;
fco_handle_t fco_handle;
struct gptwocfg_handle_list *next;
} gptwocfg_handle_list_t;
#define GPTWOCFG_OPS_VERSION 0
typedef struct gptwocfg_ops {
int gptwocfg_version; /* GPTWOCFG_OPS_VERSION */
int gptwocfg_type; /* SAFPTYPE_xxx */
gptwo_new_nodes_t *(*gptwocfg_configure)
(dev_info_t *ap, spcd_t *pcd, gptwo_aid_t id);
dev_info_t *(*gptwocfg_unconfigure)
(dev_info_t *dip);
} gptwocfg_ops_t;
typedef gptwo_new_nodes_t *gptwo_cfgfunc_t(dev_info_t *, spcd_t *, gptwo_aid_t);
typedef dev_info_t *gptwo_uncfgfunc_t(dev_info_t *);
void gptwocfg_register_ops(uint_t, gptwo_cfgfunc_t *, gptwo_uncfgfunc_t *);
void gptwocfg_unregister_ops(uint_t);
gptwo_new_nodes_t *gptwocfg_allocate_node_list(int);
void gptwocfg_free_node_list(gptwo_new_nodes_t *);
void gptwocfg_devi_attach_to_parent(dev_info_t *);
struct gfc_ops_v {
char *svc_name;
fc_ops_t *f;
};
extern struct gfc_ops_v gptwo_pov[];
#ifdef __cplusplus
}
#endif
#endif /* _SYS_GP2CFG_H */
|