summaryrefslogtreecommitdiff
path: root/env
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2020-10-30 21:38:53 -0600
committerTom Rini <trini@konsulko.com>2021-02-02 15:33:42 -0500
commit401d1c4f5d2d29c4bc4beaec95402ca23eb63295 (patch)
tree0122abb2a3f1ea9837eaccc6150d2dae9570388e /env
parentfdcb93e1709ab1a2ebb562455621617c29e2099c (diff)
downloadu-boot-401d1c4f5d2d29c4bc4beaec95402ca23eb63295.tar.gz
common: Drop asm/global_data.h from common headerWIP/2021-02-02-drop-asm_global_data-when-unused
Move this out of the common header and include it only where needed. In a number of cases this requires adding "struct udevice;" to avoid adding another large header or in other cases replacing / adding missing header files that had been pulled in, very indirectly. Finally, we have a few cases where we did not need to include <asm/global_data.h> at all, so remove that include. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
Diffstat (limited to 'env')
-rw-r--r--env/callback.c1
-rw-r--r--env/common.c1
-rw-r--r--env/eeprom.c1
-rw-r--r--env/env.c1
-rw-r--r--env/ext4.c1
-rw-r--r--env/flash.c1
-rw-r--r--env/mmc.c1
-rw-r--r--env/nand.c1
-rw-r--r--env/nowhere.c1
-rw-r--r--env/nvram.c1
-rw-r--r--env/onenand.c1
-rw-r--r--env/remote.c1
-rw-r--r--env/sf.c1
-rw-r--r--env/ubi.c1
14 files changed, 14 insertions, 0 deletions
diff --git a/env/callback.c b/env/callback.c
index 4054b9ef58..638a02b28f 100644
--- a/env/callback.c
+++ b/env/callback.c
@@ -7,6 +7,7 @@
#include <common.h>
#include <env.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#if defined(CONFIG_NEEDS_MANUAL_RELOC)
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/common.c b/env/common.c
index 6c32a9b479..2ee423beb5 100644
--- a/env/common.c
+++ b/env/common.c
@@ -14,6 +14,7 @@
#include <env_internal.h>
#include <log.h>
#include <sort.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <search.h>
#include <errno.h>
diff --git a/env/eeprom.c b/env/eeprom.c
index e300470ad0..ba168014e2 100644
--- a/env/eeprom.c
+++ b/env/eeprom.c
@@ -12,6 +12,7 @@
#include <eeprom.h>
#include <env.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <u-boot/crc.h>
#if defined(CONFIG_I2C_ENV_EEPROM_BUS)
diff --git a/env/env.c b/env/env.c
index 37b4b54cb7..caefa33e1d 100644
--- a/env/env.c
+++ b/env/env.c
@@ -8,6 +8,7 @@
#include <env.h>
#include <env_internal.h>
#include <log.h>
+#include <asm/global_data.h>
#include <linux/bitops.h>
#include <linux/bug.h>
diff --git a/env/ext4.c b/env/ext4.c
index e666f7b945..ec643f2226 100644
--- a/env/ext4.c
+++ b/env/ext4.c
@@ -31,6 +31,7 @@
#include <errno.h>
#include <ext4fs.h>
#include <mmc.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/flash.c b/env/flash.c
index 722d5adf8b..ebee9069e4 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -15,6 +15,7 @@
#include <env_internal.h>
#include <flash.h>
#include <log.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>
diff --git a/env/mmc.c b/env/mmc.c
index ee376c3e0c..9b226be1d5 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -6,6 +6,7 @@
/* #define DEBUG */
#include <common.h>
+#include <asm/global_data.h>
#include <command.h>
#include <env.h>
diff --git a/env/nand.c b/env/nand.c
index 0d7ee19bc2..be82e97d69 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -17,6 +17,7 @@
#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <memalign.h>
diff --git a/env/nowhere.c b/env/nowhere.c
index d43a2d6b51..41557f5ce4 100644
--- a/env/nowhere.c
+++ b/env/nowhere.c
@@ -11,6 +11,7 @@
#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/env/nvram.c b/env/nvram.c
index 7c8ea26f96..f4126858b5 100644
--- a/env/nvram.c
+++ b/env/nvram.c
@@ -27,6 +27,7 @@
#include <command.h>
#include <env.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <search.h>
#include <errno.h>
diff --git a/env/onenand.c b/env/onenand.c
index a2477cef9b..c8da3ff811 100644
--- a/env/onenand.c
+++ b/env/onenand.c
@@ -10,6 +10,7 @@
#include <common.h>
#include <command.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <malloc.h>
#include <search.h>
diff --git a/env/remote.c b/env/remote.c
index d93a137376..166bebf52b 100644
--- a/env/remote.c
+++ b/env/remote.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <command.h>
#include <env_internal.h>
+#include <asm/global_data.h>
#include <linux/stddef.h>
#include <u-boot/crc.h>
diff --git a/env/sf.c b/env/sf.c
index 42d762714e..88ec1108b6 100644
--- a/env/sf.c
+++ b/env/sf.c
@@ -20,6 +20,7 @@
#include <errno.h>
#include <uuid.h>
#include <asm/cache.h>
+#include <asm/global_data.h>
#include <dm/device-internal.h>
#include <u-boot/crc.h>
diff --git a/env/ubi.c b/env/ubi.c
index 5502efe28b..eb21c4f38b 100644
--- a/env/ubi.c
+++ b/env/ubi.c
@@ -5,6 +5,7 @@
*/
#include <common.h>
+#include <asm/global_data.h>
#include <command.h>
#include <env.h>