Merge https://source.denx.de/u-boot/custodians/u-boot-usb
[platform/kernel/u-boot.git] / common / command.c
index 068cb55..41c91c6 100644 (file)
 #include <console.h>
 #include <env.h>
 #include <log.h>
+#include <asm/global_data.h>
 #include <linux/ctype.h>
 
+DECLARE_GLOBAL_DATA_PTR;
+
 /*
  * Use puts() instead of printf() to avoid printf buffer overflow
  * for long help messages
@@ -488,9 +491,6 @@ int cmd_get_data_size(char* arg, int default_size)
 }
 #endif
 
-#if defined(CONFIG_NEEDS_MANUAL_RELOC)
-DECLARE_GLOBAL_DATA_PTR;
-
 void fixup_cmdtable(struct cmd_tbl *cmdtp, int size)
 {
        int     i;
@@ -535,7 +535,6 @@ void fixup_cmdtable(struct cmd_tbl *cmdtp, int size)
                cmdtp++;
        }
 }
-#endif
 
 int cmd_always_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
                          char *const argv[], int *repeatable)
@@ -571,7 +570,7 @@ int cmd_discard_repeatable(struct cmd_tbl *cmdtp, int flag, int argc,
  * @param argc         Number of arguments (arg 0 must be the command text)
  * @param argv         Arguments
  * @param repeatable   Can the command be repeated
- * @return 0 if command succeeded, else non-zero (CMD_RET_...)
+ * Return: 0 if command succeeded, else non-zero (CMD_RET_...)
  */
 static int cmd_call(struct cmd_tbl *cmdtp, int flag, int argc,
                    char *const argv[], int *repeatable)