diff mbox

[U-Boot,2/2] ARM64: zynqmp: Add support to save env to FAT

Message ID ee545cd33822f195dee2058e30ef6c0a4a1971a6.1481876727.git.michal.simek@xilinx.com
State Accepted
Commit 6f09d3433854571a918d8494758ecf89433dca19
Delegated to: Michal Simek
Headers show

Commit Message

Michal Simek Dec. 16, 2016, 8:25 a.m. UTC
From: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>

Add support to save environment as a file of FAT filesystem
on to SD card. The file will be saved with name uEnv.txt.
This environment will be retrieved during boot.

Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
Signed-off-by: Michal Simek <michal.simek@xilinx.com>
---

 include/configs/xilinx_zynqmp.h | 6 ++++++
 1 file changed, 6 insertions(+)
diff mbox

Patch

diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 3a990a057eb9..c3e1e3fa79e5 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -88,6 +88,10 @@ 
 # ifndef CONFIG_ZYNQ_SDHCI_MAX_FREQ
 #  define CONFIG_ZYNQ_SDHCI_MAX_FREQ	200000000
 # endif
+# define CONFIG_ENV_IS_IN_FAT
+# define FAT_ENV_DEVICE_AND_PART	"0:auto"
+# define FAT_ENV_FILE			"uboot.env"
+# define FAT_ENV_INTERFACE		"mmc"
 #endif
 
 #if defined(CONFIG_ZYNQ_SDHCI) || defined(CONFIG_ZYNQMP_USB)
@@ -134,7 +138,9 @@ 
 #define CONFIG_BOARD_LATE_INIT
 
 /* Do not preserve environment */
+#if !defined(CONFIG_ENV_IS_IN_FAT)
 #define CONFIG_ENV_IS_NOWHERE		1
+#endif
 #define CONFIG_ENV_SIZE			0x8000
 
 /* Monitor Command Prompt */