Lines Matching refs:dn
45 struct device_node *dn; in pci_bus_to_pdn() local
64 dn = pci_bus_to_OF_node(pbus); in pci_bus_to_pdn()
65 pdn = dn ? PCI_DN(dn) : NULL; in pci_bus_to_pdn()
73 struct device_node *dn = NULL; in pci_get_pdn_by_devfn() local
83 dn = pci_device_to_OF_node(pdev); in pci_get_pdn_by_devfn()
89 pdn = dn ? PCI_DN(dn) : NULL; in pci_get_pdn_by_devfn()
109 struct device_node *dn; in pci_get_pdn() local
117 dn = pci_device_to_OF_node(pdev); in pci_get_pdn()
118 pdn = dn ? PCI_DN(dn) : NULL; in pci_get_pdn()
272 void *update_dn_pci_info(struct device_node *dn, void *data) in update_dn_pci_info() argument
275 const __be32 *type = of_get_property(dn, "ibm,pci-config-space-type", NULL); in update_dn_pci_info()
283 dn->data = pdn; in update_dn_pci_info()
284 pdn->node = dn; in update_dn_pci_info()
289 regs = of_get_property(dn, "reg", NULL); in update_dn_pci_info()
299 regs = of_get_property(dn, "vendor-id", NULL); in update_dn_pci_info()
301 regs = of_get_property(dn, "device-id", NULL); in update_dn_pci_info()
303 regs = of_get_property(dn, "class-code", NULL); in update_dn_pci_info()
312 parent = of_get_parent(dn); in update_dn_pci_info()
341 struct device_node *dn, *nextdn; in traverse_pci_devices() local
345 for (dn = start->child; dn; dn = nextdn) { in traverse_pci_devices()
350 classp = of_get_property(dn, "class-code", NULL); in traverse_pci_devices()
354 if (pre && ((ret = pre(dn, data)) != NULL)) in traverse_pci_devices()
358 if (dn->child && ((class >> 8) == PCI_CLASS_BRIDGE_PCI || in traverse_pci_devices()
361 nextdn = dn->child; in traverse_pci_devices()
362 else if (dn->sibling) in traverse_pci_devices()
364 nextdn = dn->sibling; in traverse_pci_devices()
368 dn = dn->parent; in traverse_pci_devices()
369 if (dn == start) in traverse_pci_devices()
371 } while (dn->sibling == NULL); in traverse_pci_devices()
372 nextdn = dn->sibling; in traverse_pci_devices()
428 struct device_node *dn = phb->dn; in pci_devs_phb_init_dynamic() local
432 update_dn_pci_info(dn, phb); in pci_devs_phb_init_dynamic()
433 pdn = dn->data; in pci_devs_phb_init_dynamic()
442 traverse_pci_devices(dn, update_dn_pci_info, phb); in pci_devs_phb_init_dynamic()