summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/hfc_pci.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
commitb63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch)
tree0a343ce219e2b8b38a5d702d66032c57b83d9720 /drivers/isdn/hisax/hfc_pci.c
parenta9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff)
Merge with 2.4.0-test11.
Diffstat (limited to 'drivers/isdn/hisax/hfc_pci.c')
-rw-r--r--drivers/isdn/hisax/hfc_pci.c46
1 files changed, 3 insertions, 43 deletions
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index b61f397d2..ac0392251 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -31,6 +31,7 @@
#include "isdnl1.h"
#include <linux/pci.h>
#include <linux/interrupt.h>
+#include <linux/init.h>
extern const char *CardType[];
@@ -1631,11 +1632,9 @@ static struct pci_dev *dev_hfcpci __initdata = NULL;
#endif /* CONFIG_PCI */
-__initfunc(int
- setup_hfcpci(struct IsdnCard *card))
+int __init setup_hfcpci(struct IsdnCard *card)
{
struct IsdnCardState *cs = card->cs;
- unsigned short cmd;
char tmp[64];
int i;
struct pci_dev *tmp_hfcpci = NULL;
@@ -1645,15 +1644,11 @@ __initfunc(int
#endif
strcpy(tmp, hfcpci_revision);
printk(KERN_INFO "HiSax: HFC-PCI driver Rev. %s\n", HiSax_getrev(tmp));
-#if CONFIG_PCI
+#ifdef CONFIG_PCI
cs->hw.hfcpci.int_s1 = 0;
cs->dc.hfcpci.ph_state = 0;
cs->hw.hfcpci.fifo = 255;
if (cs->typ == ISDN_CTYPE_HFC_PCI) {
- if (!pci_present()) {
- printk(KERN_ERR "HFC-PCI: no PCI bus present\n");
- return (0);
- }
i = 0;
while (id_list[i].vendor_id) {
tmp_hfcpci = pci_find_device(id_list[i].vendor_id,
@@ -1686,41 +1681,6 @@ __initfunc(int
printk(KERN_WARNING "HFC-PCI: No PCI card found\n");
return (0);
}
-#ifdef notdef
- if (((int) cs->hw.hfcpci.pci_io & (PAGE_SIZE - 1))) {
- printk(KERN_WARNING "HFC-PCI shared mem address will be corrected\n");
- pcibios_write_config_word(cs->hw.hfcpci.pci_bus,
- cs->hw.hfcpci.pci_device_fn,
- PCI_COMMAND,
- 0x0103); /* set SERR */
- pcibios_read_config_word(cs->hw.hfcpci.pci_bus,
- cs->hw.hfcpci.pci_device_fn,
- PCI_COMMAND,
- &cmd);
- pcibios_write_config_word(cs->hw.hfcpci.pci_bus,
- cs->hw.hfcpci.pci_device_fn,
- PCI_COMMAND,
- cmd & ~2);
- (int) cs->hw.hfcpci.pci_io &= ~(PAGE_SIZE - 1);
- pcibios_write_config_dword(cs->hw.hfcpci.pci_bus,
- cs->hw.hfcpci.pci_device_fn,
- PCI_BASE_ADDRESS_1,
- (int) cs->hw.hfcpci.pci_io);
- pcibios_write_config_word(cs->hw.hfcpci.pci_bus,
- cs->hw.hfcpci.pci_device_fn,
- PCI_COMMAND,
- cmd);
- pcibios_read_config_dword(cs->hw.hfcpci.pci_bus,
- cs->hw.hfcpci.pci_device_fn,
- PCI_BASE_ADDRESS_1,
- (void *) &cs->hw.hfcpci.pci_io);
- if (((int) cs->hw.hfcpci.pci_io & (PAGE_SIZE - 1))) {
- printk(KERN_WARNING "HFC-PCI unable to align address %x\n", (unsigned) cs->hw.hfcpci.pci_io);
- return (0);
- }
- dev_hfcpci->resource[1].start = (int) cs->hw.hfcpci.pci_io;
- }
-#endif
if (!cs->hw.hfcpci.pci_io) {
printk(KERN_WARNING "HFC-PCI: No IO-Mem for PCI card found\n");
return (0);