Skip to contentSkip to conversation

ls1046ardb: Add CONFIG_ENV_ADDR to init env in qspi boot

PATCH New Pankit Garg 2 participants 4 messages May 30, 2019 – Jun 19, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ls1046ardb: Add CONFIG_ENV_ADDR to init env in qspi boot

---
Changes for v2:
- add NXP copyright

 include/configs/ls1046ardb.h | 3 +++
 1 file changed, 3 insertions(+)
include/configs/ls1046ardb.h +3 -0
index f22e863..fa90953 100644
@@ -1,6 +1,7 @@
 /* SPDX-License-Identifier: GPL-2.0+ */
 /*
  * Copyright 2016 Freescale Semiconductor
+ * Copyright 2019 NXP
  */
 
 #ifndef __LS1046ARDB_H__
@@ -162,6 +163,8 @@
 #define CONFIG_ENV_SIZE			0x2000		/* 8KB */
 #define CONFIG_ENV_OFFSET		0x500000	/* 5MB */
 #define CONFIG_ENV_SECT_SIZE		0x40000		/* 256KB */
+#define CONFIG_SYS_FSL_QSPI_BASE        0x40000000
+#define CONFIG_ENV_ADDR CONFIG_SYS_FSL_QSPI_BASE + CONFIG_ENV_OFFSET
 #else
 #if defined(CONFIG_SD_BOOT)
 #define CONFIG_SYS_MMC_ENV_DEV		0
Signature · 1 line
1.9.1
#1 lore raw

PATCH 2/2 armv8: fsl-layerscape: Change bootcmd update logic

Change bootcmd update logic when CONFIG_ENV_ADDR is not defined

---
Changes for v2:
- add NXP copyright

 arch/arm/cpu/armv8/fsl-layerscape/soc.c | 5 +++++
 1 file changed, 5 insertions(+)
arch/arm/cpu/armv8/fsl-layerscape/soc.c +5 -0
index aeaf7b8..a4b6faf 100644
@@ -1,6 +1,7 @@
 // SPDX-License-Identifier: GPL-2.0+
 /*
  * Copyright 2014-2015 Freescale Semiconductor
+ * Copyright 2019 NXP
  */
 
 #include <common.h>
@@ -874,7 +875,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();
 	}
Signature · 1 line
1.9.1
#2 lore raw

PATCH 2/2 armv8: fsl-layerscape: Change bootcmd update logic

Quoted 9 lines

-----Original Message-----
From: Pankit Garg
Sent: Thursday, May 30, 2019 5:34 PM
To: u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Jagdish Gediya <[email protected]>
Subject: [PATCH 2/2] armv8: fsl-layerscape: Change bootcmd update logic

Quoted 4 lines

Change bootcmd update logic when CONFIG_ENV_ADDR is not defined

---

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk

#3 lore raw

PATCH 1/2 ls1046ardb: Add CONFIG_ENV_ADDR to init env in qspi boot

In reply to Pankit Garg
Quoted 10 lines

-----Original Message-----
From: Pankit Garg
Sent: Thursday, May 30, 2019 5:34 PM
To: u-boot at lists.denx.de
Cc: Prabhakar Kushwaha <[email protected]>; Jagdish Gediya <[email protected]>
Subject: [PATCH 1/2] ls1046ardb: Add CONFIG_ENV_ADDR to init env in qspi boot

Quoted 2 lines

---

This patch has been applied to fsl-qoriq master, awaiting upstream.

--pk