ppx4xx: Fix sdram init on PMC440 boards
[oweals/u-boot.git] / common / env_eeprom.c
index 300af6fcfe1afc943dd7c02e06813f574f4f0a7f..2adc129c67799cee1ecbf7124862d4b4a1d9a1d0 100644 (file)
@@ -31,7 +31,8 @@
 #include <command.h>
 #include <environment.h>
 #include <linux/stddef.h>
-#include <malloc.h>
+
+DECLARE_GLOBAL_DATA_PTR;
 
 env_t *env_ptr = NULL;
 
@@ -76,8 +77,6 @@ int saveenv(void)
  */
 int env_init(void)
 {
-       DECLARE_GLOBAL_DATA_PTR;
-
        ulong crc, len, new;
        unsigned off;
        uchar buf[64];