2 .\" Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
4 .\" 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.
5 .\" 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]
6 .TH CSX_REQUESTCONFIGURATION 9F "Jul 19, 1996"
8 csx_RequestConfiguration \- configure the PC Card and socket
12 #include <sys/pccard.h>
16 \fBint32_t\fR \fBcsx_RequestConfiguration\fR(\fBclient_handle_t\fR \fIch\fR, \fBconfig_req_t *\fR\fIcr\fR);
22 Solaris \fBDDI\fR Specific (Solaris \fBDDI\fR)
30 Client handle returned from \fBcsx_RegisterClient\fR(9F).
39 Pointer to a \fBconfig_req_t\fR structure.
45 This function configures the \fBPC\fR Card and socket. It must be used by
46 clients that require \fBI/O\fR or \fBIRQ\fR resources for their \fBPC\fR Card.
49 \fBcsx_RequestIO\fR(9F) and \fBcsx_RequestIRQ\fR(9F) must be used before
50 calling this function to specify the \fBI/O\fR and \fBIRQ\fR requirements for
51 the \fBPC\fR Card and socket if necessary. \fBcsx_RequestConfiguration()\fR
52 establishes the configuration in the socket adapter and \fBPC\fR Card, and it
53 programs the Base and Limit registers of multi-function \fBPC\fR Cards if these
54 registers exist. The values programmed into these registers depend on the
55 \fBIO\fR requirements of this configuration.
59 The structure members of \fBconfig_req_t\fR are:
63 uint32_t Socket; /* socket number */
64 uint32_t Attributes; /* configuration attributes */
65 uint32_t Vcc; /* Vcc value */
66 uint32_t Vpp1; /* Vpp1 value */
67 uint32_t Vpp2; /* Vpp2 value */
68 uint32_t IntType; /* socket interface type - mem or IO */
69 uint32_t ConfigBase; /* offset from start of AM space */
70 uint32_t Status; /* value to write to STATUS register */
71 uint32_t Pin; /* value to write to PRR */
72 uint32_t Copy; /* value to write to COPY register */
73 uint32_t ConfigIndex; /* value to write to COR */
74 uint32_t Present; /* which config registers present */
75 uint32_t ExtendedStatus; /* value to write to EXSTAT register */
81 The fields are defined as follows:
89 Not used in Solaris, but for portability with other Card Services
90 implementations, it should be set to the logical socket number.
96 \fB\fBAttributes\fR\fR
100 This field is bit-mapped. It indicates whether the client wishes the \fBIRQ\fR
101 resources to be enabled and whether Card Services should ignore the \fBVS\fR
102 bits on the socket interface. The following bits are defined:
106 \fB\fBCONF_ENABLE_IRQ_STEERING\fR\fR
110 Enable IRQ Steering. Set to connect the \fBPC\fR Card \fBIREQ\fR line to a
111 system interrupt previously selected by a call to \fBcsx_RequestIRQ\fR(9F). If
112 \fBCONF_ENABLE_IRQ_STEERING\fR is set, once \fBcsx_RequestConfiguration()\fR
113 has successfully returned, the client may start receiving \fBIRQ\fR callbacks
114 at the \fBIRQ\fR callback handler established in the call to
115 \fBcsx_RequestIRQ\fR(9F).
121 \fB\fBCONF_VSOVERRIDE\fR\fR
125 Override VS pins. After card insertion and prior to the first successful
126 \fBcsx_RequestConfiguration()\fR, the voltage levels applied to the card shall
127 be those indicated by the card's physical key and/or the VS[2:1] voltage sense
128 pins. For Low Voltage capable host systems (hosts which are capable of \fBVS\fR
129 pin decoding), if a client desires to apply a voltage not indicated by the
130 \fBVS\fR pin decoding, then \fBCONF_VSOVERRIDE\fR must be set in the
131 \fBAttributes\fR field; otherwise, \fBCS_BAD_VCC\fR shall be returned.
139 \fB\fBVcc, Vpp1, Vpp2\fR\fR
143 These fields all represent voltages expressed in tenths of a volt. Values from
144 zero (\fB0\fR) to \fB25.5\fR volts may be set. To be valid, the exact voltage
145 must be available from the system. \fBPC\fR Cards indicate multiple \fBVcc\fR
146 voltage capability in their \fBCIS\fR via the \fBCISTPL_CFTABLE_ENTRY\fR tuple.
147 After card insertion, Card Services processes the \fBCIS\fR, and when multiple
148 \fBVcc\fR voltage capability is indicated, Card Services will allow the client
149 to apply \fBVcc\fR voltage levels which are contrary to the \fBVS\fR pin
150 decoding without requiring the client to set \fBCONF_VSOVERRIDE.\fR
160 This field is bit-mapped. It indicates how the socket should be configured. The
161 following bits are defined:
165 \fB\fBSOCKET_INTERFACE_MEMORY\fR\fR
169 Memory only interface.
175 \fB\fBSOCKET_INTERFACE_MEMORY_AND_IO\fR\fR
179 Memory and I/O interface.
187 \fB\fBConfigBase\fR\fR
191 This field is the offset in bytes from the beginning of attribute memory of the
192 configuration registers.
202 This field identifies which of the configuration registers are present. If
203 present, the corresponding bit is set. This field is bit-mapped as follows:
207 \fB\fBCONFIG_OPTION_REG_PRESENT\fR\fR
210 Configuration Option Register (COR) present
216 \fB\fBCONFIG_STATUS_REG_PRESENT\fR\fR
219 Configuration Status Register (CCSR) present
225 \fB\fBCONFIG_PINREPL_REG_PRESENT\fR\fR
228 Pin Replacement Register (PRR) present
234 \fB\fBCONFIG_COPY_REG_PRESENT\fR\fR
237 Socket and Copy Register (SCR) present
243 \fB\fBCONFIG_ESR_REG_PRESENT\fR\fR
246 Extended Status Register (ESR) present
254 \fB\fBStatus, Pin, Copy, ExtendedStatus\fR\fR
258 These fields represent the initial values that should be written to those
259 registers if they are present, as indicated by the \fBPresent\fR field.
261 The \fBPin\fR field is also used to inform Card Services which pins in the
262 \fBPC\fR Card's \fBPRR\fR (Pin Replacement Register) are valid. Only those bits
263 which are set are considered valid. This affects how status is returned by the
264 \fBcsx_GetStatus\fR(9F) function. If a particular signal is valid in the
265 \fBPRR\fR, both the \fImask\fR (\fBSTATUS\fR) bit and the \fIchange\fR
266 (\fBEVENT\fR) bit must be set in the \fBPin\fR field. The following \fBPRR\fR
267 bit definitions are provided for client use:
271 \fB\fBPRR_WP_STATUS\fR\fR
274 \fBWRITE PROTECT\fR mask
280 \fB\fBPRR_READY_STATUS\fR\fR
289 \fB\fBPRR_BVD2_STATUS\fR\fR
298 \fB\fBPRR_BVD1_STATUS\fR\fR
307 \fB\fBPRR_WP_EVENT\fR\fR
310 \fBWRITE PROTECT\fR changed
316 \fB\fBPRR_READY_EVENT\fR\fR
325 \fB\fBPRR_BVD2_EVENT\fR\fR
334 \fB\fBPRR_BVD1_EVENT\fR\fR
345 \fB\fBConfigIndex\fR\fR
349 This field is the value written to the \fBCOR\fR (Configuration Option
350 Register) for the configuration index required by the \fBPC\fR Card. Only the
351 least significant six bits of the \fBConfigIndex\fR field are significant; the
352 upper two (2) bits are ignored. The interrupt type in the \fBCOR\fR is always
353 set to \fIlevel\fR mode by Card Services.
360 \fB\fBCS_SUCCESS\fR\fR
363 Successful operation.
369 \fB\fBCS_BAD_HANDLE\fR\fR
372 Client handle is invalid or \fBcsx_RequestConfiguration()\fR not done.
378 \fB\fBCS_BAD_SOCKET\fR\fR
381 Error in getting or setting socket hardware parameters.
387 \fB\fBCS_BAD_VCC\fR\fR
390 Requested \fBVcc\fR is not available on socket.
396 \fB\fBCS_BAD_VPP\fR\fR
399 Requested \fBVpp\fR is not available on socket.
405 \fB\fBCS_NO_CARD\fR\fR
408 No \fBPC\fR Card in socket.
414 \fB\fBCS_BAD_TYPE\fR\fR
417 \fBI/O\fR and memory interface not supported on socket.
423 \fB\fBCS_CONFIGURATION_LOCKED\fR\fR
426 \fBcsx_RequestConfiguration()\fR already done.
432 \fB\fBCS_UNSUPPORTED_FUNCTION\fR\fR
435 No \fBPCMCIA\fR hardware installed.
441 This function may be called from user or kernel context.
445 \fBcsx_AccessConfigurationRegister\fR(9F), \fBcsx_GetStatus\fR(9F),
446 \fBcsx_RegisterClient\fR(9F), \fBcsx_ReleaseConfiguration\fR(9F),
447 \fBcsx_RequestIO\fR(9F), \fBcsx_RequestIRQ\fR(9F)
450 \fIPC Card 95 Standard\fR, PCMCIA/JEIDA