diff options
Diffstat (limited to 'arch/microblaze/pci/pci-common.c')
-rw-r--r-- | arch/microblaze/pci/pci-common.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c index 0be34350d733..01c8c97c15b7 100644 --- a/arch/microblaze/pci/pci-common.c +++ b/arch/microblaze/pci/pci-common.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/syscalls.h> | 26 | #include <linux/syscalls.h> |
27 | #include <linux/irq.h> | 27 | #include <linux/irq.h> |
28 | #include <linux/vmalloc.h> | 28 | #include <linux/vmalloc.h> |
29 | #include <linux/slab.h> | ||
29 | 30 | ||
30 | #include <asm/processor.h> | 31 | #include <asm/processor.h> |
31 | #include <asm/io.h> | 32 | #include <asm/io.h> |
@@ -1024,7 +1025,7 @@ static void __devinit pcibios_fixup_bridge(struct pci_bus *bus) | |||
1024 | 1025 | ||
1025 | struct pci_dev *dev = bus->self; | 1026 | struct pci_dev *dev = bus->self; |
1026 | 1027 | ||
1027 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { | 1028 | pci_bus_for_each_resource(bus, res, i) { |
1028 | res = bus->resource[i]; | 1029 | res = bus->resource[i]; |
1029 | if (!res) | 1030 | if (!res) |
1030 | continue; | 1031 | continue; |
@@ -1130,21 +1131,20 @@ static int skip_isa_ioresource_align(struct pci_dev *dev) | |||
1130 | * but we want to try to avoid allocating at 0x2900-0x2bff | 1131 | * but we want to try to avoid allocating at 0x2900-0x2bff |
1131 | * which might have be mirrored at 0x0100-0x03ff.. | 1132 | * which might have be mirrored at 0x0100-0x03ff.. |
1132 | */ | 1133 | */ |
1133 | void pcibios_align_resource(void *data, struct resource *res, | 1134 | resource_size_t pcibios_align_resource(void *data, const struct resource *res, |
1134 | resource_size_t size, resource_size_t align) | 1135 | resource_size_t size, resource_size_t align) |
1135 | { | 1136 | { |
1136 | struct pci_dev *dev = data; | 1137 | struct pci_dev *dev = data; |
1138 | resource_size_t start = res->start; | ||
1137 | 1139 | ||
1138 | if (res->flags & IORESOURCE_IO) { | 1140 | if (res->flags & IORESOURCE_IO) { |
1139 | resource_size_t start = res->start; | ||
1140 | |||
1141 | if (skip_isa_ioresource_align(dev)) | 1141 | if (skip_isa_ioresource_align(dev)) |
1142 | return; | 1142 | return start; |
1143 | if (start & 0x300) { | 1143 | if (start & 0x300) |
1144 | start = (start + 0x3ff) & ~0x3ff; | 1144 | start = (start + 0x3ff) & ~0x3ff; |
1145 | res->start = start; | ||
1146 | } | ||
1147 | } | 1145 | } |
1146 | |||
1147 | return start; | ||
1148 | } | 1148 | } |
1149 | EXPORT_SYMBOL(pcibios_align_resource); | 1149 | EXPORT_SYMBOL(pcibios_align_resource); |
1150 | 1150 | ||
@@ -1227,7 +1227,7 @@ void pcibios_allocate_bus_resources(struct pci_bus *bus) | |||
1227 | pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", | 1227 | pr_debug("PCI: Allocating bus resources for %04x:%02x...\n", |
1228 | pci_domain_nr(bus), bus->number); | 1228 | pci_domain_nr(bus), bus->number); |
1229 | 1229 | ||
1230 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; ++i) { | 1230 | pci_bus_for_each_resource(bus, res, i) { |
1231 | res = bus->resource[i]; | 1231 | res = bus->resource[i]; |
1232 | if (!res || !res->flags | 1232 | if (!res || !res->flags |
1233 | || res->start > res->end || res->parent) | 1233 | || res->start > res->end || res->parent) |