Lines Matching refs:dev
45 struct udevice *dev; in do_host_bind() local
75 ret = host_create_attach_file(label, file, removable, blksz, &dev); in do_host_bind()
94 struct udevice *dev; in parse_host_label() local
96 dev = host_find_by_label(label); in parse_host_label()
97 if (!dev) { in parse_host_label()
103 uclass_find_device_by_seq(UCLASS_HOST, devnum, &dev)) { in parse_host_label()
109 return dev; in parse_host_label()
115 struct udevice *dev; in do_host_unbind() local
123 dev = parse_host_label(label); in do_host_unbind()
124 if (!dev) in do_host_unbind()
127 ret = host_detach_file(dev); in do_host_unbind()
133 ret = device_unbind(dev); in do_host_unbind()
136 ret = device_unbind(dev); in do_host_unbind()
138 printf("Cannot unbind device '%s'\n", dev->name); in do_host_unbind()
145 static void show_host_dev(struct udevice *dev) in show_host_dev() argument
147 struct host_sb_plat *plat = dev_get_plat(dev); in show_host_dev()
152 printf("%3d ", dev_seq(dev)); in show_host_dev()
157 ret = blk_get_from_parent(dev, &blk); in show_host_dev()
169 struct udevice *dev; in do_host_info() local
174 dev = NULL; in do_host_info()
176 dev = parse_host_label(argv[1]); in do_host_info()
177 if (!dev) in do_host_info()
183 if (dev) { in do_host_info()
184 show_host_dev(dev); in do_host_info()
188 uclass_id_foreach_dev(UCLASS_HOST, dev, uc) in do_host_info()
189 show_host_dev(dev); in do_host_info()
198 struct udevice *dev; in do_host_dev() local
207 dev = host_get_cur_dev(); in do_host_dev()
208 if (!dev) { in do_host_dev()
212 plat = dev_get_plat(dev); in do_host_dev()
213 printf("Current host device: %d: %s\n", dev_seq(dev), in do_host_dev()
219 dev = parse_host_label(argv[1]); in do_host_dev()
220 if (!dev) in do_host_dev()
223 host_set_cur_dev(dev); in do_host_dev()
236 U_BOOT_CMD_MKENT(dev, 0, 1, do_host_dev, "", ""),