Lines Matching refs:dn

159 static int get_children_props(struct device_node *dn, const __be32 **drc_indexes,  in get_children_props()  argument
165 indexes = of_get_property(dn, "ibm,drc-indexes", NULL); in get_children_props()
166 names = of_get_property(dn, "ibm,drc-names", NULL); in get_children_props()
167 types = of_get_property(dn, "ibm,drc-types", NULL); in get_children_props()
168 domains = of_get_property(dn, "ibm,drc-power-domains", NULL); in get_children_props()
195 static int rpaphp_check_drc_props_v1(struct device_node *dn, char *drc_name, in rpaphp_check_drc_props_v1() argument
203 rc = get_children_props(dn->parent, &indexes, &names, &types, &domains); in rpaphp_check_drc_props_v1()
227 static int rpaphp_check_drc_props_v2(struct device_node *dn, char *drc_name, in rpaphp_check_drc_props_v2() argument
237 info = of_find_property(dn->parent, "ibm,drc-info", NULL); in rpaphp_check_drc_props_v2()
270 int rpaphp_check_drc_props(struct device_node *dn, char *drc_name, in rpaphp_check_drc_props() argument
275 my_index = of_get_property(dn, "ibm,my-drc-index", NULL); in rpaphp_check_drc_props()
281 if (of_find_property(dn->parent, "ibm,drc-info", NULL)) in rpaphp_check_drc_props()
282 return rpaphp_check_drc_props_v2(dn, drc_name, drc_type, in rpaphp_check_drc_props()
285 return rpaphp_check_drc_props_v1(dn, drc_name, drc_type, in rpaphp_check_drc_props()
316 static int is_php_dn(struct device_node *dn, const __be32 **indexes, in is_php_dn() argument
323 rc = get_children_props(dn, indexes, names, &drc_types, power_domains); in is_php_dn()
334 static int rpaphp_drc_info_add_slot(struct device_node *dn) in rpaphp_drc_info_add_slot() argument
344 info = of_find_property(dn, "ibm,drc-info", NULL); in rpaphp_drc_info_add_slot()
360 slot = alloc_slot_struct(dn, drc.drc_index_start, drc_name, drc.drc_power_domain); in rpaphp_drc_info_add_slot()
375 static int rpaphp_drc_add_slot(struct device_node *dn) in rpaphp_drc_add_slot() argument
384 if (!is_php_dn(dn, &indexes, &names, &types, &power_domains)) in rpaphp_drc_add_slot()
387 dbg("Entry %s: dn=%pOF\n", __func__, dn); in rpaphp_drc_add_slot()
396 slot = alloc_slot_struct(dn, index, name, in rpaphp_drc_add_slot()
438 int rpaphp_add_slot(struct device_node *dn) in rpaphp_add_slot() argument
440 if (!of_node_name_eq(dn, "pci")) in rpaphp_add_slot()
443 if (of_find_property(dn, "ibm,drc-info", NULL)) in rpaphp_add_slot()
444 return rpaphp_drc_info_add_slot(dn); in rpaphp_add_slot()
446 return rpaphp_drc_add_slot(dn); in rpaphp_add_slot()
469 struct device_node *dn; in rpaphp_init() local
473 for_each_node_by_name(dn, "pci") in rpaphp_init()
474 rpaphp_add_slot(dn); in rpaphp_init()
498 pseries_eeh_init_edev_recursive(PCI_DN(slot->dn)); in enable_slot()