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:
Simon Glass
2022-08-11 19:34:59 -06:00
committed by Tom Rini
parent adbfe8edc3
commit e33a5c6be5
41 changed files with 151 additions and 159 deletions

View File

@@ -1823,7 +1823,7 @@ static int part_delete(struct stm32prog_data *data,
* need to switch to associated hwpart 1 or 2
*/
if (part->part_id < 0)
if (blk_select_hwpart_devnum(IF_TYPE_MMC,
if (blk_select_hwpart_devnum(UCLASS_MMC,
part->dev->dev_id,
-part->part_id))
return -1;
@@ -1832,7 +1832,7 @@ static int part_delete(struct stm32prog_data *data,
/* return to user partition */
if (part->part_id < 0)
blk_select_hwpart_devnum(IF_TYPE_MMC,
blk_select_hwpart_devnum(UCLASS_MMC,
part->dev->dev_id, 0);
if (blks != blks_size) {
ret = -1;