All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rajesh Bhagat <rajesh.bhagat@nxp.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/7] armv8: fsl-layerscape: fixes for TFABOOT framework
Date: Thu, 27 Dec 2018 04:37:49 +0000	[thread overview]
Message-ID: <20181227045609.24341-2-rajesh.bhagat@nxp.com> (raw)
In-Reply-To: <20181227045609.24341-1-rajesh.bhagat@nxp.com>

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>
---
 arch/arm/cpu/armv8/fsl-layerscape/cpu.c |  2 +-
 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 1fc025b581..81babd1fb4 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 0092a22394..06f3edb302 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();
-- 
2.17.1

  reply	other threads:[~2018-12-27  4:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-27  4:37 [U-Boot] [PATCH 0/7] TF-A Boot support for NXP Chassis 3 platforms Rajesh Bhagat
2018-12-27  4:37 ` Rajesh Bhagat [this message]
2019-01-18 18:25   ` [U-Boot] [PATCH 1/7] armv8: fsl-layerscape: fixes for TFABOOT framework York Sun
2018-12-27  4:37 ` [U-Boot] [PATCH 2/7] drivers: ifc: restore the legacy flow for IFC config Rajesh Bhagat
2019-01-17 21:12   ` York Sun
2019-01-18  5:14     ` Rajesh Bhagat
2018-12-27  4:37 ` [U-Boot] [PATCH 3/7] ls1043a: add support for nand-boot cmd for TFA Rajesh Bhagat
2018-12-27  4:37 ` [U-Boot] [PATCH 4/7] armv8: ls1088ardb: Add TFABOOT support Rajesh Bhagat
2018-12-27  4:37 ` [U-Boot] [PATCH 5/7] armv8: ls1088aqds: " Rajesh Bhagat
2018-12-27  4:37 ` [U-Boot] [PATCH 6/7] armv8: ls2088ardb: " Rajesh Bhagat
2018-12-27  4:38 ` [U-Boot] [PATCH 7/7] armv8: ls2088aqds: " Rajesh Bhagat

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181227045609.24341-2-rajesh.bhagat@nxp.com \
    --to=rajesh.bhagat@nxp.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.