Lines Matching refs:dn
44 struct device_node *dn; in find_vio_slot_node() local
50 for_each_child_of_node(parent, dn) { in find_vio_slot_node()
51 rc = rpaphp_check_drc_props(dn, drc_name, NULL); in find_vio_slot_node()
57 return dn; in find_vio_slot_node()
79 struct device_node *dn; in find_dlpar_node() local
81 dn = find_php_slot_pci_node(drc_name, "SLOT"); in find_dlpar_node()
82 if (dn) { in find_dlpar_node()
84 return dn; in find_dlpar_node()
87 dn = find_php_slot_pci_node(drc_name, "PHB"); in find_dlpar_node()
88 if (dn) { in find_dlpar_node()
90 return dn; in find_dlpar_node()
93 dn = find_vio_slot_node(drc_name); in find_dlpar_node()
94 if (dn) { in find_dlpar_node()
96 return dn; in find_dlpar_node()
111 static struct slot *find_php_slot(struct device_node *dn) in find_php_slot() argument
117 if (slot->dn == dn) in find_php_slot()
138 static void dlpar_pci_add_bus(struct device_node *dn) in dlpar_pci_add_bus() argument
140 struct pci_dn *pdn = PCI_DN(dn); in dlpar_pci_add_bus()
147 dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); in dlpar_pci_add_bus()
150 __func__, dn); in dlpar_pci_add_bus()
169 static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) in dlpar_add_pci_slot() argument
174 if (pci_find_bus_by_node(dn)) in dlpar_add_pci_slot()
178 dlpar_pci_add_bus(dn); in dlpar_add_pci_slot()
181 phb = PCI_DN(dn)->phb; in dlpar_add_pci_slot()
182 dev = dlpar_find_new_dev(phb->bus, dn); in dlpar_add_pci_slot()
197 if (rpaphp_add_slot(dn)) { in dlpar_add_pci_slot()
205 static int dlpar_remove_phb(char *drc_name, struct device_node *dn) in dlpar_remove_phb() argument
211 if (!pci_find_bus_by_node(dn)) in dlpar_remove_phb()
215 slot = find_php_slot(dn); in dlpar_remove_phb()
222 pdn = dn->data; in dlpar_remove_phb()
233 static int dlpar_add_phb(char *drc_name, struct device_node *dn) in dlpar_add_phb() argument
237 if (PCI_DN(dn) && PCI_DN(dn)->phb) { in dlpar_add_phb()
242 phb = init_phb_dynamic(dn); in dlpar_add_phb()
246 if (rpaphp_add_slot(dn)) { in dlpar_add_phb()
254 static int dlpar_add_vio_slot(char *drc_name, struct device_node *dn) in dlpar_add_vio_slot() argument
258 vio_dev = vio_find_node(dn); in dlpar_add_vio_slot()
264 if (!vio_register_device_node(dn)) { in dlpar_add_vio_slot()
287 struct device_node *dn = NULL; in dlpar_add_slot() local
295 dn = find_dlpar_node(drc_name, &node_type); in dlpar_add_slot()
296 if (!dn) { in dlpar_add_slot()
303 rc = dlpar_add_vio_slot(drc_name, dn); in dlpar_add_slot()
306 rc = dlpar_add_pci_slot(drc_name, dn); in dlpar_add_slot()
309 rc = dlpar_add_phb(drc_name, dn); in dlpar_add_slot()
312 of_node_put(dn); in dlpar_add_slot()
330 static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn) in dlpar_remove_vio_slot() argument
334 vio_dev = vio_find_node(dn); in dlpar_remove_vio_slot()
356 static int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) in dlpar_remove_pci_slot() argument
364 bus = pci_find_bus_by_node(dn); in dlpar_remove_pci_slot()
373 slot = find_php_slot(dn); in dlpar_remove_pci_slot()
422 struct device_node *dn; in dlpar_remove_slot() local
429 dn = find_dlpar_node(drc_name, &node_type); in dlpar_remove_slot()
430 if (!dn) { in dlpar_remove_slot()
437 rc = dlpar_remove_vio_slot(drc_name, dn); in dlpar_remove_slot()
440 rc = dlpar_remove_phb(drc_name, dn); in dlpar_remove_slot()
443 rc = dlpar_remove_pci_slot(drc_name, dn); in dlpar_remove_slot()
446 of_node_put(dn); in dlpar_remove_slot()