Lines Matching refs:dp
24 void __initdata (*of_pdt_build_more)(struct device_node *dp);
33 static char * __init of_pdt_build_full_name(struct device_node *dp) in of_pdt_build_full_name() argument
38 dp->path_component_name = build_path_component(dp); in of_pdt_build_full_name()
40 plen = strlen(dp->parent->full_name); in of_pdt_build_full_name()
41 ourlen = strlen(dp->path_component_name); in of_pdt_build_full_name()
45 strcpy(n, dp->parent->full_name); in of_pdt_build_full_name()
46 if (!of_node_is_root(dp->parent)) { in of_pdt_build_full_name()
50 strcpy(n + plen, dp->path_component_name); in of_pdt_build_full_name()
58 static inline void irq_trans_init(struct device_node *dp) { } in irq_trans_init() argument
60 static char * __init of_pdt_build_full_name(struct device_node *dp) in of_pdt_build_full_name() argument
66 if (of_pdt_prom_ops->pkg2path(dp->phandle, NULL, 0, &len)) in of_pdt_build_full_name()
70 if (of_pdt_prom_ops->pkg2path(dp->phandle, buf, len, &len)) in of_pdt_build_full_name()
75 buf = prom_early_alloc(strlen(dp->parent->full_name) + in of_pdt_build_full_name()
76 strlen(dp->name) + 16); in of_pdt_build_full_name()
78 of_node_is_root(dp->parent) ? "" : dp->parent->full_name, in of_pdt_build_full_name()
79 dp->name, failsafe_id++); in of_pdt_build_full_name()
168 struct device_node *dp; in of_pdt_create_node() local
173 dp = prom_early_alloc(sizeof(*dp)); in of_pdt_create_node()
174 of_node_init(dp); in of_pdt_create_node()
175 of_pdt_incr_unique_id(dp); in of_pdt_create_node()
176 dp->parent = parent; in of_pdt_create_node()
178 dp->name = of_pdt_get_one_property(node, "name"); in of_pdt_create_node()
179 dp->type = of_pdt_get_one_property(node, "device_type"); in of_pdt_create_node()
180 dp->phandle = node; in of_pdt_create_node()
182 dp->properties = of_pdt_build_prop_list(node); in of_pdt_create_node()
184 irq_trans_init(dp); in of_pdt_create_node()
186 return dp; in of_pdt_create_node()
193 struct device_node *dp; in of_pdt_build_tree() local
196 dp = of_pdt_create_node(node, parent); in of_pdt_build_tree()
197 if (!dp) in of_pdt_build_tree()
201 prev_sibling->sibling = dp; in of_pdt_build_tree()
204 ret = dp; in of_pdt_build_tree()
205 prev_sibling = dp; in of_pdt_build_tree()
207 dp->full_name = of_pdt_build_full_name(dp); in of_pdt_build_tree()
209 dp->child = of_pdt_build_tree(dp, of_pdt_prom_ops->getchild(node)); in of_pdt_build_tree()
212 of_pdt_build_more(dp); in of_pdt_build_tree()