From: Pankit Garg Date: Thu, 30 May 2019 12:04:15 +0000 (+0000) Subject: armv8: fsl-layerscape: Change bootcmd update logic X-Git-Tag: v2019.07~26^2~12 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ab748801ef2f15679a618efbc6e8894b67658bad;p=oweals%2Fu-boot.git armv8: fsl-layerscape: Change bootcmd update logic Change bootcmd update logic when CONFIG_ENV_ADDR is not defined Signed-off-by: Pankit Garg Reviewed-by: Prabhakar Kushwaha --- diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index c53131f74a..7414215208 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -1,6 +1,7 @@ // SPDX-License-Identifier: GPL-2.0+ /* * Copyright 2014-2015 Freescale Semiconductor + * Copyright 2019 NXP */ #include @@ -823,7 +824,11 @@ int board_late_init(void) * check if gd->env_addr is default_environment; then setenv bootcmd * and mcinitcmd. */ +#if !defined(CONFIG_ENV_ADDR) || defined(ENV_IS_EMBEDDED) + if (gd->env_addr == (ulong)&default_environment[0]) { +#else if (gd->env_addr + gd->reloc_off == (ulong)&default_environment[0]) { +#endif fsl_setenv_bootcmd(); fsl_setenv_mcinitcmd(); }