]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] pcmcia: remove get_socket callback
authorDominik Brodowski <linux@dominikbrodowski.net>
Sat, 12 Nov 2005 22:56:33 +0000 (23:56 +0100)
committerDominik Brodowski <linux@dominikbrodowski.net>
Thu, 5 Jan 2006 22:41:09 +0000 (23:41 +0100)
The .get_socket callback is never used by the PCMCIA core, therefore remove
it.

Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
15 files changed:
drivers/pcmcia/au1000_generic.c
drivers/pcmcia/hd64465_ss.c
drivers/pcmcia/i82092.c
drivers/pcmcia/i82092aa.h
drivers/pcmcia/i82365.c
drivers/pcmcia/m32r_cfc.c
drivers/pcmcia/m32r_pcc.c
drivers/pcmcia/m8xx_pcmcia.c
drivers/pcmcia/pd6729.c
drivers/pcmcia/soc_common.c
drivers/pcmcia/tcic.c
drivers/pcmcia/vrc4171_card.c
drivers/pcmcia/vrc4173_cardu.c
drivers/pcmcia/yenta_socket.c
include/pcmcia/ss.h

index 87302c548c24d437fa0722a01d2d832c7a7bdf38..0868b72c3996f07738b1febfcda9c0b1e9eae4d4 100644 (file)
@@ -241,23 +241,6 @@ au1x00_pcmcia_get_status(struct pcmcia_socket *sock, unsigned int *status)
        return 0;
 }
 
-/* au1x00_pcmcia_get_socket()
- * Implements the get_socket() operation for the in-kernel PCMCIA
- * service (formerly SS_GetSocket in Card Services). Not a very
- * exciting routine.
- *
- * Returns: 0
- */
-static int
-au1x00_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-  struct au1000_pcmcia_socket *skt = to_au1000_socket(sock);
-
-  debug("for sock %u\n", skt->nr);
-  *state = skt->cs_state;
-  return 0;
-}
-
 /* au1x00_pcmcia_set_socket()
  * Implements the set_socket() operation for the in-kernel PCMCIA
  * service (formerly SS_SetSocket in Card Services). We more or
@@ -352,7 +335,6 @@ static struct pccard_operations au1x00_pcmcia_operations = {
        .init                   = au1x00_pcmcia_sock_init,
        .suspend                = au1x00_pcmcia_suspend,
        .get_status             = au1x00_pcmcia_get_status,
-       .get_socket             = au1x00_pcmcia_get_socket,
        .set_socket             = au1x00_pcmcia_set_socket,
        .set_io_map             = au1x00_pcmcia_set_io_map,
        .set_mem_map            = au1x00_pcmcia_set_mem_map,
index 561706ba4499a8fc99eae63081b88212375d222c..b39435bbfaeb2aa3c3f14bbc34499f6a16046313 100644 (file)
@@ -417,18 +417,6 @@ static int hs_get_status(struct pcmcia_socket *s, u_int *value)
 
 /*============================================================*/
 
-static int hs_get_socket(struct pcmcia_socket *s, socket_state_t *state)
-{
-       hs_socket_t *sp = container_of(s, struct hs_socket_t, socket);
-
-       DPRINTK("hs_get_socket(%d)\n", sock);
-       
-       *state = sp->state;
-       return 0;
-}
-
-/*============================================================*/
-
 static int hs_set_socket(struct pcmcia_socket *s, socket_state_t *state)
 {
        hs_socket_t *sp = container_of(s, struct hs_socket_t, socket);
@@ -749,7 +737,6 @@ static irqreturn_t hs_interrupt(int irq, void *dev, struct pt_regs *regs)
 static struct pccard_operations hs_operations = {
        .init                   = hs_init,
        .get_status             = hs_get_status,
-       .get_socket             = hs_get_socket,
        .set_socket             = hs_set_socket,
        .set_io_map             = hs_set_io_map,
        .set_mem_map            = hs_set_mem_map,
index f3fdc748659d046da8cca204c22db34923254ff0..7979c85df3dc6472fe3d176b20be5ba8926285a7 100644 (file)
@@ -66,7 +66,6 @@ static struct pci_driver i82092aa_pci_drv = {
 static struct pccard_operations i82092aa_operations = {
        .init                   = i82092aa_init,
        .get_status             = i82092aa_get_status,
-       .get_socket             = i82092aa_get_socket,
        .set_socket             = i82092aa_set_socket,
        .set_io_map             = i82092aa_set_io_map,
        .set_mem_map            = i82092aa_set_mem_map,
@@ -482,78 +481,6 @@ static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value)
 }
 
 
-static int i82092aa_get_socket(struct pcmcia_socket *socket, socket_state_t *state) 
-{
-       unsigned int sock = container_of(socket, struct socket_info, socket)->number;
-       unsigned char reg,vcc,vpp;
-       
-       enter("i82092aa_get_socket");
-       state->flags    = 0;
-       state->Vcc      = 0;
-       state->Vpp      = 0;
-       state->io_irq   = 0;
-       state->csc_mask = 0;
-
-       /* First the power status of the socket */
-       reg = indirect_read(sock,I365_POWER); /* PCTRL - Power Control Register */
-
-       if (reg & I365_PWR_AUTO)
-               state->flags |= SS_PWR_AUTO;  /* Automatic Power Switch */
-               
-       if (reg & I365_PWR_OUT)
-               state->flags |= SS_OUTPUT_ENA; /* Output signals are enabled */
-               
-       vcc = reg & I365_VCC_MASK;    vpp = reg & I365_VPP1_MASK;
-       
-       if (reg & I365_VCC_5V) { /* Can still be 3.3V, in this case the Vcc value will be overwritten later */
-               state->Vcc = 50;
-               
-               if (vpp == I365_VPP1_5V)
-                       state->Vpp = 50;
-               if (vpp == I365_VPP1_12V)
-                       state->Vpp = 120;
-                       
-       }
-       
-       if ((reg & I365_VCC_3V)==I365_VCC_3V)
-               state->Vcc = 33;
-       
-       
-       /* Now the IO card, RESET flags and IO interrupt */
-       
-       reg = indirect_read(sock, I365_INTCTL); /* IGENC, Interrupt and General Control */
-       
-       if ((reg & I365_PC_RESET)==0)
-               state->flags |= SS_RESET;
-       if (reg & I365_PC_IOCARD) 
-               state->flags |= SS_IOCARD; /* This is an IO card */
-       
-       /* Set the IRQ number */
-       if (sockets[sock].dev!=NULL)
-               state->io_irq = sockets[sock].dev->irq;
-       
-       /* Card status change */
-       reg = indirect_read(sock, I365_CSCINT); /* CSCICR, Card Status Change Interrupt Configuration */
-       
-       if (reg & I365_CSC_DETECT) 
-               state->csc_mask |= SS_DETECT; /* Card detect is enabled */
-       
-       if (state->flags & SS_IOCARD) {/* IO Cards behave different */
-               if (reg & I365_CSC_STSCHG)
-                       state->csc_mask |= SS_STSCHG;
-       } else {
-               if (reg & I365_CSC_BVD1) 
-                       state->csc_mask |= SS_BATDEAD;
-               if (reg & I365_CSC_BVD2) 
-                       state->csc_mask |= SS_BATWARN;
-               if (reg & I365_CSC_READY) 
-                       state->csc_mask |= SS_READY;
-       }
-               
-       leave("i82092aa_get_socket");
-       return 0;
-}
-
 static int i82092aa_set_socket(struct pcmcia_socket *socket, socket_state_t *state) 
 {
        unsigned int sock = container_of(socket, struct socket_info, socket)->number;
index b98cac7bda9f559c9afb11938cdb857d4dca792d..9c14599d06737371262f754f09c9811cd7052c61 100644 (file)
@@ -29,7 +29,6 @@ static irqreturn_t i82092aa_interrupt(int irq, void *dev, struct pt_regs *regs);
 
 
 static int i82092aa_get_status(struct pcmcia_socket *socket, u_int *value);
-static int i82092aa_get_socket(struct pcmcia_socket *socket, socket_state_t *state);
 static int i82092aa_set_socket(struct pcmcia_socket *socket, socket_state_t *state);
 static int i82092aa_set_io_map(struct pcmcia_socket *socket, struct pccard_io_map *io);
 static int i82092aa_set_mem_map(struct pcmcia_socket *socket, struct pccard_mem_map *mem);
index 4d56bc9926d691cd99a2af5e24e02f0ad3946d8c..35a92d1e4945be16f89f514717d983263b74ce20 100644 (file)
@@ -940,78 +940,6 @@ static int i365_get_status(u_short sock, u_int *value)
 
 /*====================================================================*/
 
-static int i365_get_socket(u_short sock, socket_state_t *state)
-{
-    struct i82365_socket *t = &socket[sock];
-    u_char reg, vcc, vpp;
-    
-    reg = i365_get(sock, I365_POWER);
-    state->flags = (reg & I365_PWR_AUTO) ? SS_PWR_AUTO : 0;
-    state->flags |= (reg & I365_PWR_OUT) ? SS_OUTPUT_ENA : 0;
-    vcc = reg & I365_VCC_MASK; vpp = reg & I365_VPP1_MASK;
-    state->Vcc = state->Vpp = 0;
-    if (t->flags & IS_CIRRUS) {
-       if (i365_get(sock, PD67_MISC_CTL_1) & PD67_MC1_VCC_3V) {
-           if (reg & I365_VCC_5V) state->Vcc = 33;
-           if (vpp == I365_VPP1_5V) state->Vpp = 33;
-       } else {
-           if (reg & I365_VCC_5V) state->Vcc = 50;
-           if (vpp == I365_VPP1_5V) state->Vpp = 50;
-       }
-       if (vpp == I365_VPP1_12V) state->Vpp = 120;
-    } else if (t->flags & IS_VG_PWR) {
-       if (i365_get(sock, VG469_VSELECT) & VG469_VSEL_VCC) {
-           if (reg & I365_VCC_5V) state->Vcc = 33;
-           if (vpp == I365_VPP1_5V) state->Vpp = 33;
-       } else {
-           if (reg & I365_VCC_5V) state->Vcc = 50;
-           if (vpp == I365_VPP1_5V) state->Vpp = 50;
-       }
-       if (vpp == I365_VPP1_12V) state->Vpp = 120;
-    } else if (t->flags & IS_DF_PWR) {
-       if (vcc == I365_VCC_3V) state->Vcc = 33;
-       if (vcc == I365_VCC_5V) state->Vcc = 50;
-       if (vpp == I365_VPP1_5V) state->Vpp = 50;
-       if (vpp == I365_VPP1_12V) state->Vpp = 120;
-    } else {
-       if (reg & I365_VCC_5V) {
-           state->Vcc = 50;
-           if (vpp == I365_VPP1_5V) state->Vpp = 50;
-           if (vpp == I365_VPP1_12V) state->Vpp = 120;
-       }
-    }
-
-    /* IO card, RESET flags, IO interrupt */
-    reg = i365_get(sock, I365_INTCTL);
-    state->flags |= (reg & I365_PC_RESET) ? 0 : SS_RESET;
-    if (reg & I365_PC_IOCARD) state->flags |= SS_IOCARD;
-    state->io_irq = reg & I365_IRQ_MASK;
-    
-    /* speaker control */
-    if (t->flags & IS_CIRRUS) {
-       if (i365_get(sock, PD67_MISC_CTL_1) & PD67_MC1_SPKR_ENA)
-           state->flags |= SS_SPKR_ENA;
-    }
-    
-    /* Card status change mask */
-    reg = i365_get(sock, I365_CSCINT);
-    state->csc_mask = (reg & I365_CSC_DETECT) ? SS_DETECT : 0;
-    if (state->flags & SS_IOCARD)
-       state->csc_mask |= (reg & I365_CSC_STSCHG) ? SS_STSCHG : 0;
-    else {
-       state->csc_mask |= (reg & I365_CSC_BVD1) ? SS_BATDEAD : 0;
-       state->csc_mask |= (reg & I365_CSC_BVD2) ? SS_BATWARN : 0;
-       state->csc_mask |= (reg & I365_CSC_READY) ? SS_READY : 0;
-    }
-    
-    debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
-         "io_irq %d, csc_mask %#2.2x\n", sock, state->flags,
-         state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
-    return 0;
-} /* i365_get_socket */
-
-/*====================================================================*/
-
 static int i365_set_socket(u_short sock, socket_state_t *state)
 {
     struct i82365_socket *t = &socket[sock];
@@ -1265,16 +1193,6 @@ static int pcic_get_status(struct pcmcia_socket *s, u_int *value)
        LOCKED(i365_get_status(sock, value));
 }
 
-static int pcic_get_socket(struct pcmcia_socket *s, socket_state_t *state)
-{
-       unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
-
-       if (socket[sock].flags & IS_ALIVE)
-               return -EINVAL;
-
-       LOCKED(i365_get_socket(sock, state));
-}
-
 static int pcic_set_socket(struct pcmcia_socket *s, socket_state_t *state)
 {
        unsigned int sock = container_of(s, struct i82365_socket, socket)->number;
@@ -1324,7 +1242,6 @@ static int pcic_init(struct pcmcia_socket *s)
 static struct pccard_operations pcic_operations = {
        .init                   = pcic_init,
        .get_status             = pcic_get_status,
-       .get_socket             = pcic_get_socket,
        .set_socket             = pcic_set_socket,
        .set_io_map             = pcic_set_io_map,
        .set_mem_map            = pcic_set_mem_map,
index 078579ae635905477212d8894414b6e0be86c204..071cf485e1a391c88893e6cb8c871444004d6d1c 100644 (file)
@@ -480,25 +480,6 @@ static int _pcc_get_status(u_short sock, u_int *value)
 
 /*====================================================================*/
 
-static int _pcc_get_socket(u_short sock, socket_state_t *state)
-{
-//     pcc_socket_t *t = &socket[sock];
-
-       state->flags = 0;
-       state->csc_mask = SS_DETECT;
-       state->csc_mask |= SS_READY;
-       state->io_irq = 0;
-       state->Vcc = 33;        /* 3.3V fixed */
-       state->Vpp = 33;
-
-       debug(3, "m32r_cfc: GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
-                 "io_irq %d, csc_mask %#2.2x\n", sock, state->flags,
-                 state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
-       return 0;
-} /* _get_socket */
-
-/*====================================================================*/
-
 static int _pcc_set_socket(u_short sock, socket_state_t *state)
 {
        debug(3, "m32r_cfc: SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
@@ -667,18 +648,6 @@ static int pcc_get_status(struct pcmcia_socket *s, u_int *value)
        LOCKED(_pcc_get_status(sock, value));
 }
 
-static int pcc_get_socket(struct pcmcia_socket *s, socket_state_t *state)
-{
-       unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
-
-       if (socket[sock].flags & IS_ALIVE) {
-               debug(3, "m32r_cfc: pcc_get_socket: sock(%d) -EINVAL\n", sock);
-               return -EINVAL;
-       }
-       debug(3, "m32r_cfc: pcc_get_socket: sock(%d)\n", sock);
-       LOCKED(_pcc_get_socket(sock, state));
-}
-
 static int pcc_set_socket(struct pcmcia_socket *s, socket_state_t *state)
 {
        unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
@@ -724,7 +693,6 @@ static int pcc_init(struct pcmcia_socket *s)
 static struct pccard_operations pcc_operations = {
        .init                   = pcc_init,
        .get_status             = pcc_get_status,
-       .get_socket             = pcc_get_socket,
        .set_socket             = pcc_set_socket,
        .set_io_map             = pcc_set_io_map,
        .set_mem_map            = pcc_set_mem_map,
index 356a6fb416a14010c86c43df9927088038085a50..70d5f0748d559fcb6abc63784e5546cbcfb0a5e1 100644 (file)
@@ -429,16 +429,6 @@ static int _pcc_get_status(u_short sock, u_int *value)
 
 /*====================================================================*/
 
-static int _pcc_get_socket(u_short sock, socket_state_t *state)
-{
-       debug(3, "m32r-pcc: GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
-                 "io_irq %d, csc_mask %#2.2x\n", sock, state->flags,
-                 state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
-       return 0;
-} /* _get_socket */
-
-/*====================================================================*/
-
 static int _pcc_set_socket(u_short sock, socket_state_t *state)
 {
        u_long reg = 0;
@@ -641,15 +631,6 @@ static int pcc_get_status(struct pcmcia_socket *s, u_int *value)
        LOCKED(_pcc_get_status(sock, value));
 }
 
-static int pcc_get_socket(struct pcmcia_socket *s, socket_state_t *state)
-{
-       unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
-
-       if (socket[sock].flags & IS_ALIVE)
-               return -EINVAL;
-       LOCKED(_pcc_get_socket(sock, state));
-}
-
 static int pcc_set_socket(struct pcmcia_socket *s, socket_state_t *state)
 {
        unsigned int sock = container_of(s, struct pcc_socket, socket)->number;
@@ -687,7 +668,6 @@ static int pcc_init(struct pcmcia_socket *s)
 static struct pccard_operations pcc_operations = {
        .init                   = pcc_init,
        .get_status             = pcc_get_status,
-       .get_socket             = pcc_get_socket,
        .set_socket             = pcc_set_socket,
        .set_io_map             = pcc_set_io_map,
        .set_mem_map            = pcc_set_mem_map,
index 6d9f71cfcb340d110f768ccc8628cd91f566e561..a7f27c3dfc242fd192f2c848591991b495064f2c 100644 (file)
@@ -823,17 +823,6 @@ static int m8xx_get_status(struct pcmcia_socket *sock, unsigned int *value)
        return 0;
 }
 
-static int m8xx_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-       int lsock = container_of(sock, struct socket_info, socket)->slot;
-       *state = socket[lsock].state; /* copy the whole structure */
-
-       dprintk("GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
-             "io_irq %d, csc_mask %#2.2x\n", lsock, state->flags,
-             state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
-       return 0;
-}
-
 static int m8xx_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
 {
        int lsock = container_of(sock, struct socket_info, socket)->slot;
@@ -1169,7 +1158,6 @@ static struct pccard_operations m8xx_services = {
        .init   = m8xx_sock_init,
        .suspend = m8xx_suspend,
        .get_status = m8xx_get_status,
-       .get_socket = m8xx_get_socket,
        .set_socket = m8xx_set_socket,
        .set_io_map = m8xx_set_io_map,
        .set_mem_map = m8xx_set_mem_map,
index 20642f0e7bfe85f1b252099e18420d48a0b7c1b4..e7a6d9ac5ed8a9feebb8060d7038eba9a617b62b 100644 (file)
@@ -304,75 +304,6 @@ static int pd6729_get_status(struct pcmcia_socket *sock, u_int *value)
 }
 
 
-static int pd6729_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-       struct pd6729_socket *socket
-                       = container_of(sock, struct pd6729_socket, socket);
-       unsigned char reg, vcc, vpp;
-
-       state->flags    = 0;
-       state->Vcc      = 0;
-       state->Vpp      = 0;
-       state->io_irq   = 0;
-       state->csc_mask = 0;
-
-       /* First the power status of the socket */
-       reg = indirect_read(socket, I365_POWER);
-
-       if (reg & I365_PWR_AUTO)
-               state->flags |= SS_PWR_AUTO;  /* Automatic Power Switch */
-
-       if (reg & I365_PWR_OUT)
-               state->flags |= SS_OUTPUT_ENA; /* Output signals are enabled */
-
-       vcc = reg & I365_VCC_MASK;    vpp = reg & I365_VPP1_MASK;
-
-       if (reg & I365_VCC_5V) {
-               state->Vcc = (indirect_read(socket, PD67_MISC_CTL_1) &
-                       PD67_MC1_VCC_3V) ? 33 : 50;
-
-               if (vpp == I365_VPP1_5V) {
-                       if (state->Vcc == 50)
-                               state->Vpp = 50;
-                       else
-                               state->Vpp = 33;
-               }
-               if (vpp == I365_VPP1_12V)
-                       state->Vpp = 120;
-       }
-
-       /* Now the IO card, RESET flags and IO interrupt */
-       reg = indirect_read(socket, I365_INTCTL);
-
-       if ((reg & I365_PC_RESET) == 0)
-               state->flags |= SS_RESET;
-       if (reg & I365_PC_IOCARD)
-               state->flags |= SS_IOCARD; /* This is an IO card */
-
-       /* Set the IRQ number */
-       state->io_irq = socket->card_irq;
-
-       /* Card status change */
-       reg = indirect_read(socket, I365_CSCINT);
-
-       if (reg & I365_CSC_DETECT)
-               state->csc_mask |= SS_DETECT; /* Card detect is enabled */
-
-       if (state->flags & SS_IOCARD) {/* IO Cards behave different */
-               if (reg & I365_CSC_STSCHG)
-                       state->csc_mask |= SS_STSCHG;
-       } else {
-               if (reg & I365_CSC_BVD1)
-                       state->csc_mask |= SS_BATDEAD;
-               if (reg & I365_CSC_BVD2)
-                       state->csc_mask |= SS_BATWARN;
-               if (reg & I365_CSC_READY)
-                       state->csc_mask |= SS_READY;
-       }
-
-       return 0;
-}
-
 static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
 {
        struct pd6729_socket *socket
@@ -640,7 +571,6 @@ static int pd6729_init(struct pcmcia_socket *sock)
 static struct pccard_operations pd6729_operations = {
        .init                   = pd6729_init,
        .get_status             = pd6729_get_status,
-       .get_socket             = pd6729_get_socket,
        .set_socket             = pd6729_set_socket,
        .set_io_map             = pd6729_set_io_map,
        .set_mem_map            = pd6729_set_mem_map,
index 9e7ccd8a4321643b0361f498d58f37b93398083e..a563bd9a889868744e0aeea887a4340f2adafc42 100644 (file)
@@ -296,25 +296,6 @@ soc_common_pcmcia_get_status(struct pcmcia_socket *sock, unsigned int *status)
 }
 
 
-/*
- * Implements the get_socket() operation for the in-kernel PCMCIA
- * service (formerly SS_GetSocket in Card Services). Not a very
- * exciting routine.
- *
- * Returns: 0
- */
-static int
-soc_common_pcmcia_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-       struct soc_pcmcia_socket *skt = to_soc_pcmcia_socket(sock);
-
-       debug(skt, 2, "\n");
-
-       *state = skt->cs_state;
-
-       return 0;
-}
-
 /*
  * Implements the set_socket() operation for the in-kernel PCMCIA
  * service (formerly SS_SetSocket in Card Services). We more or
@@ -528,7 +509,6 @@ static struct pccard_operations soc_common_pcmcia_operations = {
        .init                   = soc_common_pcmcia_sock_init,
        .suspend                = soc_common_pcmcia_suspend,
        .get_status             = soc_common_pcmcia_get_status,
-       .get_socket             = soc_common_pcmcia_get_socket,
        .set_socket             = soc_common_pcmcia_set_socket,
        .set_io_map             = soc_common_pcmcia_set_io_map,
        .set_mem_map            = soc_common_pcmcia_set_mem_map,
index e312638643771c27bb75ce8f81c823b809a51a2b..73bad1d5cb23d8660b803f9933a026dd36ad530a 100644 (file)
@@ -181,13 +181,6 @@ static void tcic_setl(u_char reg, u_int data)
     outw(data >> 16, tcic_base+reg+2);
 }
 
-static u_char tcic_aux_getb(u_short reg)
-{
-    u_char mode = (tcic_getb(TCIC_MODE) & TCIC_MODE_PGMMASK) | reg;
-    tcic_setb(TCIC_MODE, mode);
-    return tcic_getb(TCIC_AUX);
-}
-
 static void tcic_aux_setb(u_short reg, u_char data)
 {
     u_char mode = (tcic_getb(TCIC_MODE) & TCIC_MODE_PGMMASK) | reg;
@@ -641,59 +634,6 @@ static int tcic_get_status(struct pcmcia_socket *sock, u_int *value)
     debug(1, "GetStatus(%d) = %#2.2x\n", psock, *value);
     return 0;
 } /* tcic_get_status */
-  
-/*====================================================================*/
-
-static int tcic_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-    u_short psock = container_of(sock, struct tcic_socket, socket)->psock;
-    u_char reg;
-    u_short scf1, scf2;
-    
-    tcic_setl(TCIC_ADDR, (psock << TCIC_ADDR_SS_SHFT)
-             | TCIC_ADDR_INDREG | TCIC_SCF1(psock));
-    scf1 = tcic_getw(TCIC_DATA);
-    state->flags = (scf1 & TCIC_SCF1_IOSTS) ? SS_IOCARD : 0;
-    state->flags |= (scf1 & TCIC_SCF1_DMA_MASK) ? SS_DMA_MODE : 0;
-    state->flags |= (scf1 & TCIC_SCF1_SPKR) ? SS_SPKR_ENA : 0;
-    if (tcic_getb(TCIC_SCTRL) & TCIC_SCTRL_ENA)
-       state->flags |= SS_OUTPUT_ENA;
-    state->io_irq = scf1 & TCIC_SCF1_IRQ_MASK;
-    if (state->io_irq == 1) state->io_irq = 11;
-
-    reg = tcic_getb(TCIC_PWR);
-    state->Vcc = state->Vpp = 0;
-    if (reg & TCIC_PWR_VCC(psock)) {
-       if (reg & TCIC_PWR_VPP(psock))
-           state->Vcc = 50;
-       else
-           state->Vcc = state->Vpp = 50;
-    } else {
-       if (reg & TCIC_PWR_VPP(psock)) {
-           state->Vcc = 50;
-           state->Vpp = 120;
-       }
-    }
-    reg = tcic_aux_getb(TCIC_AUX_ILOCK);
-    state->flags |= (reg & TCIC_ILOCK_CRESET) ? SS_RESET : 0;
-
-    /* Card status change interrupt mask */
-    tcic_setw(TCIC_ADDR, TCIC_SCF2(psock));
-    scf2 = tcic_getw(TCIC_DATA);
-    state->csc_mask = (scf2 & TCIC_SCF2_MCD) ? 0 : SS_DETECT;
-    if (state->flags & SS_IOCARD) {
-       state->csc_mask |= (scf2 & TCIC_SCF2_MLBAT1) ? 0 : SS_STSCHG;
-    } else {
-       state->csc_mask |= (scf2 & TCIC_SCF2_MLBAT1) ? 0 : SS_BATDEAD;
-       state->csc_mask |= (scf2 & TCIC_SCF2_MLBAT2) ? 0 : SS_BATWARN;
-       state->csc_mask |= (scf2 & TCIC_SCF2_MRDY) ? 0 : SS_READY;
-    }
-
-    debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, "
-         "io_irq %d, csc_mask %#2.2x\n", psock, state->flags,
-         state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
-    return 0;
-} /* tcic_get_socket */
 
 /*====================================================================*/
 
@@ -874,7 +814,6 @@ static int tcic_init(struct pcmcia_socket *s)
 static struct pccard_operations tcic_operations = {
        .init              = tcic_init,
        .get_status        = tcic_get_status,
-       .get_socket        = tcic_get_socket,
        .set_socket        = tcic_set_socket,
        .set_io_map        = tcic_set_io_map,
        .set_mem_map       = tcic_set_mem_map,
index 38a028c725d47e0aaebe529a6a33ff1e24710357..24c547ef512b475ae652f759dae8a38008d2a34a 100644 (file)
@@ -301,75 +301,6 @@ static int pccard_get_status(struct pcmcia_socket *sock, u_int *value)
        return 0;
 }
 
-static inline u_char get_Vcc_value(uint8_t voltage)
-{
-       switch (voltage) {
-       case VCC_STATUS_3V:
-               return 33;
-       case VCC_STATUS_5V:
-               return 50;
-       default:
-               break;
-       }
-
-       return 0;
-}
-
-static inline u_char get_Vpp_value(uint8_t power, u_char Vcc)
-{
-       if ((power & 0x03) == 0x01 || (power & 0x03) == 0x02)
-               return Vcc;
-
-       return 0;
-}
-
-static int pccard_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-       unsigned int slot;
-       uint8_t power, voltage, control, cscint;
-
-       if (sock == NULL || sock->sock >= CARD_MAX_SLOTS || state == NULL)
-               return -EINVAL;
-
-       slot = sock->sock;
-
-       power = exca_read_byte(slot, I365_POWER);
-       voltage = exca_read_byte(slot, CARD_VOLTAGE_SELECT);
-
-       state->Vcc = get_Vcc_value(voltage);
-       state->Vpp = get_Vpp_value(power, state->Vcc);
-
-       state->flags = 0;
-       if (power & POWER_ENABLE)
-               state->flags |= SS_PWR_AUTO;
-       if (power & I365_PWR_OUT)
-               state->flags |= SS_OUTPUT_ENA;
-
-       control = exca_read_byte(slot, I365_INTCTL);
-       if (control & I365_PC_IOCARD)
-               state->flags |= SS_IOCARD;
-       if (!(control & I365_PC_RESET))
-               state->flags |= SS_RESET;
-
-        cscint = exca_read_byte(slot, I365_CSCINT);
-       state->csc_mask = 0;
-       if (state->flags & SS_IOCARD) {
-               if (cscint & I365_CSC_STSCHG)
-                       state->flags |= SS_STSCHG;
-       } else {
-               if (cscint & I365_CSC_BVD1)
-                       state->csc_mask |= SS_BATDEAD;
-               if (cscint & I365_CSC_BVD2)
-                       state->csc_mask |= SS_BATWARN;
-       }
-       if (cscint & I365_CSC_READY)
-               state->csc_mask |= SS_READY;
-       if (cscint & I365_CSC_DETECT)
-               state->csc_mask |= SS_DETECT;
-
-       return 0;
-}
-
 static inline uint8_t set_Vcc_value(u_char Vcc)
 {
        switch (Vcc) {
@@ -551,7 +482,6 @@ static int pccard_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map
 static struct pccard_operations vrc4171_pccard_operations = {
        .init                   = pccard_init,
        .get_status             = pccard_get_status,
-       .get_socket             = pccard_get_socket,
        .set_socket             = pccard_set_socket,
        .set_io_map             = pccard_set_io_map,
        .set_mem_map            = pccard_set_mem_map,
index db91259dc50eb33d0cd3480d01ffa3152a170cf9..1b277d2c1c96d9c5d57cdf7c8d134a125b3edd6e 100644 (file)
@@ -198,48 +198,6 @@ static int cardu_get_status(unsigned int sock, u_int *value)
        return 0;
 }
 
-static inline u_char get_Vcc_value(uint8_t val)
-{
-       switch (val & VCC_MASK) {
-       case VCC_3V:
-               return 33;
-       case VCC_5V:
-               return 50;
-       }
-
-       return 0;
-}
-
-static inline u_char get_Vpp_value(uint8_t val)
-{
-       switch (val & VPP_MASK) {
-       case VPP_12V:
-               return 120;
-       case VPP_VCC:
-               return get_Vcc_value(val);
-       }
-
-       return 0;
-}
-
-static int cardu_get_socket(unsigned int sock, socket_state_t *state)
-{
-       vrc4173_socket_t *socket = &cardu_sockets[sock];
-       uint8_t val;
-
-       val = exca_readb(socket, PWR_CNT);
-       state->Vcc = get_Vcc_value(val);
-       state->Vpp = get_Vpp_value(val);
-       state->flags = 0;
-       if (val & CARD_OUT_EN) state->flags |= SS_OUTPUT_ENA;
-
-       val = exca_readb(socket, INT_GEN_CNT);
-       if (!(val & CARD_REST0)) state->flags |= SS_RESET;
-       if (val & CARD_TYPE_IO) state->flags |= SS_IOCARD;
-
-       return 0;
-}
-
 static inline uint8_t set_Vcc_value(u_char Vcc)
 {
        switch (Vcc) {
@@ -431,7 +389,6 @@ static struct pccard_operations cardu_operations = {
        .register_callback      = cardu_register_callback,
        .inquire_socket         = cardu_inquire_socket,
        .get_status             = cardu_get_status,
-       .get_socket             = cardu_get_socket,
        .set_socket             = cardu_set_socket,
        .get_io_map             = cardu_get_io_map,
        .set_io_map             = cardu_set_io_map,
index 8bfe72b713028ee14b89ad81ec7f11aae525d26a..fa0625c438dce3b192038bb70d682bd65f4a2cd9 100644 (file)
@@ -224,95 +224,6 @@ static int yenta_get_status(struct pcmcia_socket *sock, unsigned int *value)
        return 0;
 }
 
-static void yenta_get_power(struct yenta_socket *socket, socket_state_t *state)
-{
-       if (!(cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) &&
-           (socket->flags & YENTA_16BIT_POWER_EXCA)) {
-               u8 reg, vcc, vpp;
-
-               reg = exca_readb(socket, I365_POWER);
-               vcc = reg & I365_VCC_MASK;
-               vpp = reg & I365_VPP1_MASK;
-               state->Vcc = state->Vpp = 0;
-
-               if (socket->flags & YENTA_16BIT_POWER_DF) {
-                       if (vcc == I365_VCC_3V)
-                               state->Vcc = 33;
-                       if (vcc == I365_VCC_5V)
-                               state->Vcc = 50;
-                       if (vpp == I365_VPP1_5V)
-                               state->Vpp = state->Vcc;
-                       if (vpp == I365_VPP1_12V)
-                               state->Vpp = 120;
-               } else {
-                       if (reg & I365_VCC_5V) {
-                               state->Vcc = 50;
-                               if (vpp == I365_VPP1_5V)
-                                       state->Vpp = 50;
-                               if (vpp == I365_VPP1_12V)
-                                       state->Vpp = 120;
-                       }
-               }
-       } else {
-               u32 control;
-
-               control = cb_readl(socket, CB_SOCKET_CONTROL);
-
-               switch (control & CB_SC_VCC_MASK) {
-               case CB_SC_VCC_5V: state->Vcc = 50; break;
-               case CB_SC_VCC_3V: state->Vcc = 33; break;
-               default: state->Vcc = 0;
-               }
-
-               switch (control & CB_SC_VPP_MASK) {
-               case CB_SC_VPP_12V: state->Vpp = 120; break;
-               case CB_SC_VPP_5V: state->Vpp = 50; break;
-               case CB_SC_VPP_3V: state->Vpp = 33; break;
-               default: state->Vpp = 0;
-               }
-       }
-}
-
-static int yenta_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
-{
-       struct yenta_socket *socket = container_of(sock, struct yenta_socket, socket);
-       u8 reg;
-       u32 control;
-
-       control = cb_readl(socket, CB_SOCKET_CONTROL);
-
-       yenta_get_power(socket, state);
-       state->io_irq = socket->io_irq;
-
-       if (cb_readl(socket, CB_SOCKET_STATE) & CB_CBCARD) {
-               u16 bridge = config_readw(socket, CB_BRIDGE_CONTROL);
-               if (bridge & CB_BRIDGE_CRST)
-                       state->flags |= SS_RESET;
-               return 0;
-       }
-
-       /* 16-bit card state.. */
-       reg = exca_readb(socket, I365_POWER);
-       state->flags = (reg & I365_PWR_AUTO) ? SS_PWR_AUTO : 0;
-       state->flags |= (reg & I365_PWR_OUT) ? SS_OUTPUT_ENA : 0;
-
-       reg = exca_readb(socket, I365_INTCTL);
-       state->flags |= (reg & I365_PC_RESET) ? 0 : SS_RESET;
-       state->flags |= (reg & I365_PC_IOCARD) ? SS_IOCARD : 0;
-
-       reg = exca_readb(socket, I365_CSCINT);
-       state->csc_mask = (reg & I365_CSC_DETECT) ? SS_DETECT : 0;
-       if (state->flags & SS_IOCARD) {
-               state->csc_mask |= (reg & I365_CSC_STSCHG) ? SS_STSCHG : 0;
-       } else {
-               state->csc_mask |= (reg & I365_CSC_BVD1) ? SS_BATDEAD : 0;
-               state->csc_mask |= (reg & I365_CSC_BVD2) ? SS_BATWARN : 0;
-               state->csc_mask |= (reg & I365_CSC_READY) ? SS_READY : 0;
-       }
-
-       return 0;
-}
-
 static void yenta_set_power(struct yenta_socket *socket, socket_state_t *state)
 {
        /* some birdges require to use the ExCA registers to power 16bit cards */
@@ -828,7 +739,6 @@ static struct pccard_operations yenta_socket_operations = {
        .init                   = yenta_sock_init,
        .suspend                = yenta_sock_suspend,
        .get_status             = yenta_get_status,
-       .get_socket             = yenta_get_socket,
        .set_socket             = yenta_set_socket,
        .set_io_map             = yenta_set_io_map,
        .set_mem_map            = yenta_set_mem_map,
index 25e6bf05e25c648eedd81797329aac0072cc78b4..9f7dab8db9840a798e1cfa1448eaa84bfb5ae178 100644 (file)
@@ -119,7 +119,6 @@ struct pccard_operations {
        int (*init)(struct pcmcia_socket *sock);
        int (*suspend)(struct pcmcia_socket *sock);
        int (*get_status)(struct pcmcia_socket *sock, u_int *value);
-       int (*get_socket)(struct pcmcia_socket *sock, socket_state_t *state);
        int (*set_socket)(struct pcmcia_socket *sock, socket_state_t *state);
        int (*set_io_map)(struct pcmcia_socket *sock, struct pccard_io_map *io);
        int (*set_mem_map)(struct pcmcia_socket *sock, struct pccard_mem_map *mem);