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>
This commit is contained in:
@@ -27,7 +27,7 @@ int sata_remove(int devnum)
|
||||
struct udevice *dev;
|
||||
int rc;
|
||||
|
||||
blk_unbind_all(IF_TYPE_SATA);
|
||||
blk_unbind_all(UCLASS_AHCI);
|
||||
|
||||
rc = uclass_find_device(UCLASS_AHCI, devnum, &dev);
|
||||
if (!rc && !dev)
|
||||
@@ -111,7 +111,7 @@ static int do_sata(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
sata_curr_device = 0;
|
||||
}
|
||||
|
||||
return blk_common_cmd(argc, argv, IF_TYPE_SATA, &sata_curr_device);
|
||||
return blk_common_cmd(argc, argv, UCLASS_AHCI, &sata_curr_device);
|
||||
}
|
||||
|
||||
U_BOOT_CMD(
|
||||
|
||||
Reference in New Issue
Block a user