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