common: Drop asm/global_data.h from common header
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>
diff --git a/lib/efi_loader/efi_boottime.c b/lib/efi_loader/efi_boottime.c
index ce658a8..41b8949 100644
--- a/lib/efi_loader/efi_boottime.c
+++ b/lib/efi_loader/efi_boottime.c
@@ -19,6 +19,7 @@
#include <u-boot/crc.h>
#include <usb.h>
#include <watchdog.h>
+#include <asm/global_data.h>
#include <linux/libfdt_env.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/efi_loader/efi_dt_fixup.c b/lib/efi_loader/efi_dt_fixup.c
index 3850ab3..580551b 100644
--- a/lib/efi_loader/efi_dt_fixup.c
+++ b/lib/efi_loader/efi_dt_fixup.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <efi_dt_fixup.h>
#include <efi_loader.h>
+#include <fdtdec.h>
#include <mapmem.h>
const efi_guid_t efi_guid_dt_fixup_protocol = EFI_DT_FIXUP_PROTOCOL_GUID;
diff --git a/lib/efi_loader/efi_gop.c b/lib/efi_loader/efi_gop.c
index 53f6d97..1206b2d 100644
--- a/lib/efi_loader/efi_gop.c
+++ b/lib/efi_loader/efi_gop.c
@@ -12,6 +12,7 @@
#include <log.h>
#include <malloc.h>
#include <video.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/efi_loader/efi_memory.c b/lib/efi_loader/efi_memory.c
index a3106ab..be2f655 100644
--- a/lib/efi_loader/efi_memory.c
+++ b/lib/efi_loader/efi_memory.c
@@ -12,6 +12,7 @@
#include <mapmem.h>
#include <watchdog.h>
#include <asm/cache.h>
+#include <asm/global_data.h>
#include <linux/list_sort.h>
#include <linux/sizes.h>
diff --git a/lib/efi_loader/efi_rng.c b/lib/efi_loader/efi_rng.c
index 8bdadad..0e06546 100644
--- a/lib/efi_loader/efi_rng.c
+++ b/lib/efi_loader/efi_rng.c
@@ -11,6 +11,7 @@
#include <efi_rng.h>
#include <log.h>
#include <rng.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
diff --git a/lib/efi_loader/efi_runtime.c b/lib/efi_loader/efi_runtime.c
index 93c9478..93a695f 100644
--- a/lib/efi_loader/efi_runtime.c
+++ b/lib/efi_loader/efi_runtime.c
@@ -14,6 +14,7 @@
#include <log.h>
#include <malloc.h>
#include <rtc.h>
+#include <asm/global_data.h>
#include <u-boot/crc.h>
/* For manual relocation support */