aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/vrc4173_cardu.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/vrc4173_cardu.c')
-rw-r--r--drivers/pcmcia/vrc4173_cardu.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c
index db91259dc50e..1b277d2c1c96 100644
--- a/drivers/pcmcia/vrc4173_cardu.c
+++ b/drivers/pcmcia/vrc4173_cardu.c
@@ -198,48 +198,6 @@ static int cardu_get_status(unsigned int sock, u_int *value)
198 return 0; 198 return 0;
199} 199}
200 200
201static inline u_char get_Vcc_value(uint8_t val)
202{
203 switch (val & VCC_MASK) {
204 case VCC_3V:
205 return 33;
206 case VCC_5V:
207 return 50;
208 }
209
210 return 0;
211}
212
213static inline u_char get_Vpp_value(uint8_t val)
214{
215 switch (val & VPP_MASK) {
216 case VPP_12V:
217 return 120;
218 case VPP_VCC:
219 return get_Vcc_value(val);
220 }
221
222 return 0;
223}
224
225static int cardu_get_socket(unsigned int sock, socket_state_t *state)
226{
227 vrc4173_socket_t *socket = &cardu_sockets[sock];
228 uint8_t val;
229
230 val = exca_readb(socket, PWR_CNT);
231 state->Vcc = get_Vcc_value(val);
232 state->Vpp = get_Vpp_value(val);
233 state->flags = 0;
234 if (val & CARD_OUT_EN) state->flags |= SS_OUTPUT_ENA;
235
236 val = exca_readb(socket, INT_GEN_CNT);
237 if (!(val & CARD_REST0)) state->flags |= SS_RESET;
238 if (val & CARD_TYPE_IO) state->flags |= SS_IOCARD;
239
240 return 0;
241}
242
243static inline uint8_t set_Vcc_value(u_char Vcc) 201static inline uint8_t set_Vcc_value(u_char Vcc)
244{ 202{
245 switch (Vcc) { 203 switch (Vcc) {
@@ -431,7 +389,6 @@ static struct pccard_operations cardu_operations = {
431 .register_callback = cardu_register_callback, 389 .register_callback = cardu_register_callback,
432 .inquire_socket = cardu_inquire_socket, 390 .inquire_socket = cardu_inquire_socket,
433 .get_status = cardu_get_status, 391 .get_status = cardu_get_status,
434 .get_socket = cardu_get_socket,
435 .set_socket = cardu_set_socket, 392 .set_socket = cardu_set_socket,
436 .get_io_map = cardu_get_io_map, 393 .get_io_map = cardu_get_io_map,
437 .set_io_map = cardu_set_io_map, 394 .set_io_map = cardu_set_io_map,