]> Git Repo - J-u-boot.git/blobdiff - boot/bootflow_menu.c
Merge patch series "Enable AVS support for AM68, AM69 and J784S4"
[J-u-boot.git] / boot / bootflow_menu.c
index 7c1abe5772cd45de6522ed78be9ad61f046e570c..9d0dc352f97e5feb543fda93ac20b04c57b1e55f 100644 (file)
@@ -8,8 +8,8 @@
 
 #define LOG_CATEGORY UCLASS_BOOTSTD
 
-#include <common.h>
 #include <bootflow.h>
+#include <bootmeth.h>
 #include <bootstd.h>
 #include <cli.h>
 #include <dm.h>
@@ -77,6 +77,7 @@ int bootflow_menu_new(struct expo **expp)
        last_bootdev = NULL;
        for (ret = bootflow_first_glob(&bflow), i = 0; !ret && i < 36;
             ret = bootflow_next_glob(&bflow), i++) {
+               struct bootmeth_uc_plat *ucp;
                char str[2], *label, *key;
                uint preview_id;
                bool add_gap;
@@ -84,6 +85,11 @@ int bootflow_menu_new(struct expo **expp)
                if (bflow->state != BOOTFLOWST_READY)
                        continue;
 
+               /* No media to show for BOOTMETHF_GLOBAL bootmeths */
+               ucp = dev_get_uclass_plat(bflow->method);
+               if (ucp->flags & BOOTMETHF_GLOBAL)
+                       continue;
+
                *str = i < 10 ? '0' + i : 'A' + i - 10;
                str[1] = '\0';
                key = strdup(str);
@@ -120,7 +126,6 @@ int bootflow_menu_new(struct expo **expp)
 
                if (ret < 0)
                        return log_msg_ret("itm", -EINVAL);
-               ret = 0;
                priv->num_bootflows++;
        }
 
This page took 0.024874 seconds and 4 git commands to generate.