Commit 18234f88 authored by Jiri Slaby's avatar Jiri Slaby Committed by Linus Torvalds

[PATCH] Char: isicom, remove isa code

ISA is not supported by this driver, remove parts, that take care of this.
Signed-off-by: default avatarJiri Slaby <jirislaby@gmail.com>
Acked-by: default avatarAlan Cox <alan@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ca262005
...@@ -193,7 +193,6 @@ struct isi_board { ...@@ -193,7 +193,6 @@ struct isi_board {
unsigned short shift_count; unsigned short shift_count;
struct isi_port * ports; struct isi_port * ports;
signed char count; signed char count;
unsigned char isa;
spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */ spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */
unsigned long flags; unsigned long flags;
}; };
...@@ -562,14 +561,12 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -562,14 +561,12 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
base = card->base; base = card->base;
spin_lock(&card->card_lock); spin_lock(&card->card_lock);
if (card->isa == NO) {
/* /*
* disable any interrupts from the PCI card and lower the * disable any interrupts from the PCI card and lower the
* interrupt line * interrupt line
*/ */
outw(0x8000, base+0x04); outw(0x8000, base+0x04);
ClearInterrupt(base); ClearInterrupt(base);
}
inw(base); /* get the dummy word out */ inw(base); /* get the dummy word out */
header = inw(base); header = inw(base);
...@@ -579,18 +576,12 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -579,18 +576,12 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
if (channel + 1 > card->port_count) { if (channel + 1 > card->port_count) {
printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): " printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): "
"%d(channel) > port_count.\n", base, channel+1); "%d(channel) > port_count.\n", base, channel+1);
if (card->isa)
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
spin_unlock(&card->card_lock); spin_unlock(&card->card_lock);
return IRQ_HANDLED; return IRQ_HANDLED;
} }
port = card->ports + channel; port = card->ports + channel;
if (!(port->flags & ASYNC_INITIALIZED)) { if (!(port->flags & ASYNC_INITIALIZED)) {
if (card->isa)
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
return IRQ_HANDLED; return IRQ_HANDLED;
} }
...@@ -604,9 +595,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -604,9 +595,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
} }
if (byte_count & 0x01) if (byte_count & 0x01)
inw(base); inw(base);
if (card->isa == YES)
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
spin_unlock(&card->card_lock); spin_unlock(&card->card_lock);
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -708,9 +696,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) ...@@ -708,9 +696,6 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id)
} }
tty_flip_buffer_push(tty); tty_flip_buffer_push(tty);
} }
if (card->isa == YES)
ClearInterrupt(base);
else
outw(0x0000, base+0x04); /* enable interrupts */ outw(0x0000, base+0x04); /* enable interrupts */
return IRQ_HANDLED; return IRQ_HANDLED;
...@@ -1561,17 +1546,6 @@ static int __devinit reset_card(struct pci_dev *pdev, ...@@ -1561,17 +1546,6 @@ static int __devinit reset_card(struct pci_dev *pdev,
*signature = inw(base + 0x4) & 0xff; *signature = inw(base + 0x4) & 0xff;
if (board->isa == YES) {
if (!(inw(base + 0xe) & 0x1) || (inw(base + 0x2))) {
dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n",
inw(base + 0x2), inw(base + 0xe));
dev_err(&pdev->dev, "ISILoad:ISA Card%d reset failure "
"(Possible bad I/O Port Address 0x%lx).\n",
card + 1, base);
retval = -EIO;
goto end;
}
} else {
portcount = inw(base + 0x2); portcount = inw(base + 0x2);
if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) && if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) &&
(portcount != 4) && (portcount != 8))) { (portcount != 4) && (portcount != 8))) {
...@@ -1583,14 +1557,12 @@ static int __devinit reset_card(struct pci_dev *pdev, ...@@ -1583,14 +1557,12 @@ static int __devinit reset_card(struct pci_dev *pdev,
retval = -EIO; retval = -EIO;
goto end; goto end;
} }
}
switch (*signature) { switch (*signature) {
case 0xa5: case 0xa5:
case 0xbb: case 0xbb:
case 0xdd: case 0xdd:
board->port_count = (board->isa == NO && portcount == 4) ? 4 : board->port_count = (portcount == 4) ? 4 : 8;
8;
board->shift_count = 12; board->shift_count = 12;
break; break;
case 0xcc: case 0xcc:
...@@ -1784,8 +1756,6 @@ end: ...@@ -1784,8 +1756,6 @@ end:
/* /*
* Insmod can set static symbols so keep these static * Insmod can set static symbols so keep these static
*/ */
static int io[4];
static int irq[4];
static int card; static int card;
static int __devinit isicom_probe(struct pci_dev *pdev, static int __devinit isicom_probe(struct pci_dev *pdev,
...@@ -1813,7 +1783,6 @@ static int __devinit isicom_probe(struct pci_dev *pdev, ...@@ -1813,7 +1783,6 @@ static int __devinit isicom_probe(struct pci_dev *pdev,
board->base = ioaddr; board->base = ioaddr;
board->irq = pciirq; board->irq = pciirq;
board->isa = NO;
card++; card++;
pci_set_drvdata(pdev, board); pci_set_drvdata(pdev, board);
...@@ -1888,20 +1857,6 @@ static int __init isicom_init(void) ...@@ -1888,20 +1857,6 @@ static int __init isicom_init(void)
} }
isi_card[idx].base = 0; isi_card[idx].base = 0;
isi_card[idx].irq = 0; isi_card[idx].irq = 0;
if (!io[idx])
continue;
if (irq[idx] == 2 || irq[idx] == 3 || irq[idx] == 4 ||
irq[idx] == 5 || irq[idx] == 7 ||
irq[idx] == 10 || irq[idx] == 11 ||
irq[idx] == 12 || irq[idx] == 15) {
printk(KERN_ERR "ISICOM: ISA not supported yet.\n");
retval = -EINVAL;
goto error;
} else
printk(KERN_ERR "ISICOM: Irq %d unsupported. "
"Disabling Card%d...\n", irq[idx], idx + 1);
} }
/* tty driver structure initialization */ /* tty driver structure initialization */
...@@ -1971,7 +1926,3 @@ module_exit(isicom_exit); ...@@ -1971,7 +1926,3 @@ module_exit(isicom_exit);
MODULE_AUTHOR("MultiTech"); MODULE_AUTHOR("MultiTech");
MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech"); MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_param_array(io, int, NULL, 0);
MODULE_PARM_DESC(io, "I/O ports for the cards");
module_param_array(irq, int, NULL, 0);
MODULE_PARM_DESC(irq, "Interrupts for the cards");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment