diff --git a/arch/arm/mach-kirkwood/cpu.c b/arch/arm/mach-kirkwood/cpu.c index 6ad2543438674733fc713042806c7b7cd1c5c41a..29c0e592e42de26d7426743f51c39a99051838f2 100644 --- a/arch/arm/mach-kirkwood/cpu.c +++ b/arch/arm/mach-kirkwood/cpu.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/arch/sandbox/cpu/start.c b/arch/sandbox/cpu/start.c index cfc542c8066f84f0d4cd15ac69b30687f60162be..fff9cbdd79dbb2b5399a898ed2d6a0a091353002 100644 --- a/arch/sandbox/cpu/start.c +++ b/arch/sandbox/cpu/start.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 0c47afe5b566074f028d4b968cc76a805197594d..31ff297b756065355423843d6aac3cf98bfe6568 100644 --- a/board/engicam/common/board.c +++ b/board/engicam/common/board.c @@ -6,6 +6,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/a38x/keyprogram.c b/board/gdsys/a38x/keyprogram.c index 000897984a6e6f2afb110d3120d3fbfafcecdd02..853981aadbb994284de7367c2b31ccdc09121a0b 100644 --- a/board/gdsys/a38x/keyprogram.c +++ b/board/gdsys/a38x/keyprogram.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index d6798bd33829bc9fb7a4b9e142ac8517d9420e20..04d380956658901f632dd70108c8e540fb87cacc 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -11,6 +11,7 @@ #endif #include +#include #include #include #include diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 1558ea4b84f537d19b0fd6dbcb000bf1e568eac9..151041a789e24d0ebdc38f26afd4aa38d4299e99 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -4,6 +4,7 @@ * Copyright (C) 2016 Grinn */ +#include #include #include #include diff --git a/board/inversepath/usbarmory/usbarmory.c b/board/inversepath/usbarmory/usbarmory.c index de4ad83226803f10c243f0799547cf166386783a..19510184d8a6fa24f8cab79e33abbd182d911cab 100644 --- a/board/inversepath/usbarmory/usbarmory.c +++ b/board/inversepath/usbarmory/usbarmory.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/samsung/common/misc.c b/board/samsung/common/misc.c index 3ef1e7998013855f31c6b81b24f60e4baae5982a..9117669f715e70871113792dce7d40964e67535a 100644 --- a/board/samsung/common/misc.c +++ b/board/samsung/common/misc.c @@ -5,6 +5,7 @@ */ #include +#include #include #include #include diff --git a/common/autoboot.c b/common/autoboot.c index 8faac2005dfeced5ced8dd5e442b00e51a1b54d1..94a1b4abebac941858909b7e89cfd838ee40f5b1 100644 --- a/common/autoboot.c +++ b/common/autoboot.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/common/cli.c b/common/cli.c index 49b910666b9fff195363b3bb6f2f9db675ca5015..67ceb635a67776ef3315e156e5b9e40836a2c1a6 100644 --- a/common/cli.c +++ b/common/cli.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/common/cli_simple.c b/common/cli_simple.c index 6c881c133c6139b27c56b2f6561903b5f0495567..358e9b7fe11f28ccc473744bbc6fac932757f8bf 100644 --- a/common/cli_simple.c +++ b/common/cli_simple.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include diff --git a/common/main.c b/common/main.c index 3a657c3d9a3918f1a9e3782bbbd0e2fb8a260443..a94df7ae042ffcb1dafd3e92581481127fc1973e 100644 --- a/common/main.c +++ b/common/main.c @@ -9,6 +9,7 @@ #include #include #include +#include #include #include #include diff --git a/common/splash_source.c b/common/splash_source.c index d37b4b304c2c2ec77af140091ca8e88bd14d1732..2ff15208a70d77acc68e8cba33f1498a75e2f1be 100644 --- a/common/splash_source.c +++ b/common/splash_source.c @@ -7,6 +7,7 @@ #include #include +#include #include #include #include diff --git a/drivers/fastboot/fb_command.c b/drivers/fastboot/fb_command.c index 4864344853c2786670b4f20a4d593ce5879eb888..3c4acfecf6d36fbc6cfe3ae88002da6cdaad1778 100644 --- a/drivers/fastboot/fb_command.c +++ b/drivers/fastboot/fb_command.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include diff --git a/drivers/fastboot/fb_common.c b/drivers/fastboot/fb_common.c index e76af8ecc320b954b1ab2cf2cde514343f093909..c3735a44af74def34404bb0037222a2e8375d346 100644 --- a/drivers/fastboot/fb_common.c +++ b/drivers/fastboot/fb_common.c @@ -11,6 +11,7 @@ */ #include +#include #include #include #include diff --git a/drivers/mtd/nand/raw/fsl_elbc_nand.c b/drivers/mtd/nand/raw/fsl_elbc_nand.c index 263d46ec8fc5e2f9c00ee1c6a3082a37db009061..cbf689af63d2b23bcb8a16bb1aa00d3164479ff7 100644 --- a/drivers/mtd/nand/raw/fsl_elbc_nand.c +++ b/drivers/mtd/nand/raw/fsl_elbc_nand.c @@ -8,6 +8,7 @@ */ #include +#include #include #include diff --git a/drivers/mtd/nand/raw/fsl_ifc_nand.c b/drivers/mtd/nand/raw/fsl_ifc_nand.c index 29f30d8ccc42a112196434b0bf83def95923c9ce..e2419e18a9956e0d193db0a10aa9cd232e282cf7 100644 --- a/drivers/mtd/nand/raw/fsl_ifc_nand.c +++ b/drivers/mtd/nand/raw/fsl_ifc_nand.c @@ -7,6 +7,7 @@ */ #include +#include #include #include diff --git a/drivers/net/fsl-mc/mc.c b/drivers/net/fsl-mc/mc.c index 6a9cf51fe4a75490642f58aa52b121ac6e0b01b5..ffc408e3a4accc3dbd3a11c0c439ca41a18cac83 100644 --- a/drivers/net/fsl-mc/mc.c +++ b/drivers/net/fsl-mc/mc.c @@ -5,6 +5,7 @@ * Copyright 2017-2018 NXP */ #include +#include #include #include #include diff --git a/drivers/usb/gadget/f_thor.c b/drivers/usb/gadget/f_thor.c index 920fa5279cd240d6e8b30c45cdd9786936da5a66..5a023a2b34c1afa854805d2d2cb7f5ed37d9d105 100644 --- a/drivers/usb/gadget/f_thor.c +++ b/drivers/usb/gadget/f_thor.c @@ -14,6 +14,7 @@ * Sanghee Kim */ +#include #include #include #include diff --git a/include/command.h b/include/command.h index f6170e71515be41dc644804b155e4ee2fb7dd513..d1063774ce567dff15b6823b6ae10fdf72ba773d 100644 --- a/include/command.h +++ b/include/command.h @@ -199,6 +199,22 @@ void fixup_cmdtable(cmd_tbl_t *cmdtp, int size); * @return 0 if OK, 1 for error */ int board_run_command(const char *cmdline); + +int run_command(const char *cmd, int flag); +int run_command_repeatable(const char *cmd, int flag); + +/** + * Run a list of commands separated by ; or even \0 + * + * Note that if 'len' is not -1, then the command does not need to be nul + * terminated, Memory will be allocated for the command in that case. + * + * @param cmd List of commands to run, each separated bu semicolon + * @param len Length of commands excluding terminator if known (-1 if not) + * @param flag Execution flags (CMD_FLAG_...) + * @return 0 on success, or != 0 on error. + */ +int run_command_list(const char *cmd, int len, int flag); #endif /* __ASSEMBLY__ */ /* diff --git a/include/common.h b/include/common.h index c22eb63501fbf8a57d70447d173bc4d09fe47329..5bd778a4f46c8b6949dabfc8d3308ca78ae9398a 100644 --- a/include/common.h +++ b/include/common.h @@ -3,7 +3,7 @@ * Common header file for U-Boot * * This file still includes quite a bit of stuff that should be in separate - * headers like command.h. Please think before adding more things. + * headers. Please think before adding more things. * Patches to remove things are welcome. * * (C) Copyright 2000-2009 @@ -66,21 +66,6 @@ void hang (void) __attribute__ ((noreturn)); /* common/main.c */ void main_loop (void); -int run_command(const char *cmd, int flag); -int run_command_repeatable(const char *cmd, int flag); - -/** - * Run a list of commands separated by ; or even \0 - * - * Note that if 'len' is not -1, then the command does not need to be nul - * terminated, Memory will be allocated for the command in that case. - * - * @param cmd List of commands to run, each separated bu semicolon - * @param len Length of commands excluding terminator if known (-1 if not) - * @param flag Execution flags (CMD_FLAG_...) - * @return 0 on success, or != 0 on error. - */ -int run_command_list(const char *cmd, int len, int flag); int checkflash(void); int checkdram(void); diff --git a/test/command_ut.c b/test/command_ut.c index 62f2828b7c1a5df2c34c9e67a3384c012c87ea52..8e268e5ee523af975e4aa5836b09b903c2f24e41 100644 --- a/test/command_ut.c +++ b/test/command_ut.c @@ -6,6 +6,7 @@ #define DEBUG #include +#include static const char test_cmd[] = "setenv list 1\n setenv list ${list}2; " "setenv list ${list}3\0" diff --git a/test/dm/sf.c b/test/dm/sf.c index 65aab4f2e9caf189fe886eb2f1aa616b4b12863d..7805af740ed5032f38c95dda016eb2c92858e897 100644 --- a/test/dm/sf.c +++ b/test/dm/sf.c @@ -4,6 +4,7 @@ */ #include +#include #include #include #include