summaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-06-19 22:45:37 +0000
commit6d403070f28cd44860fdb3a53be5da0275c65cf4 (patch)
tree0d0e7fe7b5fb7568d19e11d7d862b77a866ce081 /drivers/isdn/hisax
parentecf1bf5f6c2e668d03b0a9fb026db7aa41e292e1 (diff)
Merge with 2.4.0-test1-ac21 + pile of MIPS cleanups to make merging
possible. Chainsawed RM200 kernel to compile again. Jazz machine status unknown.
Diffstat (limited to 'drivers/isdn/hisax')
-rw-r--r--drivers/isdn/hisax/avm_pci.c7
-rw-r--r--drivers/isdn/hisax/bkm_a4t.c5
-rw-r--r--drivers/isdn/hisax/diva.c18
-rw-r--r--drivers/isdn/hisax/elsa.c18
-rw-r--r--drivers/isdn/hisax/gazel.c3
-rw-r--r--drivers/isdn/hisax/hfc_pci.c4
-rw-r--r--drivers/isdn/hisax/netjet.c5
-rw-r--r--drivers/isdn/hisax/niccy.c6
-rw-r--r--drivers/isdn/hisax/sedlbauer.c11
-rw-r--r--drivers/isdn/hisax/telespci.c2
-rw-r--r--drivers/isdn/hisax/w6692.c8
11 files changed, 50 insertions, 37 deletions
diff --git a/drivers/isdn/hisax/avm_pci.c b/drivers/isdn/hisax/avm_pci.c
index d87c43f37..5af207b5e 100644
--- a/drivers/isdn/hisax/avm_pci.c
+++ b/drivers/isdn/hisax/avm_pci.c
@@ -820,11 +820,12 @@ setup_avm_pcipnp(struct IsdnCard *card))
PCI_FRITZPCI_ID, dev_avm))) {
cs->irq = dev_avm->irq;
if (!cs->irq) {
- printk(KERN_WARNING "FritzPCI: No IRQ for PCI card found\n");
+ printk(KERN_ERR "FritzPCI: No IRQ for PCI card found\n");
return(0);
}
- cs->hw.avm.cfg_reg = dev_avm->resource[ 1].start &
- PCI_BASE_ADDRESS_IO_MASK;
+ if (pci_enable_device(dev_avm))
+ return(0);
+ cs->hw.avm.cfg_reg = pci_resource_start (dev_avm, 1);
if (!cs->hw.avm.cfg_reg) {
printk(KERN_WARNING "FritzPCI: No IO-Adr for PCI card found\n");
return(0);
diff --git a/drivers/isdn/hisax/bkm_a4t.c b/drivers/isdn/hisax/bkm_a4t.c
index ce02a1bc6..6221cc197 100644
--- a/drivers/isdn/hisax/bkm_a4t.c
+++ b/drivers/isdn/hisax/bkm_a4t.c
@@ -319,11 +319,13 @@ __initfunc(int
if ((dev_a4t = pci_find_device(I20_VENDOR_ID, I20_DEVICE_ID, dev_a4t))) {
u_int sub_sys_id = 0;
+ if (pci_enable_device(dev_a4t))
+ return (0);
pci_read_config_dword(dev_a4t, PCI_SUBSYSTEM_VENDOR_ID,
&sub_sys_id);
if (sub_sys_id == ((A4T_SUBSYS_ID << 16) | A4T_SUBVEN_ID)) {
found = 1;
- pci_memaddr = dev_a4t->resource[ 0].start;
+ pci_memaddr = pci_resource_start (dev_a4t, 0);
cs->irq = dev_a4t->irq;
}
}
@@ -339,7 +341,6 @@ __initfunc(int
printk(KERN_WARNING "HiSax: %s: No Memory base address\n", CardType[card->typ]);
return (0);
}
- pci_memaddr &= PCI_BASE_ADDRESS_MEM_MASK;
cs->hw.ax.base = (u_int) ioremap(pci_memaddr, 4096);
/* Check suspecious address */
pI20_Regs = (I20_REGISTER_FILE *) (cs->hw.ax.base);
diff --git a/drivers/isdn/hisax/diva.c b/drivers/isdn/hisax/diva.c
index 30c6331a5..43a4dc0c1 100644
--- a/drivers/isdn/hisax/diva.c
+++ b/drivers/isdn/hisax/diva.c
@@ -936,26 +936,28 @@ setup_diva(struct IsdnCard *card))
cs->subtyp = 0;
if ((dev_diva = pci_find_device(PCI_VENDOR_EICON_DIEHL,
PCI_DIVA20_ID, dev_diva))) {
+ if (pci_enable_device(dev_diva))
+ return (0);
cs->subtyp = DIVA_PCI;
cs->irq = dev_diva->irq;
- cs->hw.diva.cfg_reg = dev_diva->resource[ 2].start
- & PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.diva.cfg_reg = pci_resource_start(dev_diva, 2);
} else if ((dev_diva_u = pci_find_device(PCI_VENDOR_EICON_DIEHL,
PCI_DIVA20_U_ID, dev_diva_u))) {
+ if (pci_enable_device(dev_diva_u))
+ return (0);
cs->subtyp = DIVA_PCI;
cs->irq = dev_diva_u->irq;
- cs->hw.diva.cfg_reg = dev_diva_u->resource[ 2].start
- & PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.diva.cfg_reg = pci_resource_start(dev_diva_u, 2);
} else if ((dev_diva201 = pci_find_device(PCI_VENDOR_EICON_DIEHL,
PCI_DIVA_201, dev_diva201))) {
+ if (pci_enable_device(dev_diva201))
+ return (0);
cs->subtyp = DIVA_IPAC_PCI;
cs->irq = dev_diva201->irq;
cs->hw.diva.pci_cfg =
- (ulong) ioremap((dev_diva201->resource[ 0].start
- & PCI_BASE_ADDRESS_IO_MASK), 4096);
+ (ulong) ioremap(pci_resource_start(dev_diva201, 0), 4096);
cs->hw.diva.cfg_reg =
- (ulong) ioremap((dev_diva201->resource[ 1].start
- & PCI_BASE_ADDRESS_IO_MASK), 4096);
+ (ulong) ioremap(pci_resource_start(dev_diva201, 1), 4096);
} else {
printk(KERN_WARNING "Diva: No PCI card found\n");
return(0);
diff --git a/drivers/isdn/hisax/elsa.c b/drivers/isdn/hisax/elsa.c
index 1e425ccc5..3c78e04a7 100644
--- a/drivers/isdn/hisax/elsa.c
+++ b/drivers/isdn/hisax/elsa.c
@@ -1058,20 +1058,20 @@ setup_elsa(struct IsdnCard *card)
cs->subtyp = 0;
if ((dev_qs1000 = pci_find_device(PCI_VENDOR_ELSA, PCI_QS1000_ID,
dev_qs1000))) {
- cs->subtyp = ELSA_QS1000PCI;
+ if (pci_enable_device(dev_qs1000))
+ return (0);
+ cs->subtyp = ELSA_QS1000PCI;
cs->irq = dev_qs1000->irq;
- cs->hw.elsa.cfg = dev_qs1000->resource[ 1].start &
- PCI_BASE_ADDRESS_IO_MASK;
- cs->hw.elsa.base = dev_qs1000->resource[ 3].start &
- PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.elsa.cfg = pci_resource_start(dev_qs1000, 1);
+ cs->hw.elsa.base = pci_resource_start(dev_qs1000, 3);
} else if ((dev_qs3000 = pci_find_device(PCI_VENDOR_ELSA,
PCI_QS3000_ID, dev_qs3000))) {
+ if (pci_enable_device(dev_qs1000))
+ return (0);
cs->subtyp = ELSA_QS3000PCI;
cs->irq = dev_qs3000->irq;
- cs->hw.elsa.cfg = dev_qs3000->resource[ 1].start &
- PCI_BASE_ADDRESS_IO_MASK;
- cs->hw.elsa.base = dev_qs3000->resource[ 3].start &
- PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.elsa.cfg = pci_resource_start(dev_qs3000, 1);
+ cs->hw.elsa.base = pci_resource_start(dev_qs3000, 3);
} else {
printk(KERN_WARNING "Elsa: No PCI card found\n");
return(0);
diff --git a/drivers/isdn/hisax/gazel.c b/drivers/isdn/hisax/gazel.c
index c104253c7..4121de133 100644
--- a/drivers/isdn/hisax/gazel.c
+++ b/drivers/isdn/hisax/gazel.c
@@ -589,7 +589,8 @@ setup_gazelpci(struct IsdnCardState *cs)
seekcard = GAZEL_R685;
for (nbseek = 0; nbseek < 3; nbseek++) {
if ((dev_tel = pci_find_device(GAZEL_MANUFACTURER, seekcard, dev_tel))) {
-
+ if (pci_enable_device(dev_tel))
+ return 1;
pci_irq = dev_tel->irq;
pci_ioaddr0 = dev_tel->resource[ 1].start;
pci_ioaddr1 = dev_tel->resource[ 2].start;
diff --git a/drivers/isdn/hisax/hfc_pci.c b/drivers/isdn/hisax/hfc_pci.c
index f2e7abf10..300bfb1f7 100644
--- a/drivers/isdn/hisax/hfc_pci.c
+++ b/drivers/isdn/hisax/hfc_pci.c
@@ -1738,7 +1738,9 @@ __initfunc(int
dev_hfcpci);
i++;
if (tmp_hfcpci) {
- if ((card->para[0]) && (card->para[0] != (tmp_hfcpci->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK)))
+ if (pci_enable_device(tmp_hfcpci))
+ continue;
+ if ((card->para[0]) && (card->para[0] != pci_resource_start(tmp_hfcpci, 0)))
continue;
else
break;
diff --git a/drivers/isdn/hisax/netjet.c b/drivers/isdn/hisax/netjet.c
index b1b0fd8d4..a41536f22 100644
--- a/drivers/isdn/hisax/netjet.c
+++ b/drivers/isdn/hisax/netjet.c
@@ -1130,13 +1130,14 @@ setup_netjet(struct IsdnCard *card))
}
if ((dev_netjet = pci_find_device(PCI_VENDOR_TRAVERSE_TECH,
PCI_NETJET_ID, dev_netjet))) {
+ if (pci_enable_device(dev_netjet))
+ return (0);
cs->irq = dev_netjet->irq;
if (!cs->irq) {
printk(KERN_WARNING "NETjet: No IRQ for PCI card found\n");
return(0);
}
- cs->hw.njet.base = dev_netjet->resource[ 0].start
- & PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.njet.base = pci_resource_start(dev_netjet, 0);
if (!cs->hw.njet.base) {
printk(KERN_WARNING "NETjet: No IO-Adr for PCI card found\n");
return(0);
diff --git a/drivers/isdn/hisax/niccy.c b/drivers/isdn/hisax/niccy.c
index 2cfbd146c..6639018bf 100644
--- a/drivers/isdn/hisax/niccy.c
+++ b/drivers/isdn/hisax/niccy.c
@@ -313,6 +313,8 @@ setup_niccy(struct IsdnCard *card))
cs->subtyp = 0;
if ((niccy_dev = pci_find_device(PCI_VENDOR_DR_NEUHAUS,
PCI_NICCY_ID, niccy_dev))) {
+ if (pci_enable_device(niccy_dev))
+ return (0);
/* get IRQ */
if (!niccy_dev->irq) {
printk(KERN_WARNING "Niccy: No IRQ for PCI card found\n");
@@ -323,12 +325,12 @@ setup_niccy(struct IsdnCard *card))
printk(KERN_WARNING "Niccy: No IO-Adr for PCI cfg found\n");
return(0);
}
- cs->hw.niccy.cfg_reg = niccy_dev->resource[ 0].start & PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.niccy.cfg_reg = pci_resource_start(niccy_dev, 0);
if (!niccy_dev->resource[ 1].start) {
printk(KERN_WARNING "Niccy: No IO-Adr for PCI card found\n");
return(0);
}
- pci_ioaddr = niccy_dev->resource[ 1].start & PCI_BASE_ADDRESS_IO_MASK;
+ pci_ioaddr = pci_resource_start(niccy_dev, 1);
cs->subtyp = NICCY_PCI;
} else {
printk(KERN_WARNING "Niccy: No PCI card found\n");
diff --git a/drivers/isdn/hisax/sedlbauer.c b/drivers/isdn/hisax/sedlbauer.c
index dd1c53d04..fc0b7ff9b 100644
--- a/drivers/isdn/hisax/sedlbauer.c
+++ b/drivers/isdn/hisax/sedlbauer.c
@@ -641,23 +641,22 @@ setup_sedlbauer(struct IsdnCard *card))
}
if ((dev_sedl = pci_find_device(PCI_VENDOR_SEDLBAUER,
PCI_SPEEDPCI_ID, dev_sedl))) {
+ if (pci_enable_device(dev_sedl))
+ return (0);
cs->irq = dev_sedl->irq;
if (!cs->irq) {
printk(KERN_WARNING "Sedlbauer: No IRQ for PCI card found\n");
return(0);
}
- cs->hw.sedl.cfg_reg = dev_sedl->resource[ 0].start &
- PCI_BASE_ADDRESS_IO_MASK;
+ cs->hw.sedl.cfg_reg = pci_resource_start(dev_sedl, 0);
} else {
printk(KERN_WARNING "Sedlbauer: No PCI card found\n");
return(0);
}
cs->irq_flags |= SA_SHIRQ;
cs->hw.sedl.bus = SEDL_BUS_PCI;
- pci_read_config_word(dev_sedl, PCI_SUBSYSTEM_VENDOR_ID,
- &sub_vendor_id);
- pci_read_config_word(dev_sedl, PCI_SUBSYSTEM_ID,
- &sub_id);
+ sub_vendor_id = dev_sedl->subsystem_vendor;
+ sub_id = dev_sedl->subsystem_device;
printk(KERN_INFO "Sedlbauer: PCI subvendor:%x subid %x\n",
sub_vendor_id, sub_id);
printk(KERN_INFO "Sedlbauer: PCI base adr %#x\n",
diff --git a/drivers/isdn/hisax/telespci.c b/drivers/isdn/hisax/telespci.c
index e90510b35..692fbddcf 100644
--- a/drivers/isdn/hisax/telespci.c
+++ b/drivers/isdn/hisax/telespci.c
@@ -325,6 +325,8 @@ setup_telespci(struct IsdnCard *card))
return(0);
}
if ((dev_tel = pci_find_device (0x11DE, 0x6120, dev_tel))) {
+ if (pci_enable_device(dev_tel))
+ return (0);
cs->irq = dev_tel->irq;
if (!cs->irq) {
printk(KERN_WARNING "Teles: No IRQ for PCI card found\n");
diff --git a/drivers/isdn/hisax/w6692.c b/drivers/isdn/hisax/w6692.c
index f9ce17675..46fe29f75 100644
--- a/drivers/isdn/hisax/w6692.c
+++ b/drivers/isdn/hisax/w6692.c
@@ -1009,8 +1009,11 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
dev_w6692 = pci_find_device(id_list[id_idx].vendor_id,
id_list[id_idx].device_id,
dev_w6692);
- if (dev_w6692)
+ if (dev_w6692) {
+ if (pci_enable_device(dev_w6692))
+ continue;
break;
+ }
id_idx++;
}
if (dev_w6692) {
@@ -1018,7 +1021,7 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
pci_irq = dev_w6692->irq;
/* I think address 0 is allways the configuration area */
/* and address 1 is the real IO space KKe 03.09.99 */
- pci_ioaddr = dev_w6692->resource[ 1].start;
+ pci_ioaddr = pci_resource_start(dev_w6692, 1);
}
if (!found) {
printk(KERN_WARNING "W6692: No PCI card found\n");
@@ -1029,7 +1032,6 @@ __initfunc(int setup_w6692(struct IsdnCard *card))
printk(KERN_WARNING "W6692: No IRQ for PCI card found\n");
return (0);
}
- pci_ioaddr &= PCI_BASE_ADDRESS_IO_MASK;
if (!pci_ioaddr) {
printk(KERN_WARNING "W6692: NO I/O Base Address found\n");
return (0);