Lines Matching refs:bus
114 pcibios_bus_to_resource(dev->bus, res, ®ion); in of_pci_parse_addrs()
125 struct pci_bus *bus, int devfn) in of_create_pci_dev() argument
130 dev = pci_alloc_dev(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()
155 dev_set_name(&dev->dev, "%04x:%02x:%02x.%d", pci_domain_nr(bus), in of_create_pci_dev()
156 dev->bus->number, PCI_SLOT(devfn), PCI_FUNC(devfn)); in of_create_pci_dev()
188 pci_device_add(dev, bus); in of_create_pci_dev()
208 struct pci_bus *bus; in of_scan_pci_bridge() local
233 bus = pci_find_bus(pci_domain_nr(dev->bus), in of_scan_pci_bridge()
235 if (!bus) { in of_scan_pci_bridge()
236 bus = pci_add_new_bus(dev->bus, dev, in of_scan_pci_bridge()
238 if (!bus) { in of_scan_pci_bridge()
245 bus->primary = dev->bus->number; in of_scan_pci_bridge()
246 pci_bus_insert_busn_res(bus, of_read_number(busrange, 1), in of_scan_pci_bridge()
248 bus->bridge_ctl = 0; in of_scan_pci_bridge()
255 bus->resource[i] = res; in of_scan_pci_bridge()
265 res = bus->resource[0]; in of_scan_pci_bridge()
277 res = bus->resource[i]; in of_scan_pci_bridge()
283 pcibios_bus_to_resource(dev->bus, res, ®ion); in of_scan_pci_bridge()
285 sprintf(bus->name, "PCI Bus %04x:%02x", pci_domain_nr(bus), in of_scan_pci_bridge()
286 bus->number); in of_scan_pci_bridge()
287 pr_debug(" bus name: %s\n", bus->name); in of_scan_pci_bridge()
289 phb = pci_bus_to_host(bus); in of_scan_pci_bridge()
293 mode = phb->controller_ops.probe_mode(bus); in of_scan_pci_bridge()
297 of_scan_bus(node, bus); in of_scan_pci_bridge()
299 pci_scan_child_bus(bus); in of_scan_pci_bridge()
303 static struct pci_dev *of_scan_pci_dev(struct pci_bus *bus, in of_scan_pci_dev() argument
323 dev = pci_get_slot(bus, devfn); in of_scan_pci_dev()
336 dev = of_create_pci_dev(dn, bus, devfn); in of_scan_pci_dev()
350 static void __of_scan_bus(struct device_node *node, struct pci_bus *bus, in __of_scan_bus() argument
357 node->full_name, bus->number); in __of_scan_bus()
361 dev = of_scan_pci_dev(bus, child); in __of_scan_bus()
371 pcibios_setup_bus_self(bus); in __of_scan_bus()
372 pcibios_setup_bus_devices(bus); in __of_scan_bus()
375 list_for_each_entry(dev, &bus->devices, bus_list) { in __of_scan_bus()
387 void of_scan_bus(struct device_node *node, struct pci_bus *bus) in of_scan_bus() argument
389 __of_scan_bus(node, bus, 0); in of_scan_bus()
401 void of_rescan_bus(struct device_node *node, struct pci_bus *bus) in of_rescan_bus() argument
403 __of_scan_bus(node, bus, 1); in of_rescan_bus()