patch-2.1.93 linux/drivers/char/epca.c
Next file: linux/drivers/char/pc_keyb.c
Previous file: linux/drivers/char/cyclades.c
Back to the patch index
Back to the overall index
- Lines: 77
- Date:
Thu Apr 2 09:12:23 1998
- Orig file:
v2.1.92/linux/drivers/char/epca.c
- Orig date:
Tue Mar 10 10:03:31 1998
diff -u --recursive --new-file v2.1.92/linux/drivers/char/epca.c linux/drivers/char/epca.c
@@ -106,7 +106,6 @@
#ifdef ENABLE_PCI
-#include <linux/bios32.h>
#include <linux/pci.h>
#include <linux/digiPCI.h>
#endif /* ENABLE_PCI */
@@ -1747,7 +1746,7 @@
--------------------------------------------------------------------- */
pci_boards_found = 0;
- if (pcibios_present())
+ if (pci_present())
{
if(num_cards < MAXBOARDS)
pci_boards_found += init_PCI(num_cards);
@@ -4039,31 +4038,23 @@
#ifdef ENABLE_PCI
/* --------------------- Begin get_PCI_configuration ---------------------- */
-int get_PCI_configuration(char bus, char device_fn,
+int get_PCI_configuration(char bus, char device_fn,
unsigned int *base_addr0, unsigned int *base_addr1,
unsigned int *base_addr2, unsigned int *base_addr3,
unsigned int *base_addr4, unsigned int *base_addr5)
{ /* Begin get_PCI_configuration */
- int error;
+ struct pci_dev *dev = pci_find_slot(bus, device_fn);
- error = pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_0,
- base_addr0);
-
- error |= pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_1,
- base_addr1);
-
- error |= pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_2,
- base_addr2);
-
- error |= pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_3,
- base_addr3);
-
- error |= pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_4,
- base_addr4);
+ if (!dev)
+ return(0);
- error |= pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_5,
- base_addr5);
+ *base_addr0 = dev->base_address[0];
+ *base_addr1 = dev->base_address[1];
+ *base_addr2 = dev->base_address[2];
+ *base_addr3 = dev->base_address[3];
+ *base_addr4 = dev->base_address[4];
+ *base_addr5 = dev->base_address[5];
/* ------------------------------------------------------------------------
NOTE - The code below mask out either the 2 or 4 bits dependent on the
@@ -4103,11 +4094,6 @@
else
(*base_addr5) &= PCI_BASE_ADDRESS_MEM_MASK;
- if (error)
- {
- printk(KERN_ERR "<Error> - DIGI PCI error: board not initializing due to error\n");
- return(0);
- }
return(1);
} /* End get_PCI_configuration */
@@ -4311,5 +4297,3 @@
} /* End init_PCI */
#endif /* ENABLE_PCI */
-
-
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov