MyWebUniversity.com Home Page
 



OpenSolaris man pages main menu


Kernel Functions for Drivers         csxRequestConfiguration(9F)



NAME
     csxRequestConfiguration - configure the PC Card and socket

SYNOPSIS
     #include 



     int32t csxRequestConfiguration(clienthandlet ch, configreqt *cr);


INTERFACE LEVEL
     Solaris DI Specific (Solaris DI)

PARAMETERS
     ch    Client handle returned from csxRegisterClient(9F).


     cr    Pointer to a configreqt structure.


DESCRIPTION
     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.


     csxRequestIO(9F) and csxRequestIRQ(9F) must be used before
     calling  this  function  to specify the I/O and IRQ require-
     ments  for  the   PC   Card   and   socket   if   necessary.
     csxRequestConfiguration()  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 regis-
     ters exist.  The  values  programmed  into  these  registers
     depend on the IO requirements of this configuration.

STRUCTURE MEMBERS
     The structure members of configreqt are:

       uint32t     Socket;          /* socket number */
       uint32t     Attributes;      /* configuration attributes */
       uint32t     Vcc;             /* Vcc value */
       uint32t     Vpp1;            /* Vpp1 value */
       uint32t     Vpp2;            /* Vpp2 value */
       uint32t     IntType;         /* socket interface type - mem or IO */
       uint32t     ConfigBase;      /* offset from start of AM space */
       uint32t     Status;          /* value to write to STATUS register */
       uint32t     Pin;             /* value to write to PR */
       uint32t     Copy;            /* value to write to COPY register */
       uint32t     ConfigIndex;     /* value to write to COR */
       uint32t     Present;         /* which config registers present */
       uint32t     ExtendedStatus;  /* value to write to EXSTAT register */



SunOS 5.11          Last change: 19 Jul 1996                    1






Kernel Functions for Drivers         csxRequestConfiguration(9F)



     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 logi-
         cal socket number.


     Attributes

         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:

         CONFENABLEIRQSTERING

             Enable IRQ Steering. Set to connect the PC Card IREQ
             line  to a system interrupt previously selected by a
             call        to        csxRequestIRQ(9F).         If
             CONFENABLEIRQSTERING      is      set,      once
             csxRequestConfiguration()     has      successfully
             returned,  the  client may start receiving IRQ call-
             backs at the IRQ callback handler established in the
             call to csxRequestIRQ(9F).


         CONFVSOVERIDE

             Override VS pins. After card insertion and prior  to
             the first successful csxRequestConfiguration(), 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
             CONFVSOVERIDE must be set in the Attributes field;
             otherwise, CSBADVC shall be returned.



     Vcc, Vpp1, Vpp2

         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  CISTPLCFTABLENTRY
         tuple. After card insertion, Card Services processes the
         CIS,  and  when  multiple  Vcc  voltage  capability   is



SunOS 5.11          Last change: 19 Jul 1996                    2






Kernel Functions for Drivers         csxRequestConfiguration(9F)



         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
         CONFVSOVERIDE.


     IntType

         This field is bit-mapped. It indicates  how  the  socket
         should be configured. The following bits are defined:

         SOCKETINTERFACEMEMORY

             Memory only interface.


         SOCKETINTERFACEMEMORYANDIO

             Memory and I/O interface.



     ConfigBase

         This field is the offset in bytes from the beginning  of
         attribute memory of the configuration registers.


     Present

         This field identifies which of the configuration  regis-
         ters  are  present. If present, the corresponding bit is
         set. This field is bit-mapped as follows:

         CONFIGOPTIONREGPRESENT     Configuration       Option
                                       Register (COR) present


         CONFIGSTATUSREGPRESENT     Configuration       Status
                                       Register (CSR) present


         CONFIGPINREPLREGPRESENT    Pin  Replacement  Register
                                       (PR) present


         CONFIGCOPYREGPRESENT       Socket and  Copy  Register
                                       (SCR) present


         CONFIGESREGPRESENT        Extended  Status  Register
                                       (ESR) present



SunOS 5.11          Last change: 19 Jul 1996                    3






Kernel Functions for Drivers         csxRequestConfiguration(9F)



     Status, Pin, Copy, ExtendedStatus

         These fields represent the initial values that should be
         written to those registers if they are present, as indi-
         cated by the Present field.

         The Pin field is also used to inform Card Services which
         pins in the PC Card's PR (Pin Replacement Register) are
         valid. Only those bits  which  are  set  are  considered
         valid.  This  affects  how  status  is  returned  by the
         csxGetStatus(9F) function. If a  particular  signal  is
         valid  in  the  PR,  both the mask (STATUS) bit and the
         change (EVENT) bit must be set in  the  Pin  field.  The
         following  PR  bit  definitions are provided for client
         use:

         PRWPSTATUS       WRITE PROTECT mask


         PREADYSTATUS    READY mask


         PRBVD2STATUS     BVD2 mask


         PRBVD1STATUS     BVD1 mask


         PRWPEVENT        WRITE PROTECT changed


         PREADYEVENT     READY changed


         PRBVD2EVENT      BVD2 changed


         PRBVD1EVENT      BVD1 changed



     ConfigIndex

         This field is the value written to the  COR  (Configura-
         tion   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.






SunOS 5.11          Last change: 19 Jul 1996                    4






Kernel Functions for Drivers         csxRequestConfiguration(9F)



RETURN VALUES
     CSUCES                 Successful operation.


     CSBADHANDLE              Client  handle  is   invalid   or
                                csxRequestConfiguration()    not
                                done.


     CSBADSOCKET              Error  in  getting   or   setting
                                socket hardware parameters.


     CSBADVC                 Requested Vcc is not available on
                                socket.


     CSBADVP                 Requested Vpp is not available on
                                socket.


     CSNOCARD                 No PC Card in socket.


     CSBADTYPE                I/O and memory interface not sup-
                                ported on socket.


     CSCONFIGURATIONLOCKED    csxRequestConfiguration()
                                already done.


     CSUNSUPORTEDFUNCTION    No PCMCIA hardware installed.


CONTEXT
     This function may be called from user or kernel context.

SEE ALSO
     csxAccessConfigurationRegister(9F),      csxGetStatus(9F),
     csxRegisterClient(9F),        csxReleaseConfiguration(9F),
     csxRequestIO(9F), csxRequestIRQ(9F)


     PC Card 95 Standard, PCMCIA/JEIDA










SunOS 5.11          Last change: 19 Jul 1996                    5



OpenSolaris man pages main menu

Contact us      |       About us      |       Term of use      |       Copyright © 2000-2010 MyWebUniversity.com ™