Move debug and logging support to a separate header
[oweals/u-boot.git] / include / environment.h
index ba8af28414be611d437b1b41117237f4ac0230ab..d29f82cb5d6faf148f126df5aa2207928a1628ef 100644 (file)
@@ -143,12 +143,7 @@ extern unsigned long nand_env_oob_offset;
 # define ENV_HEADER_SIZE       (sizeof(uint32_t))
 #endif
 
-#ifdef CONFIG_ENV_AES
-/* Make sure the payload is multiple of AES block size */
-#define ENV_SIZE ((CONFIG_ENV_SIZE - ENV_HEADER_SIZE) & ~(16 - 1))
-#else
 #define ENV_SIZE (CONFIG_ENV_SIZE - ENV_HEADER_SIZE)
-#endif
 
 typedef struct environment_s {
        uint32_t        crc;            /* CRC32 over data bytes        */
@@ -156,12 +151,7 @@ typedef struct environment_s {
        unsigned char   flags;          /* active/obsolete flags        */
 #endif
        unsigned char   data[ENV_SIZE]; /* Environment data             */
-} env_t
-#ifdef CONFIG_ENV_AES
-/* Make sure the env is aligned to block size. */
-__attribute__((aligned(16)))
-#endif
-;
+} env_t;
 
 #ifdef ENV_IS_EMBEDDED
 extern env_t environment;
@@ -198,7 +188,6 @@ enum env_valid {
 };
 
 enum env_location {
-       ENVL_DATAFLASH,
        ENVL_EEPROM,
        ENVL_EXT4,
        ENVL_FAT,
@@ -236,8 +225,10 @@ struct env_driver {
         *
         * This method is optional. If not provided, no environment will be
         * loaded.
+        *
+        * @return 0 if OK, -ve on error
         */
-       void (*load)(void);
+       int (*load)(void);
 
        /**
         * save() - Save the environment to storage