omapl138_lcdk_defconfig: don't build support for SPI
[platform/kernel/u-boot.git] / include / environment.h
index 2fe1f3e..de67cf4 100644 (file)
@@ -157,21 +157,11 @@ extern env_t environment;
 #endif /* ENV_IS_EMBEDDED */
 
 extern const unsigned char default_environment[];
-extern env_t *env_ptr;
 
 #if defined(CONFIG_NEEDS_MANUAL_RELOC)
 extern void env_reloc(void);
 #endif
 
-#ifdef CONFIG_ENV_IS_IN_MMC
-#include <mmc.h>
-
-extern int mmc_get_env_addr(struct mmc *mmc, int copy, u32 *env_addr);
-# ifdef CONFIG_SYS_MMC_ENV_PART
-extern uint mmc_get_env_part(struct mmc *mmc);
-# endif
-#endif
-
 #ifndef DO_DEPS_ONLY
 
 #include <env_attr.h>
@@ -210,6 +200,7 @@ enum env_operation {
        ENVOP_INIT,     /* we want to call the init function */
        ENVOP_LOAD,     /* we want to call the load function */
        ENVOP_SAVE,     /* we want to call the save function */
+       ENVOP_ERASE,    /* we want to call the erase function */
 };
 
 struct env_driver {
@@ -236,6 +227,15 @@ struct env_driver {
        int (*save)(void);
 
        /**
+        * erase() - Erase the environment on storage
+        *
+        * This method is optional and required for 'eraseenv' to work.
+        *
+        * @return 0 if OK, -ve on error
+        */
+       int (*erase)(void);
+
+       /**
         * init() - Set up the initial pre-relocation environment
         *
         * This method is optional.
@@ -272,7 +272,7 @@ void env_crc_update(void);
 char *env_get_default(const char *name);
 
 /* [re]set to the default environment */
-void set_default_env(const char *s);
+void set_default_env(const char *s, int flags);
 
 /* [re]set individual variables to their value in the default environment */
 int set_default_vars(int nvars, char * const vars[], int flags);
@@ -314,6 +314,13 @@ int env_load(void);
 int env_save(void);
 
 /**
+ * env_erase() - Erase the environment on storage
+ *
+ * @return 0 if OK, -ve on error
+ */
+int env_erase(void);
+
+/**
  * env_fix_drivers() - Updates envdriver as per relocation
  */
 void env_fix_drivers(void);