aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/pd6729.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/pd6729.c')
-rw-r--r--drivers/pcmcia/pd6729.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
index 20642f0e7bfe..e7a6d9ac5ed8 100644
--- a/drivers/pcmcia/pd6729.c
+++ b/drivers/pcmcia/pd6729.c
@@ -304,75 +304,6 @@ static int pd6729_get_status(struct pcmcia_socket *sock, u_int *value)
304} 304}
305 305
306 306
307static int pd6729_get_socket(struct pcmcia_socket *sock, socket_state_t *state)
308{
309 struct pd6729_socket *socket
310 = container_of(sock, struct pd6729_socket, socket);
311 unsigned char reg, vcc, vpp;
312
313 state->flags = 0;
314 state->Vcc = 0;
315 state->Vpp = 0;
316 state->io_irq = 0;
317 state->csc_mask = 0;
318
319 /* First the power status of the socket */
320 reg = indirect_read(socket, I365_POWER);
321
322 if (reg & I365_PWR_AUTO)
323 state->flags |= SS_PWR_AUTO; /* Automatic Power Switch */
324
325 if (reg & I365_PWR_OUT)
326 state->flags |= SS_OUTPUT_ENA; /* Output signals are enabled */
327
328 vcc = reg & I365_VCC_MASK; vpp = reg & I365_VPP1_MASK;
329
330 if (reg & I365_VCC_5V) {
331 state->Vcc = (indirect_read(socket, PD67_MISC_CTL_1) &
332 PD67_MC1_VCC_3V) ? 33 : 50;
333
334 if (vpp == I365_VPP1_5V) {
335 if (state->Vcc == 50)
336 state->Vpp = 50;
337 else
338 state->Vpp = 33;
339 }
340 if (vpp == I365_VPP1_12V)
341 state->Vpp = 120;
342 }
343
344 /* Now the IO card, RESET flags and IO interrupt */
345 reg = indirect_read(socket, I365_INTCTL);
346
347 if ((reg & I365_PC_RESET) == 0)
348 state->flags |= SS_RESET;
349 if (reg & I365_PC_IOCARD)
350 state->flags |= SS_IOCARD; /* This is an IO card */
351
352 /* Set the IRQ number */
353 state->io_irq = socket->card_irq;
354
355 /* Card status change */
356 reg = indirect_read(socket, I365_CSCINT);
357
358 if (reg & I365_CSC_DETECT)
359 state->csc_mask |= SS_DETECT; /* Card detect is enabled */
360
361 if (state->flags & SS_IOCARD) {/* IO Cards behave different */
362 if (reg & I365_CSC_STSCHG)
363 state->csc_mask |= SS_STSCHG;
364 } else {
365 if (reg & I365_CSC_BVD1)
366 state->csc_mask |= SS_BATDEAD;
367 if (reg & I365_CSC_BVD2)
368 state->csc_mask |= SS_BATWARN;
369 if (reg & I365_CSC_READY)
370 state->csc_mask |= SS_READY;
371 }
372
373 return 0;
374}
375
376static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state) 307static int pd6729_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
377{ 308{
378 struct pd6729_socket *socket 309 struct pd6729_socket *socket
@@ -640,7 +571,6 @@ static int pd6729_init(struct pcmcia_socket *sock)
640static struct pccard_operations pd6729_operations = { 571static struct pccard_operations pd6729_operations = {
641 .init = pd6729_init, 572 .init = pd6729_init,
642 .get_status = pd6729_get_status, 573 .get_status = pd6729_get_status,
643 .get_socket = pd6729_get_socket,
644 .set_socket = pd6729_set_socket, 574 .set_socket = pd6729_set_socket,
645 .set_io_map = pd6729_set_io_map, 575 .set_io_map = pd6729_set_io_map,
646 .set_mem_map = pd6729_set_mem_map, 576 .set_mem_map = pd6729_set_mem_map,