diff options
author | Simon Glass <sjg@chromium.org> | 2022-09-17 09:00:09 -0600 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2022-09-25 08:30:05 -0600 |
commit | 8149b1500d805b56f2e3e42fb31c5554a2011745 (patch) | |
tree | 14738627c5576d3352d58df242fade4aec34c5f4 /cmd | |
parent | a2a9317cbc396c19baea217e091960c56c13f2c7 (diff) | |
download | u-boot-8149b1500d805b56f2e3e42fb31c5554a2011745.zip u-boot-8149b1500d805b56f2e3e42fb31c5554a2011745.tar.gz u-boot-8149b1500d805b56f2e3e42fb31c5554a2011745.tar.bz2 |
blk: Rename if_type to uclass_id
Use the word 'uclass' instead of 'if_type' to complete the conversion.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/bcb.c | 4 | ||||
-rw-r--r-- | cmd/blk_common.c | 18 | ||||
-rw-r--r-- | cmd/lsblk.c | 2 | ||||
-rw-r--r-- | cmd/mmc.c | 4 |
4 files changed, 14 insertions, 14 deletions
@@ -122,7 +122,7 @@ static int __bcb_load(int devnum, const char *partp) char *endp; int part, ret; - desc = blk_get_devnum_by_type(UCLASS_MMC, devnum); + desc = blk_get_devnum_by_uclass_id(UCLASS_MMC, devnum); if (!desc) { ret = -ENODEV; goto err_read_fail; @@ -287,7 +287,7 @@ static int __bcb_store(void) u64 cnt; int ret; - desc = blk_get_devnum_by_type(UCLASS_MMC, bcb_dev); + desc = blk_get_devnum_by_uclass_id(UCLASS_MMC, bcb_dev); if (!desc) { ret = -ENODEV; goto err; diff --git a/cmd/blk_common.c b/cmd/blk_common.c index 369c5ae..75a072c 100644 --- a/cmd/blk_common.c +++ b/cmd/blk_common.c @@ -12,10 +12,10 @@ #include <blk.h> #include <command.h> -int blk_common_cmd(int argc, char *const argv[], enum uclass_id if_type, +int blk_common_cmd(int argc, char *const argv[], enum uclass_id uclass_id, int *cur_devnump) { - const char *if_name = blk_get_if_type_name(if_type); + const char *if_name = blk_get_uclass_name(uclass_id); switch (argc) { case 0: @@ -23,16 +23,16 @@ int blk_common_cmd(int argc, char *const argv[], enum uclass_id if_type, return CMD_RET_USAGE; case 2: if (strncmp(argv[1], "inf", 3) == 0) { - blk_list_devices(if_type); + blk_list_devices(uclass_id); return 0; } else if (strncmp(argv[1], "dev", 3) == 0) { - if (blk_print_device_num(if_type, *cur_devnump)) { + if (blk_print_device_num(uclass_id, *cur_devnump)) { printf("\nno %s devices available\n", if_name); return CMD_RET_FAILURE; } return 0; } else if (strncmp(argv[1], "part", 4) == 0) { - if (blk_list_part(if_type)) + if (blk_list_part(uclass_id)) printf("\nno %s partition table available\n", if_name); return 0; @@ -42,7 +42,7 @@ int blk_common_cmd(int argc, char *const argv[], enum uclass_id if_type, if (strncmp(argv[1], "dev", 3) == 0) { int dev = (int)dectoul(argv[2], NULL); - if (!blk_show_device(if_type, dev)) { + if (!blk_show_device(uclass_id, dev)) { *cur_devnump = dev; printf("... is now current device\n"); } else { @@ -52,7 +52,7 @@ int blk_common_cmd(int argc, char *const argv[], enum uclass_id if_type, } else if (strncmp(argv[1], "part", 4) == 0) { int dev = (int)dectoul(argv[2], NULL); - if (blk_print_part_devnum(if_type, dev)) { + if (blk_print_part_devnum(uclass_id, dev)) { printf("\n%s device %d not available\n", if_name, dev); return CMD_RET_FAILURE; @@ -71,7 +71,7 @@ int blk_common_cmd(int argc, char *const argv[], enum uclass_id if_type, printf("\n%s read: device %d block # "LBAFU", count %lu ... ", if_name, *cur_devnump, blk, cnt); - n = blk_read_devnum(if_type, *cur_devnump, blk, cnt, + n = blk_read_devnum(uclass_id, *cur_devnump, blk, cnt, (ulong *)addr); printf("%ld blocks read: %s\n", n, @@ -86,7 +86,7 @@ int blk_common_cmd(int argc, char *const argv[], enum uclass_id if_type, printf("\n%s write: device %d block # "LBAFU", count %lu ... ", if_name, *cur_devnump, blk, cnt); - n = blk_write_devnum(if_type, *cur_devnump, blk, cnt, + n = blk_write_devnum(uclass_id, *cur_devnump, blk, cnt, (ulong *)addr); printf("%ld blocks written: %s\n", n, diff --git a/cmd/lsblk.c b/cmd/lsblk.c index 6a1c8f5..d214daf 100644 --- a/cmd/lsblk.c +++ b/cmd/lsblk.c @@ -36,7 +36,7 @@ static int do_lsblk(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv continue; desc = dev_get_uclass_plat(udev); printf("%c %s %u", i ? ',' : ':', - blk_get_if_type_name(desc->if_type), + blk_get_uclass_name(desc->uclass_id), desc->devnum); i++; } @@ -154,7 +154,7 @@ static struct mmc *__init_mmc_device(int dev, bool force_init, #ifdef CONFIG_BLOCK_CACHE struct blk_desc *bd = mmc_get_blk_desc(mmc); - blkcache_invalidate(bd->if_type, bd->devnum); + blkcache_invalidate(bd->uclass_id, bd->devnum); #endif return mmc; @@ -530,7 +530,7 @@ static int do_mmc_part(struct cmd_tbl *cmdtp, int flag, if (!mmc) return CMD_RET_FAILURE; - mmc_dev = blk_get_devnum_by_type(UCLASS_MMC, curr_device); + mmc_dev = blk_get_devnum_by_uclass_id(UCLASS_MMC, curr_device); if (mmc_dev != NULL && mmc_dev->type != DEV_TYPE_UNKNOWN) { part_print(mmc_dev); return CMD_RET_SUCCESS; |