X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=arch%2Fmips%2Fpci%2Fpci.c;h=8141dffac2411e8bd951f6777d08092d0e27feba;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9bee1e937ae68620b6c752c152dd3eb91f01404b;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/mips/pci/pci.c b/arch/mips/pci/pci.c index 9bee1e937..8141dffac 100644 --- a/arch/mips/pci/pci.c +++ b/arch/mips/pci/pci.c @@ -4,7 +4,7 @@ * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * - * Copyright (C) 2003 Ralf Baechle (ralf@linux-mips.org) + * Copyright (C) 2003, 04 Ralf Baechle (ralf@linux-mips.org) */ #include #include @@ -14,8 +14,6 @@ #include #include -#include - /* * Indicate whether we respect the PCI setup left by the firmware. * @@ -61,7 +59,7 @@ pcibios_align_resource(void *data, struct resource *res, if (res->flags & IORESOURCE_IO) { /* Make sure we start at our min on all hoses */ - if (start - hose->io_resource->start < PCIBIOS_MIN_IO) + if (start < PCIBIOS_MIN_IO + hose->io_resource->start) start = PCIBIOS_MIN_IO + hose->io_resource->start; /* @@ -71,7 +69,7 @@ pcibios_align_resource(void *data, struct resource *res, start = (start + 0x3ff) & ~0x3ff; } else if (res->flags & IORESOURCE_MEM) { /* Make sure we start at our min on all hoses */ - if (start - hose->mem_resource->start < PCIBIOS_MIN_MEM) + if (start < PCIBIOS_MIN_MEM + hose->mem_resource->start) start = PCIBIOS_MIN_MEM + hose->mem_resource->start; } @@ -223,7 +221,7 @@ int pcibios_enable_device(struct pci_dev *dev, int mask) if ((err = pcibios_enable_resources(dev, mask)) < 0) return err; - return 0; + return pcibios_plat_dev_init(dev); } static void __init pcibios_fixup_device_resources(struct pci_dev *dev, @@ -296,6 +294,8 @@ pcibios_resource_to_bus(struct pci_dev *dev, struct pci_bus_region *region, #ifdef CONFIG_HOTPLUG EXPORT_SYMBOL(pcibios_resource_to_bus); +EXPORT_SYMBOL(PCIBIOS_MIN_IO); +EXPORT_SYMBOL(PCIBIOS_MIN_MEM); #endif char *pcibios_setup(char *str)