]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - common/cmd_elf.c
GCC-4.x fixes: clean up global data pointer initialization for all boards.
[karo-tx-uboot.git] / common / cmd_elf.c
index eccf2e9e7b1aaf45ed3bb9393335c758a124e8c2..1d92bb37d3f9b4c1b435faa5b2651abcc7d88fb9 100644 (file)
@@ -19,6 +19,9 @@
 #include <net.h>
 #include <elf.h>
 
+#if defined(CONFIG_WALNUT) || defined(CFG_VXWORKS_MAC_PTR)
+DECLARE_GLOBAL_DATA_PTR;
+#endif
 
 #if (CONFIG_COMMANDS & CFG_CMD_ELF)
 
@@ -78,11 +81,6 @@ int do_bootelf (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
  * ====================================================================== */
 int do_bootvx ( cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
-#if defined(CONFIG_WALNUT)     || \
-    defined(CFG_VXWORKS_MAC_PTR)
-       DECLARE_GLOBAL_DATA_PTR;
-#endif
-
        unsigned long addr;             /* Address of image            */
        unsigned long bootaddr;         /* Address to put the bootline */
        char *bootline;                 /* Text of the bootline        */