Lines Matching refs:devnum

67 struct blk_desc *blk_get_devnum_by_type(enum if_type if_type, int devnum)  in blk_get_devnum_by_type()  argument
73 ret = blk_get_device(if_type, devnum, &dev); in blk_get_devnum_by_type()
86 struct blk_desc *blk_get_devnum_by_typename(const char *if_typename, int devnum) in blk_get_devnum_by_typename() argument
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()
169 static int get_desc(enum if_type if_type, int devnum, struct blk_desc **descp) in get_desc() argument
184 if_type, devnum, dev->name, desc->if_type, desc->devnum); in get_desc()
186 if (desc->devnum == devnum) { in get_desc()
193 } else if (desc->devnum > devnum) { in get_desc()
202 int blk_select_hwpart_devnum(enum if_type if_type, int devnum, int hwpart) in blk_select_hwpart_devnum() argument
207 ret = blk_get_device(if_type, devnum, &dev); in blk_select_hwpart_devnum()
217 int devnum, ok; in blk_list_part() local
220 for (ok = 0, devnum = 0;; ++devnum) { in blk_list_part()
221 ret = get_desc(if_type, devnum, &desc); in blk_list_part()
228 if (devnum) in blk_list_part()
239 int blk_print_part_devnum(enum if_type if_type, int devnum) in blk_print_part_devnum() argument
244 ret = get_desc(if_type, devnum, &desc); in blk_print_part_devnum()
273 int blk_print_device_num(enum if_type if_type, int devnum) in blk_print_device_num() argument
278 ret = get_desc(if_type, devnum, &desc); in blk_print_device_num()
281 printf("\nIDE device %d: ", devnum); in blk_print_device_num()
287 int blk_show_device(enum if_type if_type, int devnum) in blk_show_device() argument
292 printf("\nDevice %d: ", devnum); in blk_show_device()
293 ret = get_desc(if_type, devnum, &desc); in blk_show_device()
308 ulong blk_read_devnum(enum if_type if_type, int devnum, lbaint_t start, in blk_read_devnum() argument
315 ret = get_desc(if_type, devnum, &desc); in blk_read_devnum()
325 ulong blk_write_devnum(enum if_type if_type, int devnum, lbaint_t start, in blk_write_devnum() argument
331 ret = get_desc(if_type, devnum, &desc); in blk_write_devnum()
395 int blk_find_device(int if_type, int devnum, struct udevice **devp) in blk_find_device() argument
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()
418 int blk_get_device(int if_type, int devnum, struct udevice **devp) in blk_get_device() argument
422 ret = blk_find_device(if_type, devnum, devp); in blk_get_device()
439 if (blkcache_read(block_dev->if_type, block_dev->devnum, in blk_dread()
444 blkcache_fill(block_dev->if_type, block_dev->devnum, in blk_dread()
459 blkcache_invalidate(block_dev->if_type, block_dev->devnum); in blk_dwrite()
472 blkcache_invalidate(block_dev->if_type, block_dev->devnum); in blk_derase()
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()
535 static int blk_claim_devnum(enum if_type if_type, int devnum) in blk_claim_devnum() argument
547 if (desc->if_type == if_type && desc->devnum == devnum) { in blk_claim_devnum()
552 desc->devnum = next; in blk_claim_devnum()
561 const char *name, int if_type, int devnum, int blksz, in blk_create_device() argument
568 if (devnum == -1) { in blk_create_device()
569 devnum = blk_next_free_devnum(if_type); in blk_create_device()
571 ret = blk_claim_devnum(if_type, devnum); in blk_create_device()
575 if (devnum < 0) in blk_create_device()
576 return devnum; in blk_create_device()
586 desc->devnum = devnum; in blk_create_device()
593 const char *name, int if_type, int devnum, int blksz, in blk_create_devicef() argument
604 ret = blk_create_device(parent, drv_name, str, if_type, devnum, in blk_create_devicef()