summaryrefslogtreecommitdiff
path: root/include/environment.h
diff options
context:
space:
mode:
authorTerry Lv <r65388@freescale.com>2009-05-14 16:38:57 +0800
committerFred Fan <r01011@freescale.com>2009-09-10 16:56:36 +0800
commit30e188a23150345a74f5a83aab344ac8510d38d9 (patch)
treef99cd9f1e14732e09ef66fc3a58dd2c875ef18ff /include/environment.h
parent31594f542d3c7b1db6b8404e608e452a604bd6d8 (diff)
ENGR00112273 BBG2: MMC boot support.
BBG2: MMC boot support. Signed-off-by: Terry Lv <r65388@freescale.com>
Diffstat (limited to 'include/environment.h')
-rw-r--r--include/environment.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/environment.h b/include/environment.h
index 5bed32fd479..4d134374d42 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -96,7 +96,33 @@
# endif
#endif /* CONFIG_ENV_IS_IN_MG_DISK */
+#if defined(CONFIG_ENV_IS_IN_MMC)
+#ifndef CONFIG_MMC_BASE
+# error "Need to define CONFIG_MMC_BASE when using CONFIG_ENV_IS_IN_MMC"
+#endif
+# 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_MMC_BASE + CONFIG_ENV_OFFSET)
+# endif
+# ifndef CONFIG_ENV_OFFSET
+# define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_MMC_BASE)
+# 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 */
+
#include "compiler.h"
+#ifdef USE_HOSTCC
+# include <stdint.h>
+#else
+# include <linux/types.h>
+#endif
#ifdef CONFIG_SYS_REDUNDAND_ENVIRONMENT
# define ENV_HEADER_SIZE (sizeof(uint32_t) + 1)