From 529c593ece216e4aaffd36bd940cb94f1fa63129 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Wed, 23 Feb 2000 00:40:54 +0000 Subject: Merge with 2.3.43. I did ignore all modifications to the qlogicisp.c driver due to the Origin A64 hacks. --- arch/arm/kernel/bios32.c | 37 +++++++++++++++++++++++++++---------- 1 file changed, 27 insertions(+), 10 deletions(-) (limited to 'arch/arm/kernel/bios32.c') diff --git a/arch/arm/kernel/bios32.c b/arch/arm/kernel/bios32.c index d055ae1fb..7a1b57c22 100644 --- a/arch/arm/kernel/bios32.c +++ b/arch/arm/kernel/bios32.c @@ -381,7 +381,7 @@ void __init pcibios_init(void) * Assign any unassigned resources. Note that we really ought to * have min/max stuff here - max mem address is 0x0fffffff */ - pci_assign_unassigned_resources(hw_pci->io_start, hw_pci->mem_start); + pci_assign_unassigned_resources(); pci_fixup_irqs(hw_pci->swizzle, hw_pci->map_irq); pci_set_bus_ranges(); @@ -404,17 +404,34 @@ char * __init pcibios_setup(char *str) return str; } -/* - * Assign new address to PCI resource. We hope our resource information - * is complete. - * - * Expects start=0, end=size-1, flags=resource type. - */ -int pci_assign_resource(struct pci_dev *dev, int i) +void pcibios_align_resource(void *data, struct resource *res, unsigned long size) { - return 0; } -void pcibios_align_resource(void *data, struct resource *res, unsigned long size) +int pcibios_enable_device(struct pci_dev *dev) { + u16 cmd, old_cmd; + int idx; + struct resource *r; + + pci_read_config_word(dev, PCI_COMMAND, &cmd); + old_cmd = cmd; + for (idx = 0; idx < 6; idx++) { + r = dev->resource + idx; + if (!r->start && r->end) { + printk(KERN_ERR "PCI: Device %s not available because" + " of resource collisions\n", dev->slot_name); + return -EINVAL; + } + if (r->flags & IORESOURCE_IO) + cmd |= PCI_COMMAND_IO; + if (r->flags & IORESOURCE_MEM) + cmd |= PCI_COMMAND_MEMORY; + } + if (cmd != old_cmd) { + printk("PCI: enabling device %s (%04x -> %04x)\n", + dev->slot_name, old_cmd, cmd); + pci_write_config_word(dev, PCI_COMMAND, cmd); + } + return 0; } -- cgit v1.2.3