Lines Matching refs:dp

28 void __initdata (*of_pdt_build_more)(struct device_node *dp);
37 static char * __init of_pdt_build_full_name(struct device_node *dp) in of_pdt_build_full_name() argument
42 dp->path_component_name = build_path_component(dp); in of_pdt_build_full_name()
44 plen = strlen(dp->parent->full_name); in of_pdt_build_full_name()
45 ourlen = strlen(dp->path_component_name); in of_pdt_build_full_name()
49 strcpy(n, dp->parent->full_name); in of_pdt_build_full_name()
50 if (!of_node_is_root(dp->parent)) { in of_pdt_build_full_name()
54 strcpy(n + plen, dp->path_component_name); in of_pdt_build_full_name()
62 static inline void irq_trans_init(struct device_node *dp) { } in irq_trans_init() argument
64 static char * __init of_pdt_build_full_name(struct device_node *dp) in of_pdt_build_full_name() argument
70 if (of_pdt_prom_ops->pkg2path(dp->phandle, NULL, 0, &len)) in of_pdt_build_full_name()
74 if (of_pdt_prom_ops->pkg2path(dp->phandle, buf, len, &len)) in of_pdt_build_full_name()
79 buf = prom_early_alloc(strlen(dp->parent->full_name) + in of_pdt_build_full_name()
80 strlen(dp->name) + 16); in of_pdt_build_full_name()
82 of_node_is_root(dp->parent) ? "" : dp->parent->full_name, in of_pdt_build_full_name()
83 dp->name, failsafe_id++); in of_pdt_build_full_name()
172 struct device_node *dp; in of_pdt_create_node() local
177 dp = prom_early_alloc(sizeof(*dp)); in of_pdt_create_node()
178 of_node_init(dp); in of_pdt_create_node()
179 of_pdt_incr_unique_id(dp); in of_pdt_create_node()
180 dp->parent = parent; in of_pdt_create_node()
182 dp->name = of_pdt_get_one_property(node, "name"); in of_pdt_create_node()
183 dp->type = of_pdt_get_one_property(node, "device_type"); in of_pdt_create_node()
184 dp->phandle = node; in of_pdt_create_node()
186 dp->properties = of_pdt_build_prop_list(node); in of_pdt_create_node()
188 irq_trans_init(dp); in of_pdt_create_node()
190 return dp; in of_pdt_create_node()
197 struct device_node *dp; in of_pdt_build_tree() local
200 dp = of_pdt_create_node(node, parent); in of_pdt_build_tree()
201 if (!dp) in of_pdt_build_tree()
205 prev_sibling->sibling = dp; in of_pdt_build_tree()
208 ret = dp; in of_pdt_build_tree()
209 prev_sibling = dp; in of_pdt_build_tree()
211 dp->full_name = of_pdt_build_full_name(dp); in of_pdt_build_tree()
213 dp->child = of_pdt_build_tree(dp, of_pdt_prom_ops->getchild(node)); in of_pdt_build_tree()
216 of_pdt_build_more(dp); in of_pdt_build_tree()