]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - include/environment.h
Merge branch 'master' of ../denx-uboot into tx28
[karo-tx-uboot.git] / include / environment.h
index 3c145af938ab99c98934815bdd09a017e2d7a1dd..338c4cd8ff7a521dd150304e3ba8e19cc6ea49ad 100644 (file)
@@ -22,7 +22,7 @@
  */
 
 #ifndef _ENVIRONMENT_H_
-#define _ENVIRONMENT_H_        1
+#define _ENVIRONMENT_H_
 
 /**************************************************************************
  *
 # if   (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) &&         \
        (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <=                  \
        (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN)
-#  define ENV_IS_EMBEDDED      1
+#  define ENV_IS_EMBEDDED
 # endif
 # if defined(CONFIG_ENV_ADDR_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
-#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT     1
+#  define CONFIG_SYS_REDUNDAND_ENVIRONMENT
 # endif
 # ifdef CONFIG_ENV_IS_EMBEDDED
 #  error "do not define CONFIG_ENV_IS_EMBEDDED in your board config"
@@ -105,6 +105,18 @@ extern unsigned long nand_env_oob_offset;
 # endif
 #endif /* CONFIG_ENV_IS_IN_MG_DISK */
 
+#if defined(CONFIG_ENV_IS_IN_MMC)
+# 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
+#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)        && \
@@ -120,7 +132,7 @@ extern unsigned long nand_env_oob_offset;
  * calculated automatically (i.e. NAND), take the board opt-in.
  */
 #if defined(CONFIG_ENV_IS_EMBEDDED) && !defined(ENV_IS_EMBEDDED)
-# define ENV_IS_EMBEDDED 1
+# define ENV_IS_EMBEDDED
 #endif
 
 /* The build system likes to know if the env is embedded */