]> git.sur5r.net Git - u-boot/blobdiff - common/env_eeprom.c
move cmd_get_data_size to command.c
[u-boot] / common / env_eeprom.c
index 300af6fcfe1afc943dd7c02e06813f574f4f0a7f..df3e31e93ab56c2175a286e23bb7a8f41c7e207f 100644 (file)
  */
 
 #include <common.h>
-
-#if defined(CFG_ENV_IS_IN_EEPROM) /* Environment is in EEPROM */
-
 #include <command.h>
 #include <environment.h>
 #include <linux/stddef.h>
-#include <malloc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 env_t *env_ptr = NULL;
 
 char * env_name_spec = "EEPROM";
 
-extern uchar (*env_get_char)(int);
-extern uchar env_get_char_memory (int index);
-
-
 uchar env_get_char_spec (int index)
 {
        uchar c;
@@ -76,8 +70,6 @@ int saveenv(void)
  */
 int env_init(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong crc, len, new;
        unsigned off;
        uchar buf[64];
@@ -111,5 +103,3 @@ int env_init(void)
 
        return (0);
 }
-
-#endif /* CFG_ENV_IS_IN_EEPROM */