omapl138_lcdk_defconfig: don't build support for SPI
[platform/kernel/u-boot.git] / include / environment.h
index cd96676..de67cf4 100644 (file)
@@ -200,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 {
@@ -226,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.
@@ -304,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);