Lines Matching defs:hp

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