aboutsummaryrefslogtreecommitdiff
path: root/common/spl
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-08-11 19:34:59 -0600
committerTom Rini <trini@konsulko.com>2022-09-16 11:05:16 -0400
commite33a5c6be55e7c012b2851f9bdf90e7f607e72bf (patch)
tree19041e9f1b54a5d2811c96e88132ba44fe31243b /common/spl
parentadbfe8edc3389ba635229195a95217d8b0dfa182 (diff)
downloadu-boot-e33a5c6be55e7c012b2851f9bdf90e7f607e72bf.zip
u-boot-e33a5c6be55e7c012b2851f9bdf90e7f607e72bf.tar.gz
u-boot-e33a5c6be55e7c012b2851f9bdf90e7f607e72bf.tar.bz2
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>
Diffstat (limited to 'common/spl')
-rw-r--r--common/spl/spl_sata.c2
-rw-r--r--common/spl/spl_usb.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/common/spl/spl_sata.c b/common/spl/spl_sata.c
index 1351d78..ea9f175 100644
--- a/common/spl/spl_sata.c
+++ b/common/spl/spl_sata.c
@@ -71,7 +71,7 @@ static int spl_sata_load_image(struct spl_image_info *spl_image,
/* try to recognize storage devices immediately */
scsi_scan(false);
- stor_dev = blk_get_devnum_by_type(IF_TYPE_SCSI, 0);
+ stor_dev = blk_get_devnum_by_type(UCLASS_SCSI, 0);
if (!stor_dev)
return -ENODEV;
diff --git a/common/spl/spl_usb.c b/common/spl/spl_usb.c
index ccf01c8..63c00f8 100644
--- a/common/spl/spl_usb.c
+++ b/common/spl/spl_usb.c
@@ -41,7 +41,7 @@ int spl_usb_load(struct spl_image_info *spl_image,
/* try to recognize storage devices immediately */
usb_stor_curr_dev = usb_stor_scan(1);
- stor_dev = blk_get_devnum_by_type(IF_TYPE_USB, usb_stor_curr_dev);
+ stor_dev = blk_get_devnum_by_type(UCLASS_USB, usb_stor_curr_dev);
if (!stor_dev)
return -ENODEV;