armv8: fsl-layerscape: Set env_loc to ENVL_NOWHERE with CONFIG_ENV_IS_NOWHERE.
authorUdit Agarwal <udit.agarwal@nxp.com>
Tue, 23 Apr 2019 06:06:04 +0000 (06:06 +0000)
committerPrabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
Wed, 22 May 2019 06:54:24 +0000 (12:24 +0530)
ENVL_NOWHERE is dependent on CONFIG_ENV_IS_NOWHERE and not on
CONFIG_CHAIN_OF_TRUST so return ENVL_NOWHERE when CONFIG_ENV_IS_NOWHERE
is enabled

Signed-off-by: Udit Agarwal <udit.agarwal@nxp.com>
Reviewed-by: Prabhakar Kushwaha <prabhakar.kushwaha@nxp.com>
arch/arm/cpu/armv8/fsl-layerscape/cpu.c

index bbe3c88..edb9c96 100644 (file)
@@ -808,12 +808,8 @@ enum env_location env_get_location(enum env_operation op, int prio)
        if (prio)
                return ENVL_UNKNOWN;
 
-#ifdef CONFIG_CHAIN_OF_TRUST
-       /* Check Boot Mode
-        * If Boot Mode is Secure, return ENVL_NOWHERE
-        */
-       if (fsl_check_boot_mode_secure() == 1)
-               goto done;
+#ifdef CONFIG_ENV_IS_NOWHERE
+       return env_loc;
 #endif
 
        switch (src) {
@@ -843,9 +839,6 @@ enum env_location env_get_location(enum env_operation op, int prio)
                break;
        }
 
-#ifdef CONFIG_CHAIN_OF_TRUST
-done:
-#endif
        return env_loc;
 }
 #endif /* CONFIG_TFABOOT */