pci-common.c (0c49cd295d42d0032af11d55e2140dbec11dc8d0) | pci-common.c (3ebfe46ac72c0bda0fee3d33dd4cfe88f43cefd9) |
---|---|
1/* 2 * Contains common pci routines for ALL ppc platform 3 * (based on pci_32.c and pci_64.c) 4 * 5 * Port for PPC64 David Engebretsen, IBM Corp. 6 * Contains common pci routines for ppc64 platform, pSeries and iSeries brands. 7 * 8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM --- 1170 unchanged lines hidden (view full) --- 1179 bus->self ? pci_name(bus->self) : "PHB", 1180 bus->number, i, 1181 (unsigned long long)res->start, 1182 (unsigned long long)res->end, 1183 (unsigned int)res->flags, 1184 pr, (pr && pr->name) ? pr->name : "nil"); 1185 1186 if (pr && !(pr->flags & IORESOURCE_UNSET)) { | 1/* 2 * Contains common pci routines for ALL ppc platform 3 * (based on pci_32.c and pci_64.c) 4 * 5 * Port for PPC64 David Engebretsen, IBM Corp. 6 * Contains common pci routines for ppc64 platform, pSeries and iSeries brands. 7 * 8 * Copyright (C) 2003 Anton Blanchard <anton@au.ibm.com>, IBM --- 1170 unchanged lines hidden (view full) --- 1179 bus->self ? pci_name(bus->self) : "PHB", 1180 bus->number, i, 1181 (unsigned long long)res->start, 1182 (unsigned long long)res->end, 1183 (unsigned int)res->flags, 1184 pr, (pr && pr->name) ? pr->name : "nil"); 1185 1186 if (pr && !(pr->flags & IORESOURCE_UNSET)) { |
1187 struct pci_dev *dev = bus->self; 1188 |
|
1187 if (request_resource(pr, res) == 0) 1188 continue; 1189 /* 1190 * Must be a conflict with an existing entry. 1191 * Move that entry (or entries) under the 1192 * bridge resource and try again. 1193 */ 1194 if (reparent_resources(pr, res) == 0) 1195 continue; | 1189 if (request_resource(pr, res) == 0) 1190 continue; 1191 /* 1192 * Must be a conflict with an existing entry. 1193 * Move that entry (or entries) under the 1194 * bridge resource and try again. 1195 */ 1196 if (reparent_resources(pr, res) == 0) 1197 continue; |
1198 1199 if (dev && i < PCI_BRIDGE_RESOURCE_NUM && 1200 pci_claim_bridge_resource(dev, 1201 i + PCI_BRIDGE_RESOURCES) == 0) 1202 continue; |
|
1196 } 1197 pr_warning("PCI: Cannot allocate resource region " 1198 "%d of PCI bridge %d, will remap\n", i, bus->number); 1199 clear_resource: 1200 /* The resource might be figured out when doing 1201 * reassignment based on the resources required 1202 * by the downstream PCI devices. Here we set 1203 * the size of the resource to be 0 in order to --- 192 unchanged lines hidden (view full) --- 1396 1397 pr_debug("PCI: Claiming %s: " 1398 "Resource %d: %016llx..%016llx [%x]\n", 1399 pci_name(dev), i, 1400 (unsigned long long)r->start, 1401 (unsigned long long)r->end, 1402 (unsigned int)r->flags); 1403 | 1203 } 1204 pr_warning("PCI: Cannot allocate resource region " 1205 "%d of PCI bridge %d, will remap\n", i, bus->number); 1206 clear_resource: 1207 /* The resource might be figured out when doing 1208 * reassignment based on the resources required 1209 * by the downstream PCI devices. Here we set 1210 * the size of the resource to be 0 in order to --- 192 unchanged lines hidden (view full) --- 1403 1404 pr_debug("PCI: Claiming %s: " 1405 "Resource %d: %016llx..%016llx [%x]\n", 1406 pci_name(dev), i, 1407 (unsigned long long)r->start, 1408 (unsigned long long)r->end, 1409 (unsigned int)r->flags); 1410 |
1404 pci_claim_resource(dev, i); | 1411 if (pci_claim_resource(dev, i) == 0) 1412 continue; 1413 1414 pci_claim_bridge_resource(dev, i); |
1405 } 1406 } 1407 1408 list_for_each_entry(child_bus, &bus->children, node) 1409 pcibios_claim_one_bus(child_bus); 1410} 1411 1412 --- 262 unchanged lines hidden --- | 1415 } 1416 } 1417 1418 list_for_each_entry(child_bus, &bus->children, node) 1419 pcibios_claim_one_bus(child_bus); 1420} 1421 1422 --- 262 unchanged lines hidden --- |