aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pcmcia/tcic.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pcmcia/tcic.c')
-rw-r--r--drivers/pcmcia/tcic.c29
1 files changed, 7 insertions, 22 deletions
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c
index 6918849d511e..12c49ee135e1 100644
--- a/drivers/pcmcia/tcic.c
+++ b/drivers/pcmcia/tcic.c
@@ -55,21 +55,6 @@
55#include <pcmcia/ss.h> 55#include <pcmcia/ss.h>
56#include "tcic.h" 56#include "tcic.h"
57 57
58#ifdef CONFIG_PCMCIA_DEBUG
59static int pc_debug;
60
61module_param(pc_debug, int, 0644);
62static const char version[] =
63"tcic.c 1.111 2000/02/15 04:13:12 (David Hinds)";
64
65#define debug(lvl, fmt, arg...) do { \
66 if (pc_debug > (lvl)) \
67 printk(KERN_DEBUG "tcic: " fmt , ## arg); \
68} while (0)
69#else
70#define debug(lvl, fmt, arg...) do { } while (0)
71#endif
72
73MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>"); 58MODULE_AUTHOR("David Hinds <dahinds@users.sourceforge.net>");
74MODULE_DESCRIPTION("Databook TCIC-2 PCMCIA socket driver"); 59MODULE_DESCRIPTION("Databook TCIC-2 PCMCIA socket driver");
75MODULE_LICENSE("Dual MPL/GPL"); 60MODULE_LICENSE("Dual MPL/GPL");
@@ -574,7 +559,7 @@ static irqreturn_t tcic_interrupt(int irq, void *dev)
574 } else 559 } else
575 active = 1; 560 active = 1;
576 561
577 debug(2, "tcic_interrupt()\n"); 562 pr_debug("tcic_interrupt()\n");
578 563
579 for (i = 0; i < sockets; i++) { 564 for (i = 0; i < sockets; i++) {
580 psock = socket_table[i].psock; 565 psock = socket_table[i].psock;
@@ -611,13 +596,13 @@ static irqreturn_t tcic_interrupt(int irq, void *dev)
611 } 596 }
612 active = 0; 597 active = 0;
613 598
614 debug(2, "interrupt done\n"); 599 pr_debug("interrupt done\n");
615 return IRQ_HANDLED; 600 return IRQ_HANDLED;
616} /* tcic_interrupt */ 601} /* tcic_interrupt */
617 602
618static void tcic_timer(u_long data) 603static void tcic_timer(u_long data)
619{ 604{
620 debug(2, "tcic_timer()\n"); 605 pr_debug("tcic_timer()\n");
621 tcic_timer_pending = 0; 606 tcic_timer_pending = 0;
622 tcic_interrupt(0, NULL); 607 tcic_interrupt(0, NULL);
623} /* tcic_timer */ 608} /* tcic_timer */
@@ -644,7 +629,7 @@ static int tcic_get_status(struct pcmcia_socket *sock, u_int *value)
644 reg = tcic_getb(TCIC_PWR); 629 reg = tcic_getb(TCIC_PWR);
645 if (reg & (TCIC_PWR_VCC(psock)|TCIC_PWR_VPP(psock))) 630 if (reg & (TCIC_PWR_VCC(psock)|TCIC_PWR_VPP(psock)))
646 *value |= SS_POWERON; 631 *value |= SS_POWERON;
647 debug(1, "GetStatus(%d) = %#2.2x\n", psock, *value); 632 dev_dbg(&sock->dev, "GetStatus(%d) = %#2.2x\n", psock, *value);
648 return 0; 633 return 0;
649} /* tcic_get_status */ 634} /* tcic_get_status */
650 635
@@ -656,7 +641,7 @@ static int tcic_set_socket(struct pcmcia_socket *sock, socket_state_t *state)
656 u_char reg; 641 u_char reg;
657 u_short scf1, scf2; 642 u_short scf1, scf2;
658 643
659 debug(1, "SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, " 644 dev_dbg(&sock->dev, "SetSocket(%d, flags %#3.3x, Vcc %d, Vpp %d, "
660 "io_irq %d, csc_mask %#2.2x)\n", psock, state->flags, 645 "io_irq %d, csc_mask %#2.2x)\n", psock, state->flags,
661 state->Vcc, state->Vpp, state->io_irq, state->csc_mask); 646 state->Vcc, state->Vpp, state->io_irq, state->csc_mask);
662 tcic_setw(TCIC_ADDR+2, (psock << TCIC_SS_SHFT) | TCIC_ADR2_INDREG); 647 tcic_setw(TCIC_ADDR+2, (psock << TCIC_SS_SHFT) | TCIC_ADR2_INDREG);
@@ -731,7 +716,7 @@ static int tcic_set_io_map(struct pcmcia_socket *sock, struct pccard_io_map *io)
731 u_int addr; 716 u_int addr;
732 u_short base, len, ioctl; 717 u_short base, len, ioctl;
733 718
734 debug(1, "SetIOMap(%d, %d, %#2.2x, %d ns, " 719 dev_dbg(&sock->dev, "SetIOMap(%d, %d, %#2.2x, %d ns, "
735 "%#llx-%#llx)\n", psock, io->map, io->flags, io->speed, 720 "%#llx-%#llx)\n", psock, io->map, io->flags, io->speed,
736 (unsigned long long)io->start, (unsigned long long)io->stop); 721 (unsigned long long)io->start, (unsigned long long)io->stop);
737 if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) || 722 if ((io->map > 1) || (io->start > 0xffff) || (io->stop > 0xffff) ||
@@ -768,7 +753,7 @@ static int tcic_set_mem_map(struct pcmcia_socket *sock, struct pccard_mem_map *m
768 u_short addr, ctl; 753 u_short addr, ctl;
769 u_long base, len, mmap; 754 u_long base, len, mmap;
770 755
771 debug(1, "SetMemMap(%d, %d, %#2.2x, %d ns, " 756 dev_dbg(&sock->dev, "SetMemMap(%d, %d, %#2.2x, %d ns, "
772 "%#llx-%#llx, %#x)\n", psock, mem->map, mem->flags, 757 "%#llx-%#llx, %#x)\n", psock, mem->map, mem->flags,
773 mem->speed, (unsigned long long)mem->res->start, 758 mem->speed, (unsigned long long)mem->res->start,
774 (unsigned long long)mem->res->end, mem->card_start); 759 (unsigned long long)mem->res->end, mem->card_start);