summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAlagu Sankar <alagusankar@embwise.com>2010-09-21 08:56:02 +0530
committerSudhakar Rajashekhara <sudhakar.raj@ti.com>2010-09-21 08:56:02 +0530
commit282427584793d8d785c21f8f28718d46ef1d6390 (patch)
treeea562655ae13d5518be769413457c929baf4c722 /include
parentabca1d3ba5805d32944388eb165ca73a5192dbe1 (diff)
Environment in MMC
Support for Environment Variables to be stored in SD/MMC cards. This can be enabled by CONFIG_ENV_IS_IN_MMC option. Signed-off-by: Alagu Sankar <alagusankar@embwise.com>
Diffstat (limited to 'include')
-rw-r--r--include/configs/da850evm.h10
-rw-r--r--include/environment.h18
2 files changed, 28 insertions, 0 deletions
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 79b00451162..fb96f896d7d 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -169,8 +169,18 @@
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_FAT
#define CONFIG_CMD_MMC
+#undef CONFIG_ENV_IS_IN_MMC
#endif
+#ifdef CONFIG_ENV_IS_IN_MMC
+#define CONFIG_ENV_SIZE (16 << 10) /* 16 KiB */
+#define CONFIG_ENV_OFFSET (51 << 9) /* Sector 51 */
+#undef CONFIG_ENV_IS_IN_FLASH
+#undef CONFIG_ENV_IS_IN_NAND
+#undef CONFIG_ENV_IS_IN_SPI_FLASH
+#endif
+
+
/*
* USB configuration
*/
diff --git a/include/environment.h b/include/environment.h
index b9924fd7789..aa0e750b052 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -94,6 +94,24 @@
# endif
#endif /* CONFIG_ENV_IS_IN_MG_DISK */
+#if defined(CONFIG_ENV_IS_IN_MMC)
+# ifndef CONFIG_ENV_OFFSET
+# error "Need to define CONFIG_ENV_OFFSET when using CONFIG_ENV_IS_IN_MMC"
+# endif
+# ifndef CONFIG_ENV_ADDR
+# define CONFIG_ENV_ADDR (CONFIG_ENV_OFFSET)
+# endif
+# ifndef CONFIG_ENV_OFFSET
+# define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
+# endif
+# ifdef CONFIG_ENV_OFFSET_REDUND
+# define CONFIG_SYS_REDUNDAND_ENVIRONMENT
+# endif
+# ifdef CONFIG_ENV_IS_EMBEDDED
+# define ENV_IS_EMBEDDED 1
+# endif
+#endif /* CONFIG_ENV_IS_IN_MMC */
+
/* Embedded env is only supported for some flash types */
#ifdef CONFIG_ENV_IS_EMBEDDED
# if !defined(CONFIG_ENV_IS_IN_FLASH) && \