Lines Matching refs:devnum
73 struct blk_desc *blk_get_devnum_by_type(enum if_type if_type, int devnum) in blk_get_devnum_by_type() argument
79 ret = blk_get_device(if_type, devnum, &dev); in blk_get_devnum_by_type()
92 struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum) in blk_get_devnum_by_typename() argument
120 if_type, devnum, dev->name, desc->if_type, desc->devnum); in blk_get_devnum_by_typename()
121 if (desc->devnum != devnum) in blk_get_devnum_by_typename()
175 static int get_desc(enum if_type if_type, int devnum, struct blk_desc **descp) in get_desc() argument
190 if_type, devnum, dev->name, desc->if_type, desc->devnum); in get_desc()
192 if (desc->devnum == devnum) { in get_desc()
199 } else if (desc->devnum > devnum) { in get_desc()
208 int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart) in blk_select_hwpart_devnum() argument
213 ret = blk_get_device(if_type, devnum, &dev); in blk_select_hwpart_devnum()
223 int devnum, ok; in blk_list_part() local
226 for (ok = 0, devnum = 0;; ++devnum) { in blk_list_part()
227 ret = get_desc(if_type, devnum, &desc); in blk_list_part()
234 if (devnum) in blk_list_part()
245 int blk_print_part_devnum(enum if_type if_type, int devnum) in blk_print_part_devnum() argument
250 ret = get_desc(if_type, devnum, &desc); in blk_print_part_devnum()
279 int blk_print_device_num(enum if_type if_type, int devnum) in blk_print_device_num() argument
284 ret = get_desc(if_type, devnum, &desc); in blk_print_device_num()
287 printf("\nIDE device %d: ", devnum); in blk_print_device_num()
293 int blk_show_device(enum if_type if_type, int devnum) in blk_show_device() argument
298 printf("\nDevice %d: ", devnum); in blk_show_device()
299 ret = get_desc(if_type, devnum, &desc); in blk_show_device()
314 ulong blk_read_devnum(enum if_type if_type, int devnum, lbaint_t start, in blk_read_devnum() argument
321 ret = get_desc(if_type, devnum, &desc); in blk_read_devnum()
331 ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start, in blk_write_devnum() argument
337 ret = get_desc(if_type, devnum, &desc); in blk_write_devnum()
401 int blk_find_device(int if_type, int devnum, struct udevice **devp) in blk_find_device() argument
414 if_type, devnum, dev->name, desc->if_type, desc->devnum); in blk_find_device()
415 if (desc->if_type == if_type && desc->devnum == devnum) { in blk_find_device()
424 int blk_get_device(int if_type, int devnum, struct udevice **devp) in blk_get_device() argument
428 ret = blk_find_device(if_type, devnum, devp); in blk_get_device()
445 if (blkcache_read(block_dev->if_type, block_dev->devnum, in blk_dread()
450 blkcache_fill(block_dev->if_type, block_dev->devnum, in blk_dread()
465 blkcache_invalidate(block_dev->if_type, block_dev->devnum); in blk_dwrite()
478 blkcache_invalidate(block_dev->if_type, block_dev->devnum); in blk_derase()
521 if (desc->if_type == if_type && desc->devnum > max_devnum) in blk_find_max_devnum()
522 max_devnum = desc->devnum; in blk_find_max_devnum()
541 static int blk_claim_devnum(enum if_type if_type, int devnum) in blk_claim_devnum() argument
553 if (desc->if_type == if_type && desc->devnum == devnum) { in blk_claim_devnum()
558 desc->devnum = next; in blk_claim_devnum()
567 const char *name, int if_type, int devnum, int blksz, in blk_create_device() argument
574 if (devnum == -1) { in blk_create_device()
575 devnum = blk_next_free_devnum(if_type); in blk_create_device()
577 ret = blk_claim_devnum(if_type, devnum); in blk_create_device()
581 if (devnum < 0) in blk_create_device()
582 return devnum; in blk_create_device()
593 desc->devnum = devnum; in blk_create_device()
600 const char *name, int if_type, int devnum, int blksz, in blk_create_devicef() argument
611 ret = blk_create_device(parent, drv_name, str, if_type, devnum, in blk_create_devicef()