]> Git Repo - J-u-boot.git/blobdiff - boot/bootstd-uclass.c
Restore patch series "arm: dts: am62-beagleplay: Fix Beagleplay Ethernet"
[J-u-boot.git] / boot / bootstd-uclass.c
index 3c6c32ae604c11c3a87fa968a8d79d2b1f860783..5de8efce19a5482bc25b27db525baf7c270f266e 100644 (file)
@@ -6,10 +6,10 @@
  * Written by Simon Glass <[email protected]>
  */
 
-#include <common.h>
 #include <bootflow.h>
 #include <bootstd.h>
 #include <dm.h>
+#include <env.h>
 #include <log.h>
 #include <malloc.h>
 #include <dm/device-internal.h>
@@ -33,6 +33,8 @@ static int bootstd_of_to_plat(struct udevice *dev)
                                           &priv->prefixes);
                dev_read_string_list(dev, "bootdev-order",
                                     &priv->bootdev_order);
+
+               priv->theme = ofnode_find_subnode(dev_ofnode(dev), "theme");
        }
 
        return 0;
@@ -70,9 +72,23 @@ static int bootstd_remove(struct udevice *dev)
        return 0;
 }
 
-const char *const *const bootstd_get_bootdev_order(struct udevice *dev)
+const char *const *const bootstd_get_bootdev_order(struct udevice *dev,
+                                                  bool *okp)
 {
        struct bootstd_priv *std = dev_get_priv(dev);
+       const char *targets = env_get("boot_targets");
+
+       *okp = true;
+       log_debug("- targets %s %p\n", targets, std->bootdev_order);
+       if (targets && *targets) {
+               str_free_list(std->env_order);
+               std->env_order = str_to_list(targets);
+               if (!std->env_order) {
+                       *okp = false;
+                       return NULL;
+               }
+               return std->env_order;
+       }
 
        return std->bootdev_order;
 }
@@ -133,12 +149,7 @@ int dm_scan_other(bool pre_reloc_only)
                return 0;
 
        for (i = 0; i < n_ents; i++, drv++) {
-               /*
-                * Disable EFI Manager for now as no one uses it so it is
-                * confusing
-                */
-               if (drv->id == UCLASS_BOOTMETH &&
-                   strcmp("efi_mgr_bootmeth", drv->name)) {
+               if (drv->id == UCLASS_BOOTMETH) {
                        const char *name = drv->name;
 
                        if (!strncmp("bootmeth_", name, 9))
@@ -150,12 +161,6 @@ int dm_scan_other(bool pre_reloc_only)
                }
        }
 
-       /* Create the system bootdev too */
-       ret = device_bind_driver(bootstd, "system_bootdev", "system-bootdev",
-                                &dev);
-       if (ret)
-               return log_msg_ret("sys", ret);
-
        return 0;
 }
 
This page took 0.026639 seconds and 4 git commands to generate.