summaryrefslogtreecommitdiffstats
path: root/drivers/char/epca.c
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
committerRalf Baechle <ralf@linux-mips.org>1998-05-07 02:55:41 +0000
commitdcec8a13bf565e47942a1751a9cec21bec5648fe (patch)
tree548b69625b18cc2e88c3e68d0923be546c9ebb03 /drivers/char/epca.c
parent2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff)
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash. o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'drivers/char/epca.c')
-rw-r--r--drivers/char/epca.c38
1 files changed, 11 insertions, 27 deletions
diff --git a/drivers/char/epca.c b/drivers/char/epca.c
index 0a6f0dd82..6fee9da6d 100644
--- a/drivers/char/epca.c
+++ b/drivers/char/epca.c
@@ -106,7 +106,6 @@ char kernel_version[]=UTS_RELEASE;
#ifdef ENABLE_PCI
-#include <linux/bios32.h>
#include <linux/pci.h>
#include <linux/digiPCI.h>
#endif /* ENABLE_PCI */
@@ -1747,7 +1746,7 @@ int pc_init(void)
--------------------------------------------------------------------- */
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 @@ void epca_setup(char *str, int *ints)
#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 @@ int get_PCI_configuration(char bus, char device_fn,
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 @@ int init_PCI(int boards_found)
} /* End init_PCI */
#endif /* ENABLE_PCI */
-
-