diff options
author | Rajesh Bhagat | 2018-12-27 04:37:49 +0000 |
---|---|---|
committer | York Sun | 2019-01-17 13:15:25 -0800 |
commit | d23da2ae21fb20fbecc1a77f41d009c227d51a5b (patch) | |
tree | a264955d8292ec5d46f585936b7b6d34a919735b /arch/arm | |
parent | d3689267f92c5956e09cc7d1baa4700141662bff (diff) |
armv8: fsl-layerscape: fixes for TFABOOT framework
Fixes for TFABOOT framework
- update eMMC bootsrc to SD_MMC
- Increase buffer size for mcinitcmd from 256 to 512
- Fix mcinitcmd and bootcmd for Secure Boot
Signed-off-by: Pankit Garg <pankit.garg@nxp.com>
Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
Reviewed-by: York Sun <york.sun@nxp.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/cpu.c | 2 | ||||
-rw-r--r-- | arch/arm/cpu/armv8/fsl-layerscape/soc.c | 13 |
2 files changed, 13 insertions, 2 deletions
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c index 1fc025b581d..81babd1fb4c 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/cpu.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/cpu.c @@ -675,7 +675,7 @@ enum boot_src __get_boot_src(u32 porsr1) break; case RCW_SRC_EMMC_VAL: /* RCW SRC EMMC */ - src = BOOT_SOURCE_SD_MMC2; + src = BOOT_SOURCE_SD_MMC; break; case RCW_SRC_I2C1_VAL: /* RCW SRC I2C1 Extended */ diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c index 0092a223948..06f3edb3028 100644 --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c @@ -684,7 +684,7 @@ int qspi_ahb_init(void) #endif #ifdef CONFIG_TFABOOT -#define MAX_BOOTCMD_SIZE 256 +#define MAX_BOOTCMD_SIZE 512 int fsl_setenv_bootcmd(void) { @@ -812,6 +812,17 @@ int board_late_init(void) fsl_setenv_bootcmd(); fsl_setenv_mcinitcmd(); } + + /* + * If the boot mode is secure, default environment is not present then + * setenv command needs to be run by default + */ +#ifdef CONFIG_CHAIN_OF_TRUST + if ((fsl_check_boot_mode_secure() == 1)) { + fsl_setenv_bootcmd(); + fsl_setenv_mcinitcmd(); + } +#endif #endif #ifdef CONFIG_QSPI_AHB_INIT qspi_ahb_init(); |