aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze/pci/pci-common.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-05-20 08:38:55 -0400
committerIngo Molnar <mingo@elte.hu>2010-05-20 08:38:55 -0400
commitdfacc4d6c98b89609250269f518c1f54c30454ef (patch)
treee7effbee7bdc85d18f7b26ab9cb5c9f700d1481a /arch/microblaze/pci/pci-common.c
parentf869097e884d8cb65b2bb7831ca57b7dffb66fdd (diff)
parent85cb68b27c428d477169f3aa46c72dba103a17bd (diff)
Merge branch 'perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing into perf/core
Diffstat (limited to 'arch/microblaze/pci/pci-common.c')
-rw-r--r--arch/microblaze/pci/pci-common.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/microblaze/pci/pci-common.c b/arch/microblaze/pci/pci-common.c
index 740bb32ec57e..9cb782b8e036 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)
@@ -1508,7 +1507,7 @@ void pcibios_finish_adding_to_bus(struct pci_bus *bus)
1508 pci_bus_add_devices(bus); 1507 pci_bus_add_devices(bus);
1509 1508
1510 /* Fixup EEH */ 1509 /* Fixup EEH */
1511 eeh_add_device_tree_late(bus); 1510 /* eeh_add_device_tree_late(bus); */
1512} 1511}
1513EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus); 1512EXPORT_SYMBOL_GPL(pcibios_finish_adding_to_bus);
1514 1513