env: Move env_set() to env.h

Move env_set() over to the new header file.

Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/include/command.h b/include/command.h
index 2bfee89..f6170e7 100644
--- a/include/command.h
+++ b/include/command.h
@@ -10,6 +10,7 @@
 #ifndef __COMMAND_H
 #define __COMMAND_H
 
+#include <env.h>
 #include <linker_lists.h>
 
 #ifndef NULL
diff --git a/include/common.h b/include/common.h
index 8d8bbc4..739bbd4 100644
--- a/include/common.h
+++ b/include/common.h
@@ -157,18 +157,6 @@
  */
 char *env_get(const char *varname);
 
-/**
- * env_set() - set an environment variable
- *
- * This sets or deletes the value of an environment variable. For setting the
- * value the variable is created if it does not already exist.
- *
- * @varname: Variable to adjust
- * @value: Value to set for the variable, or NULL or "" to delete the variable
- * @return 0 if OK, 1 on error
- */
-int env_set(const char *varname, const char *value);
-
 void	pci_init_board(void);
 
 /* common/exports.c */
diff --git a/include/env.h b/include/env.h
index dd063fe..6770a61 100644
--- a/include/env.h
+++ b/include/env.h
@@ -72,6 +72,18 @@
 int env_get_yesno(const char *var);
 
 /**
+ * env_set() - set an environment variable
+ *
+ * This sets or deletes the value of an environment variable. For setting the
+ * value the variable is created if it does not already exist.
+ *
+ * @varname: Variable to adjust
+ * @value: Value to set for the variable, or NULL or "" to delete the variable
+ * @return 0 if OK, 1 on error
+ */
+int env_set(const char *varname, const char *value);
+
+/**
  * env_get_ulong() - Return an environment variable as an integer value
  *
  * Most U-Boot environment variables store hex values. For those which store
diff --git a/include/env_flags.h b/include/env_flags.h
index 23744e3..f230643 100644
--- a/include/env_flags.h
+++ b/include/env_flags.h
@@ -146,6 +146,7 @@
 
 #else /* !USE_HOSTCC */
 
+#include <env.h>
 #include <search.h>
 
 /*
diff --git a/include/exports.h b/include/exports.h
index bf8d53c..147a00f 100644
--- a/include/exports.h
+++ b/include/exports.h
@@ -3,6 +3,7 @@
 
 #ifndef __ASSEMBLY__
 #ifdef CONFIG_PHY_AQUANTIA
+#include <env.h>
 #include <phy_interface.h>
 #endif
 
diff --git a/include/net.h b/include/net.h
index 7684076..0262175 100644
--- a/include/net.h
+++ b/include/net.h
@@ -14,6 +14,7 @@
 
 #include <asm/cache.h>
 #include <asm/byteorder.h>	/* for nton* / ntoh* stuff */
+#include <env.h>
 #include <linux/if_ether.h>
 
 #define DEBUG_LL_STATE 0	/* Link local state machine changes */
diff --git a/include/search.h b/include/search.h
index 5d07b49..9750336 100644
--- a/include/search.h
+++ b/include/search.h
@@ -14,6 +14,7 @@
 #ifndef _SEARCH_H_
 #define _SEARCH_H_
 
+#include <env.h>
 #include <stddef.h>
 
 #define __set_errno(val) do { errno = val; } while (0)