summaryrefslogtreecommitdiffstats
path: root/drivers/char/rocket.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/rocket.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/rocket.c')
-rw-r--r--drivers/char/rocket.c32
1 files changed, 5 insertions, 27 deletions
diff --git a/drivers/char/rocket.c b/drivers/char/rocket.c
index 3b6f95f60..901077455 100644
--- a/drivers/char/rocket.c
+++ b/drivers/char/rocket.c
@@ -80,7 +80,6 @@
#include <linux/major.h>
#include <linux/ioport.h>
#ifdef ENABLE_PCI
-#include <linux/bios32.h>
#include <linux/pci.h>
#endif
#if (LINUX_VERSION_CODE >= 131343) /* 2.1.15 -- XX get correct version */
@@ -1875,31 +1874,10 @@ __initfunc(int register_PCI(int i, char bus, char device_fn))
unsigned int aiopio[MAX_AIOPS_PER_BOARD];
char *str;
CONTROLLER_t *ctlp;
- unsigned short vendor_id, device_id;
- int ret, error;
- unsigned int port;
-
- error = pcibios_read_config_word(bus, device_fn, PCI_VENDOR_ID,
- &vendor_id);
- ret = pcibios_read_config_word(bus, device_fn, PCI_DEVICE_ID,
- &device_id);
- if (error == 0)
- error = ret;
- ret = pcibios_read_config_dword(bus, device_fn, PCI_BASE_ADDRESS_0,
- &port);
- rcktpt_io_addr[i] = (unsigned long) port;
- if (error == 0)
- error = ret;
-
- if (error) {
- printk("PCI RocketPort error: %s not initializing due to error"
- "reading configuration space\n",
- pcibios_strerror(error));
- return(0);
- }
+ struct pci_dev *dev = pci_find_slot(bus, device_fn);
- --rcktpt_io_addr[i];
- switch(device_id) {
+ rcktpt_io_addr[i] = dev->base_address[0] & PCI_BASE_ADDRESS_IO_MASK;
+ switch(dev->device) {
case PCI_DEVICE_ID_RP4QUAD:
str = "Quadcable";
max_num_aiops = 1;
@@ -1935,7 +1913,7 @@ __initfunc(int register_PCI(int i, char bus, char device_fn))
num_aiops = sPCIInitController(ctlp, i,
aiopio, max_num_aiops, 0,
FREQ_DIS, 0);
- printk("Rocketport controller #%d found at %d:%d, "
+ printk("Rocketport controller #%d found at %02x:%02x, "
"%d AIOP(s) (PCI Rocketport %s)\n", i, bus, device_fn,
num_aiops, str);
if(num_aiops <= 0) {
@@ -2095,7 +2073,7 @@ __initfunc(int rp_init(void))
isa_boards_found++;
}
#ifdef ENABLE_PCI
- if (pcibios_present()) {
+ if (pci_present()) {
if(isa_boards_found < NUM_BOARDS)
pci_boards_found = init_PCI(isa_boards_found);
} else {