Lines Matching refs:mdp

48 static md_node_t *link_device_node(mmd_t *mdp,
50 static int create_children(mmd_t *mdp,
52 static int create_peers(mmd_t *mdp,
54 static int device_tree_to_md(mmd_t *mdp, md_node_t *top);
148 mmd_t *mdp, md_node_t *np, di_node_t di, char *name, char *alt_name) in add_prom_string_prop() argument
165 rv = md_add_data_property(mdp, in add_prom_string_prop()
179 mmd_t *mdp, md_node_t *np, di_node_t di, char *name, char *alt_name) in add_prom_int_prop() argument
198 rv = md_add_value_property(mdp, np, name, *pp_data); in add_prom_int_prop()
204 link_device_node(mmd_t *mdp, in link_device_node() argument
209 np = md_link_new_node(mdp, "iodevice", node, "fwd", "back"); in link_device_node()
214 if (md_add_string_property(mdp, np, "dev_path", path) != 0) in link_device_node()
218 if (add_prom_string_prop(ph, mdp, np, di, "device_type", NULL) != 0) in link_device_node()
221 if (add_prom_string_prop(ph, mdp, np, di, "compatible", NULL) != 0) in link_device_node()
225 mdp, np, di, "device-id", "real-device-id") != 0) in link_device_node()
229 mdp, np, di, "vendor-id", "real-vendor-id") != 0) in link_device_node()
233 mdp, np, di, "class-code", "real-class-code") != 0) in link_device_node()
239 md_free_node(mdp, np); in link_device_node()
244 create_children(mmd_t *mdp, in create_children() argument
257 md_node = link_device_node(mdp, ph, di_parent, md_parent, path); in create_children()
266 md_child = link_device_node(mdp, in create_children()
274 rv = create_peers(mdp, ph, md_node, di_child); in create_children()
285 create_peers(mmd_t *mdp, di_prom_handle_t ph, md_node_t *node, di_node_t dev) in create_peers() argument
291 rv = create_children(mdp, ph, node, di_peer); in create_peers()
300 device_tree_to_md(mmd_t *mdp, md_node_t *top) in device_tree_to_md() argument
324 rv = create_children(mdp, ph, top, node); in device_tree_to_md()
339 mmd_t *mdp; in get_devinfo() local
344 mdp = md_new_md(); in get_devinfo()
345 if (mdp == NULL) { in get_devinfo()
348 rootp = md_new_node(mdp, "root"); in get_devinfo()
350 md_destroy(mdp); in get_devinfo()
354 if (device_tree_to_md(mdp, rootp) != 0) { in get_devinfo()
355 md_destroy(mdp); in get_devinfo()
358 md_size = (int)md_gen_bin(mdp, &md_bufp); in get_devinfo()
361 md_destroy(mdp); in get_devinfo()
367 md_destroy(mdp); in get_devinfo()