Lines Matching refs:desc
69 struct blk_desc *desc; in blk_get_devnum_by_type() local
76 desc = dev_get_uclass_platdata(dev); in blk_get_devnum_by_type()
78 return desc; in blk_get_devnum_by_type()
111 struct blk_desc *desc = dev_get_uclass_platdata(dev); in blk_get_devnum_by_typename() local
114 if_type, devnum, dev->name, desc->if_type, desc->devnum); in blk_get_devnum_by_typename()
115 if (desc->devnum != devnum) in blk_get_devnum_by_typename()
128 debug("%s: Device desc %p\n", __func__, desc); in blk_get_devnum_by_typename()
129 return desc; in blk_get_devnum_by_typename()
181 struct blk_desc *desc = dev_get_uclass_platdata(dev); in get_desc() local
184 if_type, devnum, dev->name, desc->if_type, desc->devnum); in get_desc()
185 if (desc->if_type == if_type) { in get_desc()
186 if (desc->devnum == devnum) { in get_desc()
191 *descp = desc; in get_desc()
193 } else if (desc->devnum > devnum) { in get_desc()
216 struct blk_desc *desc; in blk_list_part() local
221 ret = get_desc(if_type, devnum, &desc); in blk_list_part()
226 if (desc->part_type != PART_TYPE_UNKNOWN) { in blk_list_part()
230 part_print(desc); in blk_list_part()
241 struct blk_desc *desc; in blk_print_part_devnum() local
244 ret = get_desc(if_type, devnum, &desc); in blk_print_part_devnum()
247 if (desc->type == DEV_TYPE_UNKNOWN) in blk_print_part_devnum()
249 part_print(desc); in blk_print_part_devnum()
256 struct blk_desc *desc; in blk_list_devices() local
261 ret = get_desc(if_type, i, &desc); in blk_list_devices()
266 if (desc->type == DEV_TYPE_UNKNOWN) in blk_list_devices()
269 dev_print(desc); in blk_list_devices()
275 struct blk_desc *desc; in blk_print_device_num() local
278 ret = get_desc(if_type, devnum, &desc); in blk_print_device_num()
282 dev_print(desc); in blk_print_device_num()
289 struct blk_desc *desc; in blk_show_device() local
293 ret = get_desc(if_type, devnum, &desc); in blk_show_device()
300 dev_print(desc); in blk_show_device()
302 if (desc->type == DEV_TYPE_UNKNOWN) in blk_show_device()
311 struct blk_desc *desc; in blk_read_devnum() local
315 ret = get_desc(if_type, devnum, &desc); in blk_read_devnum()
318 n = blk_dread(desc, start, blkcnt, buffer); in blk_read_devnum()
328 struct blk_desc *desc; in blk_write_devnum() local
331 ret = get_desc(if_type, devnum, &desc); in blk_write_devnum()
334 return blk_dwrite(desc, start, blkcnt, buffer); in blk_write_devnum()
349 int blk_dselect_hwpart(struct blk_desc *desc, int hwpart) in blk_dselect_hwpart() argument
351 return blk_select_hwpart(desc->bdev, hwpart); in blk_dselect_hwpart()
356 struct blk_desc *desc; in blk_first_device() local
365 desc = dev_get_uclass_platdata(*devp); in blk_first_device()
366 if (desc->if_type == if_type) in blk_first_device()
378 struct blk_desc *desc; in blk_next_device() local
381 desc = dev_get_uclass_platdata(*devp); in blk_next_device()
382 if_type = desc->if_type; in blk_next_device()
389 desc = dev_get_uclass_platdata(*devp); in blk_next_device()
390 if (desc->if_type == if_type) in blk_next_device()
405 struct blk_desc *desc = dev_get_uclass_platdata(dev); in blk_find_device() local
408 if_type, devnum, dev->name, desc->if_type, desc->devnum); in blk_find_device()
409 if (desc->if_type == if_type && desc->devnum == devnum) { in blk_find_device()
513 struct blk_desc *desc = dev_get_uclass_platdata(dev); in blk_find_max_devnum() local
515 if (desc->if_type == if_type && desc->devnum > max_devnum) in blk_find_max_devnum()
516 max_devnum = desc->devnum; in blk_find_max_devnum()
545 struct blk_desc *desc = dev_get_uclass_platdata(dev); in blk_claim_devnum() local
547 if (desc->if_type == if_type && desc->devnum == devnum) { in blk_claim_devnum()
552 desc->devnum = next; in blk_claim_devnum()
564 struct blk_desc *desc; in blk_create_device() local
580 desc = dev_get_uclass_platdata(dev); in blk_create_device()
581 desc->if_type = if_type; in blk_create_device()
582 desc->blksz = blksz; in blk_create_device()
583 desc->lba = lba; in blk_create_device()
584 desc->part_type = PART_TYPE_UNKNOWN; in blk_create_device()
585 desc->bdev = dev; in blk_create_device()
586 desc->devnum = devnum; in blk_create_device()
625 struct blk_desc *desc = dev_get_uclass_platdata(dev); in blk_unbind_all() local
627 if (desc->if_type == if_type) { in blk_unbind_all()
643 struct blk_desc *desc = dev_get_uclass_platdata(dev); in blk_post_probe() local
645 part_init(desc); in blk_post_probe()