Lines Matching refs:dn
43 struct device_node *dn; in find_vio_slot_node() local
49 for_each_child_of_node(parent, dn) { in find_vio_slot_node()
50 rc = rpaphp_check_drc_props(dn, drc_name, NULL); in find_vio_slot_node()
56 return dn; in find_vio_slot_node()
78 struct device_node *dn; in find_dlpar_node() local
80 dn = find_php_slot_pci_node(drc_name, "SLOT"); in find_dlpar_node()
81 if (dn) { in find_dlpar_node()
83 return dn; in find_dlpar_node()
86 dn = find_php_slot_pci_node(drc_name, "PHB"); in find_dlpar_node()
87 if (dn) { in find_dlpar_node()
89 return dn; in find_dlpar_node()
92 dn = find_vio_slot_node(drc_name); in find_dlpar_node()
93 if (dn) { in find_dlpar_node()
95 return dn; in find_dlpar_node()
110 static struct slot *find_php_slot(struct device_node *dn) in find_php_slot() argument
116 if (slot->dn == dn) in find_php_slot()
137 static void dlpar_pci_add_bus(struct device_node *dn) in dlpar_pci_add_bus() argument
139 struct pci_dn *pdn = PCI_DN(dn); in dlpar_pci_add_bus()
146 dev = of_create_pci_dev(dn, phb->bus, pdn->devfn); in dlpar_pci_add_bus()
149 __func__, dn); in dlpar_pci_add_bus()
168 static int dlpar_add_pci_slot(char *drc_name, struct device_node *dn) in dlpar_add_pci_slot() argument
173 if (pci_find_bus_by_node(dn)) in dlpar_add_pci_slot()
177 dlpar_pci_add_bus(dn); in dlpar_add_pci_slot()
180 phb = PCI_DN(dn)->phb; in dlpar_add_pci_slot()
181 dev = dlpar_find_new_dev(phb->bus, dn); in dlpar_add_pci_slot()
196 if (rpaphp_add_slot(dn)) { in dlpar_add_pci_slot()
204 static int dlpar_remove_phb(char *drc_name, struct device_node *dn) in dlpar_remove_phb() argument
210 if (!pci_find_bus_by_node(dn)) in dlpar_remove_phb()
214 slot = find_php_slot(dn); in dlpar_remove_phb()
221 pdn = dn->data; in dlpar_remove_phb()
232 static int dlpar_add_phb(char *drc_name, struct device_node *dn) in dlpar_add_phb() argument
236 if (PCI_DN(dn) && PCI_DN(dn)->phb) { in dlpar_add_phb()
241 phb = init_phb_dynamic(dn); in dlpar_add_phb()
245 if (rpaphp_add_slot(dn)) { in dlpar_add_phb()
253 static int dlpar_add_vio_slot(char *drc_name, struct device_node *dn) in dlpar_add_vio_slot() argument
257 vio_dev = vio_find_node(dn); in dlpar_add_vio_slot()
263 if (!vio_register_device_node(dn)) { in dlpar_add_vio_slot()
286 struct device_node *dn = NULL; in dlpar_add_slot() local
294 dn = find_dlpar_node(drc_name, &node_type); in dlpar_add_slot()
295 if (!dn) { in dlpar_add_slot()
302 rc = dlpar_add_vio_slot(drc_name, dn); in dlpar_add_slot()
305 rc = dlpar_add_pci_slot(drc_name, dn); in dlpar_add_slot()
308 rc = dlpar_add_phb(drc_name, dn); in dlpar_add_slot()
311 of_node_put(dn); in dlpar_add_slot()
329 static int dlpar_remove_vio_slot(char *drc_name, struct device_node *dn) in dlpar_remove_vio_slot() argument
333 vio_dev = vio_find_node(dn); in dlpar_remove_vio_slot()
355 static int dlpar_remove_pci_slot(char *drc_name, struct device_node *dn) in dlpar_remove_pci_slot() argument
363 bus = pci_find_bus_by_node(dn); in dlpar_remove_pci_slot()
372 slot = find_php_slot(dn); in dlpar_remove_pci_slot()
421 struct device_node *dn; in dlpar_remove_slot() local
428 dn = find_dlpar_node(drc_name, &node_type); in dlpar_remove_slot()
429 if (!dn) { in dlpar_remove_slot()
436 rc = dlpar_remove_vio_slot(drc_name, dn); in dlpar_remove_slot()
439 rc = dlpar_remove_phb(drc_name, dn); in dlpar_remove_slot()
442 rc = dlpar_remove_pci_slot(drc_name, dn); in dlpar_remove_slot()
445 of_node_put(dn); in dlpar_remove_slot()