Kernel Functions for Drivers csxAccessConfigurationRegister(9F)
NAME
csxAccessConfigurationRegister - read or write a PC Card
Configuration Register
SYNOPSIS
#include
int32t csxAccessConfigurationRegister(clienthandlet ch,
accessconfigregt *acr);
INTERFACE LEVEL
Solaris DI Specific (Solaris DI)
PARAMETERS
ch Client handle returned from csxRegisterClient(9F).
acr Pointer to an accessconfigregt structure.
DESCRIPTION
This function allows a client to read or write a PCard Con-
figuration Register.
STRUCTURE MEMBERS
The structure members of accessconfigregt are:
uint32t Socket; /* socket number*/
uint32t Action; /* register access operation*/
uint32t Offset; /* config register offset*/
uint32t Value; /* value read or written*/
The fields are defined as follows:
Socket Not used in Solaris, but for portability with
other Card Services implementations, it should be
set to the logical socket number.
Action May be set to CONFIGREGREAD or CONFIGREGWRITE.
All other values in the Action field are reserved
for future use. If the Action field is set to
CONFIGREGWRITE, the Value field is written to
the specified configuration register. Card Ser-
vices does not read the configuration register
after a write operation. For that reason, the
Value field is only updated by a CONFIGREGREAD
SunOS 5.11 Last change: 19 Jul 1996 1
Kernel Functions for Drivers csxAccessConfigurationRegister(9F)
request.
Offset Specifies the byte offset for the desired confi-
guration register from the PC Card configuration
register base specified in
csxRequestConfiguration(9F).
Value Contains the value read from the PC Card Confi-
guration Register for a read operation. For a
write operation, the Value field contains the
value to write to the configuration register. As
noted above, on return from a write request, the
Value field is the value written to the PC Card
and not any changed value that may have resulted
from the write request (that is, no read after
write is performed).
A client must be very careful when writing to the COR (Con-
figuration Option Register) at offset 0. This has the poten-
tial to change the type of interrupt request generated by
the PC Card or place the card in the reset state. Either
request may have undefined results. The client should read
the register to determine the appropriate setting for the
interrupt mode (Bit 6) before writing to the register.
If a client wants to reset a PCard, the
csxResetFunction(9F) function should be used. Unlike
csxAccessConfigurationRegister(), the csxResetFunction(9F)
function generates a series of event notifications to all
clients using the PC Card, so they can re-establish the
appropriate card state after the reset operation is com-
plete.
RETURN VALUES
CSUCES Successful operation.
CSBADARGS Specified arguments are invalid.
Client specifies an Offset that
is out of range or neither
CONFIGREGREAD or
CONFIGREGWRITE is set.
CSUNSUPORTEDMODE Client has not called
csxRequestConfiguration(9F)
before calling this function.
SunOS 5.11 Last change: 19 Jul 1996 2
Kernel Functions for Drivers csxAccessConfigurationRegister(9F)
CSBADHANDLE Client handle is invalid.
CSNOCARD No PC card in socket.
CSUNSUPORTEDFUNCTION No PCMCIA hardware installed.
CONTEXT
This function may be called from user or kernel context.
SEE ALSO
csxParseTuple(9F), csxRegisterClient(9F),
csxRequestConfiguration(9F), csxResetFunction(9F)
PCard 95 Standard, PCMCIA/JEIDA
SunOS 5.11 Last change: 19 Jul 1996 3
|