configs: j721e_evm_a72_defconfig: Add HBMC related configs
[oweals/u-boot.git] / common / main.c
index 07b34bf2b05d3df5ad15fc8d256ccc815e30968d..3a657c3d9a3918f1a9e3782bbbd0e2fb8a260443 100644 (file)
@@ -10,6 +10,7 @@
 #include <autoboot.h>
 #include <cli.h>
 #include <console.h>
+#include <env.h>
 #include <version.h>
 
 /*
@@ -19,7 +20,6 @@ __weak void show_boot_progress(int val) {}
 
 static void run_preboot_environment_command(void)
 {
-#ifdef CONFIG_PREBOOT
        char *p;
 
        p = env_get("preboot");
@@ -34,7 +34,6 @@ static void run_preboot_environment_command(void)
                if (IS_ENABLED(CONFIG_AUTOBOOT_KEYED))
                        disable_ctrlc(prev);    /* restore Ctrl-C checking */
        }
-#endif /* CONFIG_PREBOOT */
 }
 
 /* We come here after U-Boot is initialised and ready to process commands */
@@ -49,7 +48,8 @@ void main_loop(void)
 
        cli_init();
 
-       run_preboot_environment_command();
+       if (IS_ENABLED(CONFIG_USE_PREBOOT))
+               run_preboot_environment_command();
 
        if (IS_ENABLED(CONFIG_UPDATE_TFTP))
                update_tftp(0UL, NULL, NULL);