Lines Matching refs:dn

157 static int get_children_props(struct device_node *dn, const __be32 **drc_indexes,  in get_children_props()  argument
163 indexes = of_get_property(dn, "ibm,drc-indexes", NULL); in get_children_props()
164 names = of_get_property(dn, "ibm,drc-names", NULL); in get_children_props()
165 types = of_get_property(dn, "ibm,drc-types", NULL); in get_children_props()
166 domains = of_get_property(dn, "ibm,drc-power-domains", NULL); in get_children_props()
193 static int rpaphp_check_drc_props_v1(struct device_node *dn, char *drc_name, in rpaphp_check_drc_props_v1() argument
201 rc = get_children_props(dn->parent, &indexes, &names, &types, &domains); in rpaphp_check_drc_props_v1()
225 static int rpaphp_check_drc_props_v2(struct device_node *dn, char *drc_name, in rpaphp_check_drc_props_v2() argument
235 info = of_find_property(dn->parent, "ibm,drc-info", NULL); in rpaphp_check_drc_props_v2()
268 int rpaphp_check_drc_props(struct device_node *dn, char *drc_name, in rpaphp_check_drc_props() argument
273 my_index = of_get_property(dn, "ibm,my-drc-index", NULL); in rpaphp_check_drc_props()
279 if (of_find_property(dn->parent, "ibm,drc-info", NULL)) in rpaphp_check_drc_props()
280 return rpaphp_check_drc_props_v2(dn, drc_name, drc_type, in rpaphp_check_drc_props()
283 return rpaphp_check_drc_props_v1(dn, drc_name, drc_type, in rpaphp_check_drc_props()
314 static int is_php_dn(struct device_node *dn, const __be32 **indexes, in is_php_dn() argument
321 rc = get_children_props(dn, indexes, names, &drc_types, power_domains); in is_php_dn()
332 static int rpaphp_drc_info_add_slot(struct device_node *dn) in rpaphp_drc_info_add_slot() argument
342 info = of_find_property(dn, "ibm,drc-info", NULL); in rpaphp_drc_info_add_slot()
358 slot = alloc_slot_struct(dn, drc.drc_index_start, drc_name, drc.drc_power_domain); in rpaphp_drc_info_add_slot()
373 static int rpaphp_drc_add_slot(struct device_node *dn) in rpaphp_drc_add_slot() argument
382 if (!is_php_dn(dn, &indexes, &names, &types, &power_domains)) in rpaphp_drc_add_slot()
385 dbg("Entry %s: dn=%pOF\n", __func__, dn); in rpaphp_drc_add_slot()
394 slot = alloc_slot_struct(dn, index, name, in rpaphp_drc_add_slot()
436 int rpaphp_add_slot(struct device_node *dn) in rpaphp_add_slot() argument
438 if (!of_node_name_eq(dn, "pci")) in rpaphp_add_slot()
441 if (of_find_property(dn, "ibm,drc-info", NULL)) in rpaphp_add_slot()
442 return rpaphp_drc_info_add_slot(dn); in rpaphp_add_slot()
444 return rpaphp_drc_add_slot(dn); in rpaphp_add_slot()
467 struct device_node *dn; in rpaphp_init() local
471 for_each_node_by_name(dn, "pci") in rpaphp_init()
472 rpaphp_add_slot(dn); in rpaphp_init()
496 pseries_eeh_init_edev_recursive(PCI_DN(slot->dn)); in enable_slot()