Lines Matching full:bus

117  * of_create_pci_dev - Given a device tree node on a pci bus, create a pci_dev
119 * @bus: bus the device is sitting on
123 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument
138 dev->bus = bus; in of_create_pci_dev()
140 dev->dev.parent = bus->bridge; in of_create_pci_dev()
141 dev->dev.bus = &pci_bus_type; in of_create_pci_dev()
147 list_for_each_entry(slot, &dev->bus->slots, list) in of_create_pci_dev()
158 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), in of_create_pci_dev()
159 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev()
191 pci_device_add(dev, bus); in of_create_pci_dev()
209 struct pci_bus *bus; in of_scan_pci_bridge() local
218 /* parse bus-range property */ in of_scan_pci_bridge()
219 busrange = of_get_property(node, "bus-range", &len); in of_scan_pci_bridge()
221 printk(KERN_DEBUG "Can't get bus-range for PCI-PCI bridge %s\n", in of_scan_pci_bridge()
232 bus = pci_add_new_bus(dev->bus, dev, busrange[0]); in of_scan_pci_bridge()
233 if (!bus) { in of_scan_pci_bridge()
234 printk(KERN_ERR "Failed to create pci bus for %s\n", in of_scan_pci_bridge()
239 bus->primary = dev->bus->number; in of_scan_pci_bridge()
240 bus->subordinate = busrange[1]; in of_scan_pci_bridge()
241 bus->bridge_ctl = 0; in of_scan_pci_bridge()
248 bus->resource[i] = res; in of_scan_pci_bridge()
258 res = bus->resource[0]; in of_scan_pci_bridge()
270 res = bus->resource[i]; in of_scan_pci_bridge()
277 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), in of_scan_pci_bridge()
278 bus->number); in of_scan_pci_bridge()
279 pr_debug(" bus name: %s\n", bus->name); in of_scan_pci_bridge()
283 mode = ppc_md.pci_probe_mode(bus); in of_scan_pci_bridge()
287 of_scan_bus(node, bus); in of_scan_pci_bridge()
289 pci_scan_child_bus(bus); in of_scan_pci_bridge()
294 * __of_scan_bus - given a PCI bus node, setup bus and scan for child devices
295 * @node: device tree node for the PCI bus
296 * @bus: pci_bus structure for the PCI bus
297 * @rescan_existing: Flag indicating bus has already been set up
300 struct pci_bus *bus, int rescan_existing) in __of_scan_bus() argument
307 pr_debug("of_scan_bus(%s) bus no %d...\n", in __of_scan_bus()
308 node->full_name, bus->number); in __of_scan_bus()
321 dev = of_create_pci_dev(child, bus, devfn); in __of_scan_bus()
327 /* Apply all fixups necessary. We don't fixup the bus "self" in __of_scan_bus()
331 pcibios_setup_bus_self(bus); in __of_scan_bus()
332 pcibios_setup_bus_devices(bus); in __of_scan_bus()
335 list_for_each_entry(dev, &bus->devices, bus_list) { in __of_scan_bus()
344 * of_scan_bus - given a PCI bus node, setup bus and scan for child devices
345 * @node: device tree node for the PCI bus
346 * @bus: pci_bus structure for the PCI bus
349 struct pci_bus *bus) in of_scan_bus() argument
351 __of_scan_bus(node, bus, 0); in of_scan_bus()
356 * of_rescan_bus - given a PCI bus node, scan for child devices
357 * @node: device tree node for the PCI bus
358 * @bus: pci_bus structure for the PCI bus
364 struct pci_bus *bus) in of_rescan_bus() argument
366 __of_scan_bus(node, bus, 1); in of_rescan_bus()