]> Git Repo - J-u-boot.git/blobdiff - boot/bootflow.c
Merge patch series "mtd: spi-nor: Add support for S25FS-S family"
[J-u-boot.git] / boot / bootflow.c
index 1ea2966ae9a5b8c56d92a81a399c78b4d0b5e19d..59d77d2385f4e566911cab792a850319cf16864d 100644 (file)
@@ -6,7 +6,6 @@
 
 #define LOG_CATEGORY UCLASS_BOOTSTD
 
-#include <common.h>
 #include <bootdev.h>
 #include <bootflow.h>
 #include <bootmeth.h>
@@ -217,6 +216,9 @@ static int iter_incr(struct bootflow_iter *iter)
                }
        }
 
+       if (iter->flags & BOOTFLOWIF_SINGLE_PARTITION)
+               return BF_NO_MORE_DEVICES;
+
        /* No more bootmeths; start at the first one, and... */
        iter->cur_method = 0;
        iter->method = iter->method_order[iter->cur_method];
@@ -361,7 +363,7 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow)
        }
 
        /* Unless there is nothing more to try, move to the next device */
-       else if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) {
+       if (ret != BF_NO_MORE_PARTS && ret != -ENOSYS) {
                log_debug("Bootdev '%s' part %d method '%s': Error %d\n",
                          dev->name, iter->part, iter->method->name, ret);
                /*
@@ -371,10 +373,8 @@ static int bootflow_check(struct bootflow_iter *iter, struct bootflow *bflow)
                if (iter->flags & BOOTFLOWIF_ALL)
                        return log_msg_ret("all", ret);
        }
-       if (ret)
-               return log_msg_ret("check", ret);
 
-       return 0;
+       return log_msg_ret("check", ret);
 }
 
 int bootflow_scan_first(struct udevice *dev, const char *label,
@@ -575,6 +575,18 @@ int bootflow_iter_check_blk(const struct bootflow_iter *iter)
        return -ENOTSUPP;
 }
 
+int bootflow_iter_check_mmc(const struct bootflow_iter *iter)
+{
+       const struct udevice *media = dev_get_parent(iter->dev);
+       enum uclass_id id = device_get_uclass_id(media);
+
+       log_debug("uclass %d: %s\n", id, uclass_get_name(id));
+       if (id == UCLASS_MMC)
+               return 0;
+
+       return -ENOTSUPP;
+}
+
 int bootflow_iter_check_sf(const struct bootflow_iter *iter)
 {
        const struct udevice *media = dev_get_parent(iter->dev);
This page took 0.026304 seconds and 4 git commands to generate.