]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
xilinx: Add support for ENV_VARS_UBOOT_RUNTIME_CONFIG
authorMichal Simek <michal.simek@xilinx.com>
Tue, 28 Jul 2020 10:45:47 +0000 (12:45 +0200)
committerMichal Simek <michal.simek@xilinx.com>
Thu, 20 Aug 2020 07:49:20 +0000 (09:49 +0200)
Start to use ENV_VARS_UBOOT_RUNTIME_CONFIG to enable/disable updating
variables with run time information.

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
arch/arm/Kconfig
board/xilinx/versal/board.c
board/xilinx/zynq/board.c
board/xilinx/zynqmp/zynqmp.c

index a3930b57141589f3f680065cdda2c518cab56a83..9b8dadce8371bef03e997559a0f18bc5cf9358de 100644 (file)
@@ -1085,6 +1085,7 @@ config ARCH_VERSAL
        select DM_SERIAL
        select OF_CONTROL
        imply BOARD_LATE_INIT
+       imply ENV_VARS_UBOOT_RUNTIME_CONFIG
 
 config ARCH_VF610
        bool "Freescale Vybrid"
@@ -1120,6 +1121,7 @@ config ARCH_ZYNQ
        imply CMD_CLK
        imply CMD_DM
        imply CMD_SPL
+       imply ENV_VARS_UBOOT_RUNTIME_CONFIG
        imply FAT_WRITE
 
 config ARCH_ZYNQMP_R5
@@ -1159,6 +1161,7 @@ config ARCH_ZYNQMP
        select ZYNQMP_IPI
        imply BOARD_LATE_INIT
        imply CMD_DM
+       imply ENV_VARS_UBOOT_RUNTIME_CONFIG
        imply FAT_WRITE
        imply MP
        imply DM_USB_GADGET
index 3dc7044b213ebbe9ec0b1f41f778d4d90249da75..a5ca4ca87401c6bbfd5dba174c876f555827e8f4 100644 (file)
@@ -116,6 +116,9 @@ int board_late_init(void)
                return 0;
        }
 
+       if (!CONFIG_IS_ENABLED(ENV_VARS_UBOOT_RUNTIME_CONFIG))
+               return 0;
+
        bootmode = versal_get_bootmode();
 
        puts("Bootmode: ");
index 2164eac8d51885b4086254e4e3da28f403b15f1e..7ac069aaafdf26685ae554120b742302ddcd3abb 100644 (file)
@@ -6,6 +6,7 @@
 
 #include <common.h>
 #include <init.h>
+#include <log.h>
 #include <dm/uclass.h>
 #include <env.h>
 #include <fdtdec.h>
@@ -33,6 +34,14 @@ int board_late_init(void)
        char *new_targets;
        char *env_targets;
 
+       if (!(gd->flags & GD_FLG_ENV_DEFAULT)) {
+               debug("Saved variables - Skipping\n");
+               return 0;
+       }
+
+       if (!CONFIG_IS_ENABLED(ENV_VARS_UBOOT_RUNTIME_CONFIG))
+               return 0;
+
        switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
        case ZYNQ_BM_QSPI:
                mode = "qspi";
index 2a430a9e4638c0c30440da1bd2b7e3d65e1f3743..b4e7301d50947cd8be8bc815c00ffbb0e5b28bd0 100644 (file)
@@ -568,6 +568,9 @@ int board_late_init(void)
                return 0;
        }
 
+       if (!CONFIG_IS_ENABLED(ENV_VARS_UBOOT_RUNTIME_CONFIG))
+               return 0;
+
        ret = set_fdtfile();
        if (ret)
                return ret;