Lines Matching full:hp

205 static const u64 *vio_cfg_handle(struct mdesc_handle *hp, u64 node)  in vio_cfg_handle()  argument
210 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) { in vio_cfg_handle()
213 target = mdesc_arc_target(hp, a); in vio_cfg_handle()
214 cfg_handle = mdesc_get_property(hp, target, in vio_cfg_handle()
225 * @hp: Handle to the MD
236 u64 vio_vdev_node(struct mdesc_handle *hp, struct vio_dev *vdev) in vio_vdev_node() argument
243 node = mdesc_get_node(hp, (const char *)vdev->node_name, in vio_vdev_node()
250 static void vio_fill_channel_info(struct mdesc_handle *hp, u64 mp, in vio_fill_channel_info() argument
258 mdesc_for_each_arc(a, hp, mp, MDESC_ARC_TYPE_FWD) { in vio_fill_channel_info()
263 target = mdesc_arc_target(hp, a); in vio_fill_channel_info()
265 irq = mdesc_get_property(hp, target, "tx-ino", NULL); in vio_fill_channel_info()
269 irq = mdesc_get_property(hp, target, "rx-ino", NULL); in vio_fill_channel_info()
273 chan_id = mdesc_get_property(hp, target, "id", NULL); in vio_fill_channel_info()
290 static struct vio_dev *vio_create_one(struct mdesc_handle *hp, u64 mp, in vio_create_one() argument
300 type = mdesc_get_property(hp, mp, "device-type", &tlen); in vio_create_one()
302 type = mdesc_get_property(hp, mp, "name", &tlen); in vio_create_one()
304 type = mdesc_node_name(hp, mp); in vio_create_one()
314 id = mdesc_get_property(hp, mp, "id", NULL); in vio_create_one()
316 cfg_handle = vio_cfg_handle(hp, mp); in vio_create_one()
318 compat = mdesc_get_property(hp, mp, "device-type", &clen); in vio_create_one()
345 vio_fill_channel_info(hp, mp, vdev); in vio_create_one()
384 err = mdesc_get_node_info(hp, mp, node_name, in vio_create_one()
411 static void vio_add(struct mdesc_handle *hp, u64 node, in vio_add() argument
414 (void) vio_create_one(hp, node, node_name, &root_vdev->dev); in vio_add()
418 struct mdesc_handle *hp; member
430 node = vio_vdev_node(node_data->hp, vdev); in vio_md_node_match()
438 static void vio_remove(struct mdesc_handle *hp, u64 node, const char *node_name) in vio_remove() argument
443 node_data.hp = hp; in vio_remove()
469 static void vio_add_ds(struct mdesc_handle *hp, u64 node, in vio_add_ds() argument
476 mdesc_for_each_arc(a, hp, node, MDESC_ARC_TYPE_BACK) { in vio_add_ds()
477 u64 target = mdesc_arc_target(hp, a); in vio_add_ds()
478 const char *name = mdesc_node_name(hp, target); in vio_add_ds()
487 (void) vio_create_one(hp, node, node_name, &root_vdev->dev); in vio_add_ds()
502 struct mdesc_handle *hp; in vio_init() local
515 hp = mdesc_grab(); in vio_init()
516 if (!hp) in vio_init()
519 root = mdesc_node_by_name(hp, MDESC_NODE_NULL, channel_devices_node); in vio_init()
522 mdesc_release(hp); in vio_init()
533 compat = mdesc_get_property(hp, root, "compatible", &len); in vio_init()
545 cfg_handle = mdesc_get_property(hp, root, cfg_handle_prop, NULL); in vio_init()
554 root_vdev = vio_create_one(hp, root, NULL, NULL); in vio_init()
564 mdesc_release(hp); in vio_init()
569 mdesc_release(hp); in vio_init()