summaryrefslogtreecommitdiff
path: root/boot
diff options
context:
space:
mode:
authorTom Rini <[email protected]>2023-10-14 10:50:20 -0400
committerTom Rini <[email protected]>2023-10-14 10:50:20 -0400
commit3c3f1626919cd93cbe6c56e3849937de5be18dbb (patch)
tree97483e691431094e5a668fcc9ac1cc96032ef543 /boot
parent25edd247a84a31298c22a34ec5cf2851cbf61f70 (diff)
parent74aae507bc4d5726308c191d3191d9cd624ba0d2 (diff)
Merge tag 'dm-pull-13oct23' of https://source.denx.de/u-boot/custodians/u-boot-dm
improvements with dev_read_addr_..._ptr() scan all entries in multi-device boot_targets EFI empty-capsule support
Diffstat (limited to 'boot')
-rw-r--r--boot/bootdev-uclass.c3
-rw-r--r--boot/bootflow.c21
2 files changed, 21 insertions, 3 deletions
diff --git a/boot/bootdev-uclass.c b/boot/bootdev-uclass.c
index 974ddee5d2f..44ae98a9269 100644
--- a/boot/bootdev-uclass.c
+++ b/boot/bootdev-uclass.c
@@ -469,10 +469,11 @@ int bootdev_find_by_label(const char *label, struct udevice **devp,
* if no sequence number was provided, we must scan all
* bootdevs for this media uclass
*/
- if (IS_ENABLED(CONFIG_BOOTSTD_FULL) && seq == -1)
+ if (seq == -1)
method_flags |= BOOTFLOW_METHF_SINGLE_UCLASS;
if (method_flagsp)
*method_flagsp = method_flags;
+ log_debug("method flags %x\n", method_flags);
return 0;
}
log_debug("- no device in %s\n", media->name);
diff --git a/boot/bootflow.c b/boot/bootflow.c
index 6ef62e1d189..e03932e65a7 100644
--- a/boot/bootflow.c
+++ b/boot/bootflow.c
@@ -260,8 +260,25 @@ static int iter_incr(struct bootflow_iter *iter)
} else {
log_debug("labels %p\n", iter->labels);
if (iter->labels) {
- ret = bootdev_next_label(iter, &dev,
- &method_flags);
+ /*
+ * when the label is "mmc" we want to scan all
+ * mmc bootdevs, not just the first. See
+ * bootdev_find_by_label() where this flag is
+ * set up
+ */
+ if (iter->method_flags & BOOTFLOW_METHF_SINGLE_UCLASS) {
+ uclass_next_device(&dev);
+ log_debug("looking for next device %s: %s\n",
+ iter->dev->name,
+ dev ? dev->name : "<none>");
+ } else {
+ dev = NULL;
+ }
+ if (!dev) {
+ log_debug("looking at next label\n");
+ ret = bootdev_next_label(iter, &dev,
+ &method_flags);
+ }
} else {
ret = bootdev_next_prio(iter, &dev);
method_flags = 0;