|Skip Navigation Links|
|Exit Print View|
|man pages section 9: DDI and DKI Kernel Functions Oracle Solaris 11 Information Library|
- configure the PC Card and socket
#include <sys/pccard.h> int32_t csx_RequestConfiguration(client_handle_t ch, config_req_t *cr);
Solaris DDI Specific (Solaris DDI)
Client handle returned from csx_RegisterClient(9F).
Pointer to a config_req_t structure.
This function configures the PC Card and socket. It must be used by clients that require I/O or IRQ resources for their PC Card.
csx_RequestIO(9F) and csx_RequestIRQ(9F) must be used before calling this function to specify the I/O and IRQ requirements for the PC Card and socket if necessary. csx_RequestConfiguration() establishes the configuration in the socket adapter and PC Card, and it programs the Base and Limit registers of multi-function PC Cards if these registers exist. The values programmed into these registers depend on the IO requirements of this configuration.
The structure members of config_req_t are:
uint32_t Socket; /* socket number */ uint32_t Attributes; /* configuration attributes */ uint32_t Vcc; /* Vcc value */ uint32_t Vpp1; /* Vpp1 value */ uint32_t Vpp2; /* Vpp2 value */ uint32_t IntType; /* socket interface type - mem or IO */ uint32_t ConfigBase; /* offset from start of AM space */ uint32_t Status; /* value to write to STATUS register */ uint32_t Pin; /* value to write to PRR */ uint32_t Copy; /* value to write to COPY register */ uint32_t ConfigIndex; /* value to write to COR */ uint32_t Present; /* which config registers present */ uint32_t ExtendedStatus; /* value to write to EXSTAT register */
The fields are defined as follows:
Not used in Solaris, but for portability with other Card Services implementations, it should be set to the logical socket number.
This field is bit-mapped. It indicates whether the client wishes the IRQ resources to be enabled and whether Card Services should ignore the VS bits on the socket interface. The following bits are defined:
Enable IRQ Steering. Set to connect the PC Card IREQ line to a system interrupt previously selected by a call to csx_RequestIRQ(9F). If CONF_ENABLE_IRQ_STEERING is set, once csx_RequestConfiguration() has successfully returned, the client may start receiving IRQ callbacks at the IRQ callback handler established in the call to csx_RequestIRQ(9F).
Override VS pins. After card insertion and prior to the first successful csx_RequestConfiguration(), the voltage levels applied to the card shall be those indicated by the card's physical key and/or the VS[2:1] voltage sense pins. For Low Voltage capable host systems (hosts which are capable of VS pin decoding), if a client desires to apply a voltage not indicated by the VS pin decoding, then CONF_VSOVERRIDE must be set in the Attributes field; otherwise, CS_BAD_VCC shall be returned.
These fields all represent voltages expressed in tenths of a volt. Values from zero (0) to 25.5 volts may be set. To be valid, the exact voltage must be available from the system. PC Cards indicate multiple Vcc voltage capability in their CIS via the CISTPL_CFTABLE_ENTRY tuple. After card insertion, Card Services processes the CIS, and when multiple Vcc voltage capability is indicated, Card Services will allow the client to apply Vcc voltage levels which are contrary to the VS pin decoding without requiring the client to set CONF_VSOVERRIDE.
This field is bit-mapped. It indicates how the socket should be configured. The following bits are defined:
Memory only interface.
Memory and I/O interface.
This field is the offset in bytes from the beginning of attribute memory of the configuration registers.
This field identifies which of the configuration registers are present. If present, the corresponding bit is set. This field is bit-mapped as follows:
Configuration Option Register (COR) present
Configuration Status Register (CCSR) present
Pin Replacement Register (PRR) present
Socket and Copy Register (SCR) present
Extended Status Register (ESR) present
These fields represent the initial values that should be written to those registers if they are present, as indicated by the Present field.
The Pin field is also used to inform Card Services which pins in the PC Card's PRR (Pin Replacement Register) are valid. Only those bits which are set are considered valid. This affects how status is returned by the csx_GetStatus(9F) function. If a particular signal is valid in the PRR, both the mask (STATUS) bit and the change (EVENT) bit must be set in the Pin field. The following PRR bit definitions are provided for client use:
WRITE PROTECT mask
WRITE PROTECT changed
This field is the value written to the COR (Configuration Option Register) for the configuration index required by the PC Card. Only the least significant six bits of the ConfigIndex field are significant; the upper two (2) bits are ignored. The interrupt type in the COR is always set to level mode by Card Services.
Client handle is invalid or csx_RequestConfiguration() not done.
Error in getting or setting socket hardware parameters.
Requested Vcc is not available on socket.
Requested Vpp is not available on socket.
No PC Card in socket.
I/O and memory interface not supported on socket.
csx_RequestConfiguration() already done.
No PCMCIA hardware installed.
This function may be called from user or kernel context.
PC Card 95 Standard, PCMCIA/JEIDA