Lines Matching full:hp

207 static const u64 *vio_cfg_handle(struct mdesc_handle *hp, u64 node)  in vio_cfg_handle()  argument
212 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) { in vio_cfg_handle()
215 target = mdesc_arc_target(hp, a); in vio_cfg_handle()
216 cfg_handle = mdesc_get_property(hp, target, in vio_cfg_handle()
227 * @hp: Handle to the MD
238 u64 vio_vdev_node(struct mdesc_handle *hp, struct vio_dev *vdev) in vio_vdev_node() argument
245 node = mdesc_get_node(hp, (const char *)vdev->node_name, in vio_vdev_node()
252 static void vio_fill_channel_info(struct mdesc_handle *hp, u64 mp, in vio_fill_channel_info() argument
260 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) { in vio_fill_channel_info()
265 target = mdesc_arc_target(hp, a); in vio_fill_channel_info()
267 irq = mdesc_get_property(hp, target, "tx-ino", NULL); in vio_fill_channel_info()
271 irq = mdesc_get_property(hp, target, "rx-ino", NULL); in vio_fill_channel_info()
275 chan_id = mdesc_get_property(hp, target, "id", NULL); in vio_fill_channel_info()
292 static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, in vio_create_one() argument
302 type = mdesc_get_property(hp, mp, "device-type", &tlen); in vio_create_one()
304 type = mdesc_get_property(hp, mp, "name", &tlen); in vio_create_one()
306 type = mdesc_node_name(hp, mp); in vio_create_one()
316 id = mdesc_get_property(hp, mp, "id", NULL); in vio_create_one()
318 cfg_handle = vio_cfg_handle(hp, mp); in vio_create_one()
320 compat = mdesc_get_property(hp, mp, "device-type", &clen); in vio_create_one()
347 vio_fill_channel_info(hp, mp, vdev); in vio_create_one()
386 err = mdesc_get_node_info(hp, mp, node_name, in vio_create_one()
413 static void vio_add(struct mdesc_handle *hp, u64 node, in vio_add() argument
416 (void) vio_create_one(hp, node, node_name, &root_vdev->dev); in vio_add()
420 struct mdesc_handle *hp; member
432 node = vio_vdev_node(node_data->hp, vdev); in vio_md_node_match()
440 static void vio_remove(struct mdesc_handle *hp, u64 node, const char *node_name) in vio_remove() argument
445 node_data.hp = hp; in vio_remove()
471 static void vio_add_ds(struct mdesc_handle *hp, u64 node, in vio_add_ds() argument
478 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) { in vio_add_ds()
479 u64 target = mdesc_arc_target(hp, a); in vio_add_ds()
480 const char *name = mdesc_node_name(hp, target); in vio_add_ds()
489 (void) vio_create_one(hp, node, node_name, &root_vdev->dev); in vio_add_ds()
504 struct mdesc_handle *hp; in vio_init() local
517 hp = mdesc_grab(); in vio_init()
518 if (!hp) in vio_init()
521 root = mdesc_node_by_name(hp, MDESC_NODE_NULL, channel_devices_node); in vio_init()
524 mdesc_release(hp); in vio_init()
535 compat = mdesc_get_property(hp, root, "compatible", &len); in vio_init()
547 cfg_handle = mdesc_get_property(hp, root, cfg_handle_prop, NULL); in vio_init()
556 root_vdev = vio_create_one(hp, root, NULL, NULL); in vio_init()
566 mdesc_release(hp); in vio_init()
571 mdesc_release(hp); in vio_init()