blk: Switch over to using uclass IDs
We currently have an if_type (interface type) and a uclass id. These are
closely related and we don't need to have both.
Drop the if_type values and use the uclass ones instead.
Maintain the existing, subtle, one-way conversion between UCLASS_USB and
UCLASS_MASS_STORAGE for now, and add a comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/cmd/nvme.c b/cmd/nvme.c
index e715c57..09d5f43 100644
--- a/cmd/nvme.c
+++ b/cmd/nvme.c
@@ -28,7 +28,7 @@
if (strncmp(argv[1], "deta", 4) == 0) {
struct udevice *udev;
- ret = blk_get_device(IF_TYPE_NVME, nvme_curr_dev,
+ ret = blk_get_device(UCLASS_NVME, nvme_curr_dev,
&udev);
if (ret < 0)
return CMD_RET_FAILURE;
@@ -39,7 +39,7 @@
}
}
- return blk_common_cmd(argc, argv, IF_TYPE_NVME, &nvme_curr_dev);
+ return blk_common_cmd(argc, argv, UCLASS_NVME, &nvme_curr_dev);
}
U_BOOT_CMD(