Lines Matching refs:dn
33 struct device_node *dn; in pci_bus_to_pdn() local
52 dn = pci_bus_to_OF_node(pbus); in pci_bus_to_pdn()
53 pdn = dn ? PCI_DN(dn) : NULL; in pci_bus_to_pdn()
61 struct device_node *dn = NULL; in pci_get_pdn_by_devfn() local
71 dn = pci_device_to_OF_node(pdev); in pci_get_pdn_by_devfn()
77 pdn = dn ? PCI_DN(dn) : NULL; in pci_get_pdn_by_devfn()
97 struct device_node *dn; in pci_get_pdn() local
105 dn = pci_device_to_OF_node(pdev); in pci_get_pdn()
106 pdn = dn ? PCI_DN(dn) : NULL; in pci_get_pdn()
283 struct device_node *dn) in pci_add_device_node_info() argument
285 const __be32 *type = of_get_property(dn, "ibm,pci-config-space-type", NULL); in pci_add_device_node_info()
296 dn->data = pdn; in pci_add_device_node_info()
299 regs = of_get_property(dn, "reg", NULL); in pci_add_device_node_info()
309 regs = of_get_property(dn, "vendor-id", NULL); in pci_add_device_node_info()
311 regs = of_get_property(dn, "device-id", NULL); in pci_add_device_node_info()
313 regs = of_get_property(dn, "class-code", NULL); in pci_add_device_node_info()
331 parent = of_get_parent(dn); in pci_add_device_node_info()
340 void pci_remove_device_node_info(struct device_node *dn) in pci_remove_device_node_info() argument
342 struct pci_dn *pdn = dn ? PCI_DN(dn) : NULL; in pci_remove_device_node_info()
359 parent = of_get_parent(dn); in pci_remove_device_node_info()
372 pci_dbg(pdev, "marked pdn (from %pOF) as dead\n", dn); in pci_remove_device_node_info()
375 dn->data = NULL; in pci_remove_device_node_info()
405 struct device_node *dn, *nextdn; in pci_traverse_device_nodes() local
409 for (dn = start->child; dn; dn = nextdn) { in pci_traverse_device_nodes()
414 classp = of_get_property(dn, "class-code", NULL); in pci_traverse_device_nodes()
419 ret = fn(dn, data); in pci_traverse_device_nodes()
425 if (dn->child && ((class >> 8) == PCI_CLASS_BRIDGE_PCI || in pci_traverse_device_nodes()
428 nextdn = dn->child; in pci_traverse_device_nodes()
429 else if (dn->sibling) in pci_traverse_device_nodes()
431 nextdn = dn->sibling; in pci_traverse_device_nodes()
435 dn = dn->parent; in pci_traverse_device_nodes()
436 if (dn == start) in pci_traverse_device_nodes()
438 } while (dn->sibling == NULL); in pci_traverse_device_nodes()
439 nextdn = dn->sibling; in pci_traverse_device_nodes()
446 static void *add_pdn(struct device_node *dn, void *data) in add_pdn() argument
451 pdn = pci_add_device_node_info(hose, dn); in add_pdn()
468 struct device_node *dn = phb->dn; in pci_devs_phb_init_dynamic() local
472 pdn = pci_add_device_node_info(phb, dn); in pci_devs_phb_init_dynamic()
481 pci_traverse_device_nodes(dn, add_pdn, phb); in pci_devs_phb_init_dynamic()