From b63ad0882a16a5d28003e57f2b0b81dee3fb322b Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 28 Nov 2000 03:58:46 +0000 Subject: Merge with 2.4.0-test11. --- drivers/isdn/hisax/hfc_pci.c | 46 +++----------------------------------------- 1 file changed, 3 insertions(+), 43 deletions(-) (limited to 'drivers/isdn/hisax/hfc_pci.c') 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 #include +#include 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); -- cgit v1.2.3