From c7694dd4837ba12db3bcda872a1047a44566e0e8 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:46 -0600 Subject: env: Move env_set_hex() to env.h Move env_set_hex() over to the new header file along with env_set_addr() which uses it. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- board/BuR/common/common.c | 1 + 1 file changed, 1 insertion(+) (limited to 'board/BuR') diff --git a/board/BuR/common/common.c b/board/BuR/common/common.c index 89087d7dba..148fc9075e 100644 --- a/board/BuR/common/common.c +++ b/board/BuR/common/common.c @@ -10,6 +10,7 @@ */ #include #include +#include #include #include #include -- cgit v1.2.3 From 168068fb3d7da3d95bf37b21f39347f48d38497f Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:47 -0600 Subject: env: Move env_set_ulong() to env.h Move env_set_ulong() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- arch/arm/mach-uniphier/mmc-first-dev.c | 1 + board/BuR/brppt1/board.c | 1 + board/BuR/common/br_resetc.c | 1 + board/CZ.NIC/turris_omnia/turris_omnia.c | 1 + board/engicam/common/board.c | 1 + board/gdsys/mpc8308/gazerbeam.c | 1 + board/grinn/liteboard/board.c | 1 + board/imgtec/ci20/ci20.c | 1 + board/synopsys/hsdk/hsdk.c | 1 + board/warp7/warp7.c | 1 + cmd/tpm-common.c | 1 + drivers/bootcount/bootcount_env.c | 1 + drivers/scsi/scsi.c | 1 + include/bootcount.h | 1 + include/common.h | 9 --------- include/env.h | 9 +++++++++ 16 files changed, 23 insertions(+), 9 deletions(-) (limited to 'board/BuR') diff --git a/arch/arm/mach-uniphier/mmc-first-dev.c b/arch/arm/mach-uniphier/mmc-first-dev.c index 2f1c109b9e..149e662070 100644 --- a/arch/arm/mach-uniphier/mmc-first-dev.c +++ b/arch/arm/mach-uniphier/mmc-first-dev.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/board/BuR/brppt1/board.c b/board/BuR/brppt1/board.c index b8ab19c0e7..ef4f5c9501 100644 --- a/board/BuR/brppt1/board.c +++ b/board/BuR/brppt1/board.c @@ -10,6 +10,7 @@ */ #include +#include #include #include #include diff --git a/board/BuR/common/br_resetc.c b/board/BuR/common/br_resetc.c index c8cc73ab14..c0e7fb65b2 100644 --- a/board/BuR/common/br_resetc.c +++ b/board/BuR/common/br_resetc.c @@ -6,6 +6,7 @@ * B&R Industrial Automation GmbH - http://www.br-automation.com/ * */ #include +#include #include #include #include diff --git a/board/CZ.NIC/turris_omnia/turris_omnia.c b/board/CZ.NIC/turris_omnia/turris_omnia.c index 5f6ea35e5f..418657c2d5 100644 --- a/board/CZ.NIC/turris_omnia/turris_omnia.c +++ b/board/CZ.NIC/turris_omnia/turris_omnia.c @@ -8,6 +8,7 @@ */ #include +#include #include #include #include diff --git a/board/engicam/common/board.c b/board/engicam/common/board.c index 567b9f63e5..0c47afe5b5 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/mpc8308/gazerbeam.c b/board/gdsys/mpc8308/gazerbeam.c index cd621744d2..ddd6ee8953 100644 --- a/board/gdsys/mpc8308/gazerbeam.c +++ b/board/gdsys/mpc8308/gazerbeam.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/board/grinn/liteboard/board.c b/board/grinn/liteboard/board.c index 1491b8c3d4..1558ea4b84 100644 --- a/board/grinn/liteboard/board.c +++ b/board/grinn/liteboard/board.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include diff --git a/board/imgtec/ci20/ci20.c b/board/imgtec/ci20/ci20.c index 9811ef559f..f72a660581 100644 --- a/board/imgtec/ci20/ci20.c +++ b/board/imgtec/ci20/ci20.c @@ -7,6 +7,7 @@ */ #include +#include #include #include #include diff --git a/board/synopsys/hsdk/hsdk.c b/board/synopsys/hsdk/hsdk.c index ac4d980c49..8a7642a0aa 100644 --- a/board/synopsys/hsdk/hsdk.c +++ b/board/synopsys/hsdk/hsdk.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/board/warp7/warp7.c b/board/warp7/warp7.c index 134a6c99d7..39ae982257 100644 --- a/board/warp7/warp7.c +++ b/board/warp7/warp7.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include diff --git a/cmd/tpm-common.c b/cmd/tpm-common.c index 89f2aa001b..38900fb159 100644 --- a/cmd/tpm-common.c +++ b/cmd/tpm-common.c @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/bootcount/bootcount_env.c b/drivers/bootcount/bootcount_env.c index 9084ca8a6e..50e0857b3b 100644 --- a/drivers/bootcount/bootcount_env.c +++ b/drivers/bootcount/bootcount_env.c @@ -5,6 +5,7 @@ */ #include +#include #include void bootcount_store(ulong a) diff --git a/drivers/scsi/scsi.c b/drivers/scsi/scsi.c index 75900d8228..48cb2a2818 100644 --- a/drivers/scsi/scsi.c +++ b/drivers/scsi/scsi.c @@ -6,6 +6,7 @@ #include #include +#include #include #include #include diff --git a/include/bootcount.h b/include/bootcount.h index daee84316c..8fa8cf8218 100644 --- a/include/bootcount.h +++ b/include/bootcount.h @@ -9,6 +9,7 @@ #include #include #include +#include #ifdef CONFIG_DM_BOOTCOUNT diff --git a/include/common.h b/include/common.h index 100eac6e5e..283cb23fd1 100644 --- a/include/common.h +++ b/include/common.h @@ -200,15 +200,6 @@ int env_get_yesno(const char *var); */ int env_set(const char *varname, const char *value); -/** - * env_set_ulong() - set an environment variable to an integer - * - * @varname: Variable to adjust - * @value: Value to set for the variable (will be converted to a string) - * @return 0 if OK, 1 on error - */ -int env_set_ulong(const char *varname, ulong value); - void pci_init_board(void); /* common/exports.c */ diff --git a/include/env.h b/include/env.h index 5c780f30d6..8898b78b8e 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,15 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_set_ulong() - set an environment variable to an integer + * + * @varname: Variable to adjust + * @value: Value to set for the variable (will be converted to a string) + * @return 0 if OK, 1 on error + */ +int env_set_ulong(const char *varname, ulong value); + /** * env_set_hex() - set an environment variable to a hex value * -- cgit v1.2.3 From 9eef56dbe34596b403e8c476c2e30ed697638f77 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 1 Aug 2019 09:46:48 -0600 Subject: env: Move env_get_ulong() to env.h Move env_get_ulong() over to the new header file. Signed-off-by: Simon Glass Acked-by: Joe Hershberger --- board/BuR/brxre1/board.c | 1 + board/gdsys/p1022/controlcenterd-id.c | 1 + board/synopsys/hsdk/env-lib.c | 1 + board/ti/ks2_evm/board_k2g.c | 1 + board/toradex/colibri_imx6/colibri_imx6.c | 1 + include/common.h | 13 ------------- include/env.h | 13 +++++++++++++ lib/fdtdec.c | 1 + net/bootp.c | 1 + 9 files changed, 20 insertions(+), 13 deletions(-) (limited to 'board/BuR') diff --git a/board/BuR/brxre1/board.c b/board/BuR/brxre1/board.c index 0d1c6c4720..873208c668 100644 --- a/board/BuR/brxre1/board.c +++ b/board/BuR/brxre1/board.c @@ -9,6 +9,7 @@ * */ #include +#include #include #include #include diff --git a/board/gdsys/p1022/controlcenterd-id.c b/board/gdsys/p1022/controlcenterd-id.c index 6ac956caca..43f5404231 100644 --- a/board/gdsys/p1022/controlcenterd-id.c +++ b/board/gdsys/p1022/controlcenterd-id.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include diff --git a/board/synopsys/hsdk/env-lib.c b/board/synopsys/hsdk/env-lib.c index 66e4581fae..f443c21e6d 100644 --- a/board/synopsys/hsdk/env-lib.c +++ b/board/synopsys/hsdk/env-lib.c @@ -5,6 +5,7 @@ */ #include "env-lib.h" +#include #define MAX_CMD_LEN 25 diff --git a/board/ti/ks2_evm/board_k2g.c b/board/ti/ks2_evm/board_k2g.c index 6d0fc21c67..4ff9a44b37 100644 --- a/board/ti/ks2_evm/board_k2g.c +++ b/board/ti/ks2_evm/board_k2g.c @@ -6,6 +6,7 @@ * Texas Instruments Incorporated, */ #include +#include #include #include #include diff --git a/board/toradex/colibri_imx6/colibri_imx6.c b/board/toradex/colibri_imx6/colibri_imx6.c index 6417ba4980..f657db87d8 100644 --- a/board/toradex/colibri_imx6/colibri_imx6.c +++ b/board/toradex/colibri_imx6/colibri_imx6.c @@ -8,6 +8,7 @@ #include #include +#include #include #include diff --git a/include/common.h b/include/common.h index 283cb23fd1..48f443e851 100644 --- a/include/common.h +++ b/include/common.h @@ -157,19 +157,6 @@ int do_ext2load(cmd_tbl_t *, int, int, char * const []); */ char *env_get(const char *varname); -/** - * env_get_ulong() - Return an environment variable as an integer value - * - * Most U-Boot environment variables store hex values. For those which store - * (e.g.) base-10 integers, this function can be used to read the value. - * - * @name: Variable to look up - * @base: Base to use (e.g. 10 for base 10, 2 for binary) - * @default_val: Default value to return if no value is found - * @return the value found, or @default_val if none - */ -ulong env_get_ulong(const char *name, int base, ulong default_val); - /** * env_get_hex() - Return an environment variable as a hex value * diff --git a/include/env.h b/include/env.h index 8898b78b8e..9124718f2d 100644 --- a/include/env.h +++ b/include/env.h @@ -63,6 +63,19 @@ int env_match(unsigned char *name, int index); */ int env_get_f(const char *name, char *buf, unsigned int len); +/** + * env_get_ulong() - Return an environment variable as an integer value + * + * Most U-Boot environment variables store hex values. For those which store + * (e.g.) base-10 integers, this function can be used to read the value. + * + * @name: Variable to look up + * @base: Base to use (e.g. 10 for base 10, 2 for binary) + * @default_val: Default value to return if no value is found + * @return the value found, or @default_val if none + */ +ulong env_get_ulong(const char *name, int base, ulong default_val); + /** * env_set_ulong() - set an environment variable to an integer * diff --git a/lib/fdtdec.c b/lib/fdtdec.c index 464de5b3b5..ef5e54875c 100644 --- a/lib/fdtdec.c +++ b/lib/fdtdec.c @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include diff --git a/net/bootp.c b/net/bootp.c index 9a2b512e4a..505489140e 100644 --- a/net/bootp.c +++ b/net/bootp.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include -- cgit v1.2.3