All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 13/39] env: Move env_get_ulong() to env.h
Date: Sun, 28 Jul 2019 08:03:30 -0600	[thread overview]
Message-ID: <20190728140357.137295-14-sjg@chromium.org> (raw)
In-Reply-To: <20190728140357.137295-1-sjg@chromium.org>

Move env_get_ulong() over to the new header file.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 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(-)

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 <common.h>
+#include <env.h>
 #include <errno.h>
 #include <spl.h>
 #include <asm/arch/cpu.h>
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 <common.h>
 #include <dm.h>
+#include <env.h>
 #include <malloc.h>
 #include <fs.h>
 #include <i2c.h>
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 <env.h>
 
 #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, <www.ti.com>
  */
 #include <common.h>
+#include <env.h>
 #include <asm/arch/clock.h>
 #include <asm/ti-common/keystone_net.h>
 #include <asm/arch/psc_defs.h>
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 <common.h>
 #include <dm.h>
+#include <env.h>
 
 #include <asm/arch/clock.h>
 #include <asm/arch/crm_regs.h>
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 <boot_fit.h>
 #include <dm.h>
 #include <dm/of_extra.h>
+#include <env.h>
 #include <errno.h>
 #include <fdtdec.h>
 #include <fdt_support.h>
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 <common.h>
 #include <command.h>
+#include <env.h>
 #include <efi_loader.h>
 #include <net.h>
 #include <net/tftp.h>
-- 
2.22.0.709.g102302147b-goog

  parent reply	other threads:[~2019-07-28 14:03 UTC|newest]

Thread overview: 83+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-28 14:03 [U-Boot] [PATCH 00/39] env: common: Remove environment definitions from common.h Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 01/39] common: Move gzip functions into a new gzip header Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 02/39] common: Drop the dpram_... functions Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 03/39] common: Move lcd_setmem() to lcd.h Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 04/39] common: Remove video_setmem() Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 05/39] env: Create a new file for environment functions Simon Glass
2019-07-30 20:52   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 06/39] env: Move get_env_id() to env.h Simon Glass
2019-07-30 20:51   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 07/39] env: Move env_get_f() " Simon Glass
2019-07-30 20:50   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 08/39] env: Move env_init() " Simon Glass
2019-07-30 20:53   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 09/39] env: Move env_relocate() " Simon Glass
2019-07-30 20:48   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 10/39] env: Move envmatch() " Simon Glass
2019-07-30 21:02   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 11/39] env: Move env_set_hex() " Simon Glass
2019-07-30 20:49   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 12/39] env: Move env_set_ulong() " Simon Glass
2019-07-30 21:05   ` Joe Hershberger
2019-07-28 14:03 ` Simon Glass [this message]
2019-07-30 20:54   ` [U-Boot] [PATCH 13/39] env: Move env_get_ulong() " Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 14/39] env: Move env_get_yesno() " Simon Glass
2019-07-30 20:49   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 15/39] env: Move env_get_hex() " Simon Glass
2019-07-30 20:49   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 16/39] env: Move env_set() " Simon Glass
2019-07-30 21:19   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 17/39] env: Move env_get() " Simon Glass
2019-07-30 21:04   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 18/39] env: Move eth_env_get/set_enetaddr() " Simon Glass
2019-07-30 20:55   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 19/39] env: Move uncommon functions " Simon Glass
2019-07-30 21:01   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 20/39] env: Move set_default_vars " Simon Glass
2019-07-30 20:59   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 21/39] env: Move env_load/save functions " Simon Glass
2019-07-30 20:57   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 22/39] env: Move env import/export " Simon Glass
2019-07-30 20:58   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 23/39] env: Drop env_crc_update() Simon Glass
2019-07-30 21:21   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 24/39] env: Move get/set_default_env() to env.h Simon Glass
2019-07-30 20:54   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 25/39] env: Move env_get_char() " Simon Glass
2019-07-30 21:21   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 26/39] env: Move env_reloc() " Simon Glass
2019-07-30 21:22   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 27/39] env: Rename environment to embedded_environment Simon Glass
2019-07-30 21:22   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 28/39] env: Move env_valid to env.h Simon Glass
2019-07-30 20:56   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 29/39] env: Move callback definitions " Simon Glass
2019-07-30 21:28   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 30/39] env: Drop the ENTRY typdef Simon Glass
2019-07-30 21:16   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 31/39] env: Drop _ENTRY Simon Glass
2019-07-30 21:35   ` Joe Hershberger
2019-07-31 20:57     ` Simon Glass
2019-07-31 21:07       ` Joe Hershberger
2019-07-31 21:55         ` Simon Glass
2019-07-31 22:03           ` Joe Hershberger
2019-08-02 14:07             ` Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 32/39] env: Rename the redundancy flags Simon Glass
2019-07-30 21:49   ` Joe Hershberger
2019-07-31 21:00     ` Simon Glass
2019-07-31 21:20       ` Joe Hershberger
2019-08-01  0:52         ` Tom Rini
2019-08-01  0:55           ` Joe Hershberger
2019-08-01 23:04             ` Tom Rini
2019-07-28 14:03 ` [U-Boot] [PATCH 33/39] env: Drop the ACTION typedef Simon Glass
2019-07-30 21:13   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 34/39] env: Drop the double underscores in search.h Simon Glass
2019-07-30 21:29   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 35/39] env: Move TOTAL_MALLOC_LEN to environment.h Simon Glass
2019-07-30 21:14   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 36/39] env: Drop environment.h header file where not needed Simon Glass
2019-07-30 21:20   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 37/39] env: Rename environment.h to env_internal.h Simon Glass
2019-07-30 21:02   ` Joe Hershberger
2019-07-28 14:03 ` [U-Boot] [PATCH 38/39] Drop PCMCIA Simon Glass
2019-07-28 14:03 ` [U-Boot] [PATCH 39/39] common: Add a note about the effort to reduce common.h Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190728140357.137295-14-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.