diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2005-11-12 17:56:33 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-01-05 17:41:09 -0500 |
commit | 9da4bc6d6a38c1c3d850c046d0aee324c1a2e52a (patch) | |
tree | 2783de4a280ece6707b9b5800b82e1149b4d4f48 /drivers/pcmcia/tcic.c | |
parent | 7f316b033b36adfbdf56bfb15c13de49798ab0b2 (diff) |
[PATCH] pcmcia: remove get_socket callback
The .get_socket callback is never used by the PCMCIA core, therefore remove
it.
Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/pcmcia/tcic.c')
-rw-r--r-- | drivers/pcmcia/tcic.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c index e31263864377..73bad1d5cb23 100644 --- a/drivers/pcmcia/tcic.c +++ b/drivers/pcmcia/tcic.c | |||
@@ -181,13 +181,6 @@ static void tcic_setl(u_char reg, u_int data) | |||
181 | outw(data >> 16, tcic_base+reg+2); | 181 | outw(data >> 16, tcic_base+reg+2); |
182 | } | 182 | } |
183 | 183 | ||
184 | static u_char tcic_aux_getb(u_short reg) | ||
185 | { | ||
186 | u_char mode = (tcic_getb(TCIC_MODE) & TCIC_MODE_PGMMASK) | reg; | ||
187 | tcic_setb(TCIC_MODE, mode); | ||
188 | return tcic_getb(TCIC_AUX); | ||
189 | } | ||
190 | |||
191 | static void tcic_aux_setb(u_short reg, u_char data) | 184 | static void tcic_aux_setb(u_short reg, u_char data) |
192 | { | 185 | { |
193 | u_char mode = (tcic_getb(TCIC_MODE) & TCIC_MODE_PGMMASK) | reg; | 186 | 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) | |||
641 | debug(1, "GetStatus(%d) = %#2.2x\n", psock, *value); | 634 | debug(1, "GetStatus(%d) = %#2.2x\n", psock, *value); |
642 | return 0; | 635 | return 0; |
643 | } /* tcic_get_status */ | 636 | } /* tcic_get_status */ |
644 | |||
645 | /*====================================================================*/ | ||
646 | |||
647 | static int tcic_get_socket(struct pcmcia_socket *sock, socket_state_t *state) | ||
648 | { | ||
649 | u_short psock = container_of(sock, struct tcic_socket, socket)->psock; | ||
650 | u_char reg; | ||
651 | u_short scf1, scf2; | ||
652 | |||
653 | tcic_setl(TCIC_ADDR, (psock << TCIC_ADDR_SS_SHFT) | ||
654 | | TCIC_ADDR_INDREG | TCIC_SCF1(psock)); | ||
655 | scf1 = tcic_getw(TCIC_DATA); | ||
656 | state->flags = (scf1 & TCIC_SCF1_IOSTS) ? SS_IOCARD : 0; | ||
657 | state->flags |= (scf1 & TCIC_SCF1_DMA_MASK) ? SS_DMA_MODE : 0; | ||
658 | state->flags |= (scf1 & TCIC_SCF1_SPKR) ? SS_SPKR_ENA : 0; | ||
659 | if (tcic_getb(TCIC_SCTRL) & TCIC_SCTRL_ENA) | ||
660 | state->flags |= SS_OUTPUT_ENA; | ||
661 | state->io_irq = scf1 & TCIC_SCF1_IRQ_MASK; | ||
662 | if (state->io_irq == 1) state->io_irq = 11; | ||
663 | |||
664 | reg = tcic_getb(TCIC_PWR); | ||
665 | state->Vcc = state->Vpp = 0; | ||
666 | if (reg & TCIC_PWR_VCC(psock)) { | ||
667 | if (reg & TCIC_PWR_VPP(psock)) | ||
668 | state->Vcc = 50; | ||
669 | else | ||
670 | state->Vcc = state->Vpp = 50; | ||
671 | } else { | ||
672 | if (reg & TCIC_PWR_VPP(psock)) { | ||
673 | state->Vcc = 50; | ||
674 | state->Vpp = 120; | ||
675 | } | ||
676 | } | ||
677 | reg = tcic_aux_getb(TCIC_AUX_ILOCK); | ||
678 | state->flags |= (reg & TCIC_ILOCK_CRESET) ? SS_RESET : 0; | ||
679 | |||
680 | /* Card status change interrupt mask */ | ||
681 | tcic_setw(TCIC_ADDR, TCIC_SCF2(psock)); | ||
682 | scf2 = tcic_getw(TCIC_DATA); | ||
683 | state->csc_mask = (scf2 & TCIC_SCF2_MCD) ? 0 : SS_DETECT; | ||
684 | if (state->flags & SS_IOCARD) { | ||
685 | state->csc_mask |= (scf2 & TCIC_SCF2_MLBAT1) ? 0 : SS_STSCHG; | ||
686 | } else { | ||
687 | state->csc_mask |= (scf2 & TCIC_SCF2_MLBAT1) ? 0 : SS_BATDEAD; | ||
688 | state->csc_mask |= (scf2 & TCIC_SCF2_MLBAT2) ? 0 : SS_BATWARN; | ||
689 | state->csc_mask |= (scf2 & TCIC_SCF2_MRDY) ? 0 : SS_READY; | ||
690 | } | ||
691 | |||
692 | debug(1, "GetSocket(%d) = flags %#3.3x, Vcc %d, Vpp %d, " | ||
693 | "io_irq %d, csc_mask %#2.2x\n", psock, state->flags, | ||
694 | state->Vcc, state->Vpp, state->io_irq, state->csc_mask); | ||
695 | return 0; | ||
696 | } /* tcic_get_socket */ | ||
697 | 637 | ||
698 | /*====================================================================*/ | 638 | /*====================================================================*/ |
699 | 639 | ||
@@ -874,7 +814,6 @@ static int tcic_init(struct pcmcia_socket *s) | |||
874 | static struct pccard_operations tcic_operations = { | 814 | static struct pccard_operations tcic_operations = { |
875 | .init = tcic_init, | 815 | .init = tcic_init, |
876 | .get_status = tcic_get_status, | 816 | .get_status = tcic_get_status, |
877 | .get_socket = tcic_get_socket, | ||
878 | .set_socket = tcic_set_socket, | 817 | .set_socket = tcic_set_socket, |
879 | .set_io_map = tcic_set_io_map, | 818 | .set_io_map = tcic_set_io_map, |
880 | .set_mem_map = tcic_set_mem_map, | 819 | .set_mem_map = tcic_set_mem_map, |