diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index cffa018..97f75cb 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -234,13 +234,27 @@
 	return 0;
 }
 
+static int bootdev_get_suffix_start(struct udevice *dev, const char *suffix)
+{
+	int len, slen;
+
+	len = strlen(dev->name);
+	slen = strlen(suffix);
+	if (len > slen && !strcmp(suffix, dev->name + len - slen))
+		return len - slen;
+
+	return len;
+}
+
 int bootdev_setup_sibling_blk(struct udevice *blk, const char *drv_name)
 {
 	struct udevice *parent, *dev;
 	char dev_name[50];
-	int ret;
+	int ret, len;
 
-	snprintf(dev_name, sizeof(dev_name), "%s.%s", blk->name, "bootdev");
+	len = bootdev_get_suffix_start(blk, ".blk");
+	snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name,
+		 "bootdev");
 
 	parent = dev_get_parent(blk);
 	ret = device_find_child_by_name(parent, dev_name, &dev);
@@ -271,20 +285,22 @@
 	struct udevice *parent = dev_get_parent(dev);
 	struct udevice *blk;
 	int ret, len;
-	char *p;
 
 	if (device_get_uclass_id(dev) != UCLASS_BOOTDEV)
 		return -EINVAL;
 
 	/* This should always work if bootdev_setup_sibling_blk() was used */
-	p = strstr(dev->name, ".bootdev");
-	if (!p)
-		return log_msg_ret("str", -EINVAL);
-
-	len = p - dev->name;
+	len = bootdev_get_suffix_start(dev, ".bootdev");
 	ret = device_find_child_by_namelen(parent, dev->name, len, &blk);
-	if (ret)
-		return log_msg_ret("find", ret);
+	if (ret) {
+		char dev_name[50];
+
+		snprintf(dev_name, sizeof(dev_name), "%.*s.blk", len,
+			 dev->name);
+		ret = device_find_child_by_name(parent, dev_name, &blk);
+		if (ret)
+			return log_msg_ret("find", ret);
+	}
 	*blkp = blk;
 
 	return 0;
@@ -295,13 +311,15 @@
 	struct udevice *parent = dev_get_parent(blk);
 	struct udevice *bootdev;
 	char dev_name[50];
-	int ret;
+	int ret, len;
 
 	if (device_get_uclass_id(blk) != UCLASS_BLK)
 		return -EINVAL;
 
 	/* This should always work if bootdev_setup_sibling_blk() was used */
-	snprintf(dev_name, sizeof(dev_name), "%s.%s", blk->name, "bootdev");
+	len = bootdev_get_suffix_start(blk, ".blk");
+	snprintf(dev_name, sizeof(dev_name), "%.*s.%s", len, blk->name,
+		 "bootdev");
 	ret = device_find_child_by_name(parent, dev_name, &bootdev);
 	if (ret)
 		return log_msg_ret("find", ret);
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c
index 759a6b7..01d9b02 100644
--- a/drivers/mmc/mmc-uclass.c
+++ b/drivers/mmc/mmc-uclass.c
@@ -421,7 +421,7 @@
 	mmc->cfg = cfg;
 	mmc->priv = dev;
 
-	ret = bootdev_setup_for_dev(dev, "mmc_bootdev");
+	ret = bootdev_setup_sibling_blk(bdev, "mmc_bootdev");
 	if (ret)
 		return log_msg_ret("bootdev", ret);
 
diff --git a/include/bootdev.h b/include/bootdev.h
index 9fc2198..d0ca51c 100644
--- a/include/bootdev.h
+++ b/include/bootdev.h
@@ -204,7 +204,10 @@
 
 #if CONFIG_IS_ENABLED(BOOTSTD)
 /**
- * bootdev_setup_for_dev() - Bind a new bootdev device
+ * bootdev_setup_for_dev() - Bind a new bootdev device (deprecated)
+ *
+ * Please use bootdev_setup_sibling_blk() instead since it supports multiple
+ * (child) block devices for each media device.
  *
  * Creates a bootdev device as a child of @parent. This should be called from
  * the driver's bind() method or its uclass' post_bind() method.
