[U-Boot] [PATCH 19/39] env: Move uncommon functions to env.h
Simon Glass
sjg at chromium.org
Sun Jul 28 14:03:36 UTC 2019
Move eth_parse_enetaddr() and env_fix_drivers() over to the new header
file.
Signed-off-by: Simon Glass <sjg at chromium.org>
---
cmd/ethsw.c | 1 +
include/env.h | 16 ++++++++++++++++
include/environment.h | 7 -------
3 files changed, 17 insertions(+), 7 deletions(-)
diff --git a/cmd/ethsw.c b/cmd/ethsw.c
index 473324f878..0b57a69f2f 100644
--- a/cmd/ethsw.c
+++ b/cmd/ethsw.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <command.h>
+#include <env.h>
#include <environment.h>
#include <errno.h>
#include <env_flags.h>
diff --git a/include/env.h b/include/env.h
index 2e9a850284..924b327c44 100644
--- a/include/env.h
+++ b/include/env.h
@@ -182,4 +182,20 @@ int eth_env_get_enetaddr(const char *name, uint8_t *enetaddr);
*/
int eth_env_set_enetaddr(const char *name, const uint8_t *enetaddr);
+/**
+ * eth_parse_enetaddr() - Parse a MAC address
+ *
+ * Convert a string MAC address
+ *
+ * @addr: MAC address in aa:bb:cc:dd:ee:ff format, where each part is a 2-digit
+ * hex value
+ * @enetaddr: Place to put MAC address (6 bytes)
+ */
+void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr);
+
+/**
+ * env_fix_drivers() - Updates envdriver as per relocation
+ */
+void env_fix_drivers(void);
+
#endif
diff --git a/include/environment.h b/include/environment.h
index 77915f459e..7be1ef98ad 100644
--- a/include/environment.h
+++ b/include/environment.h
@@ -320,13 +320,6 @@ int env_save(void);
*/
int env_erase(void);
-/**
- * env_fix_drivers() - Updates envdriver as per relocation
- */
-void env_fix_drivers(void);
-
-void eth_parse_enetaddr(const char *addr, uint8_t *enetaddr);
-
#endif /* DO_DEPS_ONLY */
#endif /* _ENVIRONMENT_H_ */
--
2.22.0.709.g102302147b-goog
More information about the U-Boot
mailing list