1csx_RequestConfiguration(9KFe)rnel Functions for Drivecrssx_RequestConfiguration(9F)
2
3
4
6 csx_RequestConfiguration - configure the PC Card and socket
7
9 #include <sys/pccard.h>
10
11
12
13 int32_t csx_RequestConfiguration(client_handle_t ch, config_req_t *cr);
14
15
17 Solaris DDI Specific (Solaris DDI)
18
20 ch Client handle returned from csx_RegisterClient(9F).
21
22
23 cr Pointer to a config_req_t structure.
24
25
27 This function configures the PC Card and socket. It must be used by
28 clients that require I/O or IRQ resources for their PC Card.
29
30
31 csx_RequestIO(9F) and csx_RequestIRQ(9F) must be used before calling
32 this function to specify the I/O and IRQ requirements for the PC Card
33 and socket if necessary. csx_RequestConfiguration() establishes the
34 configuration in the socket adapter and PC Card, and it programs the
35 Base and Limit registers of multi-function PC Cards if these registers
36 exist. The values programmed into these registers depend on the IO
37 requirements of this configuration.
38
40 The structure members of config_req_t are:
41
42 uint32_t Socket; /* socket number */
43 uint32_t Attributes; /* configuration attributes */
44 uint32_t Vcc; /* Vcc value */
45 uint32_t Vpp1; /* Vpp1 value */
46 uint32_t Vpp2; /* Vpp2 value */
47 uint32_t IntType; /* socket interface type - mem or IO */
48 uint32_t ConfigBase; /* offset from start of AM space */
49 uint32_t Status; /* value to write to STATUS register */
50 uint32_t Pin; /* value to write to PRR */
51 uint32_t Copy; /* value to write to COPY register */
52 uint32_t ConfigIndex; /* value to write to COR */
53 uint32_t Present; /* which config registers present */
54 uint32_t ExtendedStatus; /* value to write to EXSTAT register */
55
56
57
58 The fields are defined as follows:
59
60 Socket
61
62 Not used in Solaris, but for portability with other Card Services
63 implementations, it should be set to the logical socket number.
64
65
66 Attributes
67
68 This field is bit-mapped. It indicates whether the client wishes
69 the IRQ resources to be enabled and whether Card Services should
70 ignore the VS bits on the socket interface. The following bits are
71 defined:
72
73 CONF_ENABLE_IRQ_STEERING
74
75 Enable IRQ Steering. Set to connect the PC Card IREQ line to a
76 system interrupt previously selected by a call to csx_Reque‐
77 stIRQ(9F). If CONF_ENABLE_IRQ_STEERING is set, once
78 csx_RequestConfiguration() has successfully returned, the
79 client may start receiving IRQ callbacks at the IRQ callback
80 handler established in the call to csx_RequestIRQ(9F).
81
82
83 CONF_VSOVERRIDE
84
85 Override VS pins. After card insertion and prior to the first
86 successful csx_RequestConfiguration(), the voltage levels
87 applied to the card shall be those indicated by the card's
88 physical key and/or the VS[2:1] voltage sense pins. For Low
89 Voltage capable host systems (hosts which are capable of VS pin
90 decoding), if a client desires to apply a voltage not indicated
91 by the VS pin decoding, then CONF_VSOVERRIDE must be set in the
92 Attributes field; otherwise, CS_BAD_VCC shall be returned.
93
94
95
96 Vcc, Vpp1, Vpp2
97
98 These fields all represent voltages expressed in tenths of a volt.
99 Values from zero (0) to 25.5 volts may be set. To be valid, the
100 exact voltage must be available from the system. PC Cards indicate
101 multiple Vcc voltage capability in their CIS via the
102 CISTPL_CFTABLE_ENTRY tuple. After card insertion, Card Services
103 processes the CIS, and when multiple Vcc voltage capability is
104 indicated, Card Services will allow the client to apply Vcc voltage
105 levels which are contrary to the VS pin decoding without requiring
106 the client to set CONF_VSOVERRIDE.
107
108
109 IntType
110
111 This field is bit-mapped. It indicates how the socket should be
112 configured. The following bits are defined:
113
114 SOCKET_INTERFACE_MEMORY
115
116 Memory only interface.
117
118
119 SOCKET_INTERFACE_MEMORY_AND_IO
120
121 Memory and I/O interface.
122
123
124
125 ConfigBase
126
127 This field is the offset in bytes from the beginning of attribute
128 memory of the configuration registers.
129
130
131 Present
132
133 This field identifies which of the configuration registers are
134 present. If present, the corresponding bit is set. This field is
135 bit-mapped as follows:
136
137 CONFIG_OPTION_REG_PRESENT Configuration Option Register (COR)
138 present
139
140
141 CONFIG_STATUS_REG_PRESENT Configuration Status Register (CCSR)
142 present
143
144
145 CONFIG_PINREPL_REG_PRESENT Pin Replacement Register (PRR)
146 present
147
148
149 CONFIG_COPY_REG_PRESENT Socket and Copy Register (SCR)
150 present
151
152
153 CONFIG_ESR_REG_PRESENT Extended Status Register (ESR)
154 present
155
156
157
158 Status, Pin, Copy, ExtendedStatus
159
160 These fields represent the initial values that should be written to
161 those registers if they are present, as indicated by the Present
162 field.
163
164 The Pin field is also used to inform Card Services which pins in
165 the PC Card's PRR (Pin Replacement Register) are valid. Only those
166 bits which are set are considered valid. This affects how status is
167 returned by the csx_GetStatus(9F) function. If a particular signal
168 is valid in the PRR, both the mask (STATUS) bit and the change
169 (EVENT) bit must be set in the Pin field. The following PRR bit
170 definitions are provided for client use:
171
172 PRR_WP_STATUS WRITE PROTECT mask
173
174
175 PRR_READY_STATUS READY mask
176
177
178 PRR_BVD2_STATUS BVD2 mask
179
180
181 PRR_BVD1_STATUS BVD1 mask
182
183
184 PRR_WP_EVENT WRITE PROTECT changed
185
186
187 PRR_READY_EVENT READY changed
188
189
190 PRR_BVD2_EVENT BVD2 changed
191
192
193 PRR_BVD1_EVENT BVD1 changed
194
195
196
197 ConfigIndex
198
199 This field is the value written to the COR (Configuration Option
200 Register) for the configuration index required by the PC Card. Only
201 the least significant six bits of the ConfigIndex field are signif‐
202 icant; the upper two (2) bits are ignored. The interrupt type in
203 the COR is always set to level mode by Card Services.
204
205
207 CS_SUCCESS Successful operation.
208
209
210 CS_BAD_HANDLE Client handle is invalid or csx_RequestCon‐
211 figuration() not done.
212
213
214 CS_BAD_SOCKET Error in getting or setting socket hardware
215 parameters.
216
217
218 CS_BAD_VCC Requested Vcc is not available on socket.
219
220
221 CS_BAD_VPP Requested Vpp is not available on socket.
222
223
224 CS_NO_CARD No PC Card in socket.
225
226
227 CS_BAD_TYPE I/O and memory interface not supported on
228 socket.
229
230
231 CS_CONFIGURATION_LOCKED csx_RequestConfiguration() already done.
232
233
234 CS_UNSUPPORTED_FUNCTION No PCMCIA hardware installed.
235
236
238 This function may be called from user or kernel context.
239
241 csx_AccessConfigurationRegister(9F), csx_GetStatus(9F), csx_Register‐
242 Client(9F), csx_ReleaseConfiguration(9F), csx_RequestIO(9F), csx_Reque‐
243 stIRQ(9F)
244
245
246 PC Card 95 Standard, PCMCIA/JEIDA
247
248
249
250SunOS 5.11 19 Jul 1996 csx_RequestConfiguration(9F)