diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2006-12-08 05:38:51 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-08 11:28:57 -0500 |
commit | 18234f88bc27473f15293a03c83bcb53da9018b4 (patch) | |
tree | f937d64c69aa8247814eed8c46d7e2cacddf2209 /drivers/char/isicom.c | |
parent | ca26200511776a0b54c5c832efde48ee6445a738 (diff) |
[PATCH] Char: isicom, remove isa code
ISA is not supported by this driver, remove parts, that take care of this.
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Acked-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/isicom.c')
-rw-r--r-- | drivers/char/isicom.c | 91 |
1 files changed, 21 insertions, 70 deletions
diff --git a/drivers/char/isicom.c b/drivers/char/isicom.c index a56491eb897..51fa317e695 100644 --- a/drivers/char/isicom.c +++ b/drivers/char/isicom.c | |||
@@ -193,7 +193,6 @@ struct isi_board { | |||
193 | unsigned short shift_count; | 193 | unsigned short shift_count; |
194 | struct isi_port * ports; | 194 | struct isi_port * ports; |
195 | signed char count; | 195 | signed char count; |
196 | unsigned char isa; | ||
197 | spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */ | 196 | spinlock_t card_lock; /* Card wide lock 11/5/00 -sameer */ |
198 | unsigned long flags; | 197 | unsigned long flags; |
199 | }; | 198 | }; |
@@ -562,14 +561,12 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
562 | base = card->base; | 561 | base = card->base; |
563 | spin_lock(&card->card_lock); | 562 | spin_lock(&card->card_lock); |
564 | 563 | ||
565 | if (card->isa == NO) { | 564 | /* |
566 | /* | 565 | * disable any interrupts from the PCI card and lower the |
567 | * disable any interrupts from the PCI card and lower the | 566 | * interrupt line |
568 | * interrupt line | 567 | */ |
569 | */ | 568 | outw(0x8000, base+0x04); |
570 | outw(0x8000, base+0x04); | 569 | ClearInterrupt(base); |
571 | ClearInterrupt(base); | ||
572 | } | ||
573 | 570 | ||
574 | inw(base); /* get the dummy word out */ | 571 | inw(base); /* get the dummy word out */ |
575 | header = inw(base); | 572 | header = inw(base); |
@@ -579,19 +576,13 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
579 | if (channel + 1 > card->port_count) { | 576 | if (channel + 1 > card->port_count) { |
580 | printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): " | 577 | printk(KERN_WARNING "ISICOM: isicom_interrupt(0x%lx): " |
581 | "%d(channel) > port_count.\n", base, channel+1); | 578 | "%d(channel) > port_count.\n", base, channel+1); |
582 | if (card->isa) | 579 | outw(0x0000, base+0x04); /* enable interrupts */ |
583 | ClearInterrupt(base); | ||
584 | else | ||
585 | outw(0x0000, base+0x04); /* enable interrupts */ | ||
586 | spin_unlock(&card->card_lock); | 580 | spin_unlock(&card->card_lock); |
587 | return IRQ_HANDLED; | 581 | return IRQ_HANDLED; |
588 | } | 582 | } |
589 | port = card->ports + channel; | 583 | port = card->ports + channel; |
590 | if (!(port->flags & ASYNC_INITIALIZED)) { | 584 | if (!(port->flags & ASYNC_INITIALIZED)) { |
591 | if (card->isa) | 585 | outw(0x0000, base+0x04); /* enable interrupts */ |
592 | ClearInterrupt(base); | ||
593 | else | ||
594 | outw(0x0000, base+0x04); /* enable interrupts */ | ||
595 | return IRQ_HANDLED; | 586 | return IRQ_HANDLED; |
596 | } | 587 | } |
597 | 588 | ||
@@ -604,10 +595,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
604 | } | 595 | } |
605 | if (byte_count & 0x01) | 596 | if (byte_count & 0x01) |
606 | inw(base); | 597 | inw(base); |
607 | if (card->isa == YES) | 598 | outw(0x0000, base+0x04); /* enable interrupts */ |
608 | ClearInterrupt(base); | ||
609 | else | ||
610 | outw(0x0000, base+0x04); /* enable interrupts */ | ||
611 | spin_unlock(&card->card_lock); | 599 | spin_unlock(&card->card_lock); |
612 | return IRQ_HANDLED; | 600 | return IRQ_HANDLED; |
613 | } | 601 | } |
@@ -708,10 +696,7 @@ static irqreturn_t isicom_interrupt(int irq, void *dev_id) | |||
708 | } | 696 | } |
709 | tty_flip_buffer_push(tty); | 697 | tty_flip_buffer_push(tty); |
710 | } | 698 | } |
711 | if (card->isa == YES) | 699 | outw(0x0000, base+0x04); /* enable interrupts */ |
712 | ClearInterrupt(base); | ||
713 | else | ||
714 | outw(0x0000, base+0x04); /* enable interrupts */ | ||
715 | 700 | ||
716 | return IRQ_HANDLED; | 701 | return IRQ_HANDLED; |
717 | } | 702 | } |
@@ -1561,36 +1546,23 @@ static int __devinit reset_card(struct pci_dev *pdev, | |||
1561 | 1546 | ||
1562 | *signature = inw(base + 0x4) & 0xff; | 1547 | *signature = inw(base + 0x4) & 0xff; |
1563 | 1548 | ||
1564 | if (board->isa == YES) { | 1549 | portcount = inw(base + 0x2); |
1565 | if (!(inw(base + 0xe) & 0x1) || (inw(base + 0x2))) { | 1550 | if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) && |
1566 | dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n", | 1551 | (portcount != 4) && (portcount != 8))) { |
1567 | inw(base + 0x2), inw(base + 0xe)); | 1552 | dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n", |
1568 | dev_err(&pdev->dev, "ISILoad:ISA Card%d reset failure " | 1553 | inw(base + 0x2), inw(base + 0xe)); |
1569 | "(Possible bad I/O Port Address 0x%lx).\n", | 1554 | dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure " |
1570 | card + 1, base); | 1555 | "(Possible bad I/O Port Address 0x%lx).\n", |
1571 | retval = -EIO; | 1556 | card + 1, base); |
1572 | goto end; | 1557 | retval = -EIO; |
1573 | } | 1558 | goto end; |
1574 | } else { | ||
1575 | portcount = inw(base + 0x2); | ||
1576 | if (!(inw(base + 0xe) & 0x1) || ((portcount != 0) && | ||
1577 | (portcount != 4) && (portcount != 8))) { | ||
1578 | dev_dbg(&pdev->dev, "base+0x2=0x%lx, base+0xe=0x%lx\n", | ||
1579 | inw(base + 0x2), inw(base + 0xe)); | ||
1580 | dev_err(&pdev->dev, "ISILoad:PCI Card%d reset failure " | ||
1581 | "(Possible bad I/O Port Address 0x%lx).\n", | ||
1582 | card + 1, base); | ||
1583 | retval = -EIO; | ||
1584 | goto end; | ||
1585 | } | ||
1586 | } | 1559 | } |
1587 | 1560 | ||
1588 | switch (*signature) { | 1561 | switch (*signature) { |
1589 | case 0xa5: | 1562 | case 0xa5: |
1590 | case 0xbb: | 1563 | case 0xbb: |
1591 | case 0xdd: | 1564 | case 0xdd: |
1592 | board->port_count = (board->isa == NO && portcount == 4) ? 4 : | 1565 | board->port_count = (portcount == 4) ? 4 : 8; |
1593 | 8; | ||
1594 | board->shift_count = 12; | 1566 | board->shift_count = 12; |
1595 | break; | 1567 | break; |
1596 | case 0xcc: | 1568 | case 0xcc: |
@@ -1784,8 +1756,6 @@ end: | |||
1784 | /* | 1756 | /* |
1785 | * Insmod can set static symbols so keep these static | 1757 | * Insmod can set static symbols so keep these static |
1786 | */ | 1758 | */ |
1787 | static int io[4]; | ||
1788 | static int irq[4]; | ||
1789 | static int card; | 1759 | static int card; |
1790 | 1760 | ||
1791 | static int __devinit isicom_probe(struct pci_dev *pdev, | 1761 | static int __devinit isicom_probe(struct pci_dev *pdev, |
@@ -1813,7 +1783,6 @@ static int __devinit isicom_probe(struct pci_dev *pdev, | |||
1813 | 1783 | ||
1814 | board->base = ioaddr; | 1784 | board->base = ioaddr; |
1815 | board->irq = pciirq; | 1785 | board->irq = pciirq; |
1816 | board->isa = NO; | ||
1817 | card++; | 1786 | card++; |
1818 | 1787 | ||
1819 | pci_set_drvdata(pdev, board); | 1788 | pci_set_drvdata(pdev, board); |
@@ -1888,20 +1857,6 @@ static int __init isicom_init(void) | |||
1888 | } | 1857 | } |
1889 | isi_card[idx].base = 0; | 1858 | isi_card[idx].base = 0; |
1890 | isi_card[idx].irq = 0; | 1859 | isi_card[idx].irq = 0; |
1891 | |||
1892 | if (!io[idx]) | ||
1893 | continue; | ||
1894 | |||
1895 | if (irq[idx] == 2 || irq[idx] == 3 || irq[idx] == 4 || | ||
1896 | irq[idx] == 5 || irq[idx] == 7 || | ||
1897 | irq[idx] == 10 || irq[idx] == 11 || | ||
1898 | irq[idx] == 12 || irq[idx] == 15) { | ||
1899 | printk(KERN_ERR "ISICOM: ISA not supported yet.\n"); | ||
1900 | retval = -EINVAL; | ||
1901 | goto error; | ||
1902 | } else | ||
1903 | printk(KERN_ERR "ISICOM: Irq %d unsupported. " | ||
1904 | "Disabling Card%d...\n", irq[idx], idx + 1); | ||
1905 | } | 1860 | } |
1906 | 1861 | ||
1907 | /* tty driver structure initialization */ | 1862 | /* tty driver structure initialization */ |
@@ -1971,7 +1926,3 @@ module_exit(isicom_exit); | |||
1971 | MODULE_AUTHOR("MultiTech"); | 1926 | MODULE_AUTHOR("MultiTech"); |
1972 | MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech"); | 1927 | MODULE_DESCRIPTION("Driver for the ISI series of cards by MultiTech"); |
1973 | MODULE_LICENSE("GPL"); | 1928 | MODULE_LICENSE("GPL"); |
1974 | module_param_array(io, int, NULL, 0); | ||
1975 | MODULE_PARM_DESC(io, "I/O ports for the cards"); | ||
1976 | module_param_array(irq, int, NULL, 0); | ||
1977 | MODULE_PARM_DESC(irq, "Interrupts for the cards"); | ||