diff options
author | Wasim Khan <wasim.khan@nxp.com> | 2021-08-02 10:34:52 +0200 |
---|---|---|
committer | Priyanka Jain <priyanka.jain@nxp.com> | 2021-08-18 15:55:15 +0530 |
commit | b62c174e861bddc3c7131045ed018556645cecb9 (patch) | |
tree | 9279f5a2dbdc60eba540571b390f546e5a519cbb | |
parent | 0dfa9da277a4556f9e7faa0101c7694fe2b78733 (diff) | |
download | u-boot-b62c174e861bddc3c7131045ed018556645cecb9.tar.gz |
armv8: fsl : create bootcmd and mcinitcmd as per boot source
NXP platforms expect custom bootcmd and mcinitcmd to be
updated as per boot source with default environment.
Check env variable fsl_bootcmd_mcinitcmd_set to prepare
bootcmd and mcinitcmd
Fixes: cbf77d201870 (armv8: fsl-layerscape: Fix automatic
setting of bootmcd with TF-A)
Signed-off-by: Wasim Khan <wasim.khan@nxp.com>
Reviewed-by: Priyanka Jain <priyanka.jain@nxp.com>
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/soc.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 1641b65799..42a0968546 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -953,12 +953,15 @@ int board_late_init(void) #endif #ifdef CONFIG_TFABOOT /* - * Set bootcmd and mcinitcmd if they don't exist in the environment. + * Set bootcmd and mcinitcmd if "fsl_bootcmd_mcinitcmd_set" does + * not exists in env */ - if (!env_get("bootcmd")) + if (env_get_yesno("fsl_bootcmd_mcinitcmd_set") <= 0) { + // Set bootcmd and mcinitcmd as per boot source fsl_setenv_bootcmd(); - if (!env_get("mcinitcmd")) fsl_setenv_mcinitcmd(); + env_set("fsl_bootcmd_mcinitcmd_set", "y"); + } #endif #ifdef CONFIG_QSPI_AHB_INIT qspi_ahb_init(); |