summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2022-09-25 17:20:11 -0400
committerTom Rini <[email protected]>2022-09-25 17:20:11 -0400
commit9114b7cee817789ad59e0fb6d5cd57f50668b4e1 (patch)
treea6bd3d83314fee80b1b1a2e9a39df39d96a2dcc8 /cmd
parent81da5042e514bfd27516d3530dde4d62a6708ca4 (diff)
parent22c80d5603ac4c58debc8c776b8f138e76cf5f7c (diff)
Merge tag 'dm-next-25sep22' of https://gitlab.denx.de/u-boot/custodians/u-boot-dm into next
sandbox SCSI conversion to driver model final patch for blk improvements
Diffstat (limited to 'cmd')
-rw-r--r--cmd/bcb.c4
-rw-r--r--cmd/blk_common.c18
-rw-r--r--cmd/lsblk.c2
-rw-r--r--cmd/mmc.c4
4 files changed, 14 insertions, 14 deletions
diff --git a/cmd/bcb.c b/cmd/bcb.c
index 8b87aa062fe..1622a90c97f 100644
--- a/cmd/bcb.c
+++ b/cmd/bcb.c
@@ -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 369c5ae4bbe..75a072caf51 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 6a1c8f5ef40..d214dafc3be 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++;
}
diff --git a/cmd/mmc.c b/cmd/mmc.c
index 0f1f4e0a71d..c79d9407986 100644
--- a/cmd/mmc.c
+++ b/cmd/mmc.c
@@ -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;