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/arch/powerpc/cpu/mpc8xxx/cpu.c b/arch/powerpc/cpu/mpc8xxx/cpu.c
index b2d1dc5..eda6486 100644
--- a/arch/powerpc/cpu/mpc8xxx/cpu.c
+++ b/arch/powerpc/cpu/mpc8xxx/cpu.c
@@ -17,6 +17,7 @@
#include <fm_eth.h>
#include <netdev.h>
#include <asm/cache.h>
+#include <asm/global_data.h>
#include <asm/io.h>
#include <vsc9953.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/law.c b/arch/powerpc/cpu/mpc8xxx/law.c
index e388386..cf03f41 100644
--- a/arch/powerpc/cpu/mpc8xxx/law.c
+++ b/arch/powerpc/cpu/mpc8xxx/law.c
@@ -8,6 +8,7 @@
#include <common.h>
#include <asm/bitops.h>
+#include <asm/global_data.h>
#include <linux/compiler.h>
#include <asm/fsl_law.h>
#include <asm/io.h>
diff --git a/arch/powerpc/cpu/mpc8xxx/pamu_table.c b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
index 7dd71d2..d917e9d 100644
--- a/arch/powerpc/cpu/mpc8xxx/pamu_table.c
+++ b/arch/powerpc/cpu/mpc8xxx/pamu_table.c
@@ -6,6 +6,7 @@
#include <common.h>
#include <log.h>
#include <asm/fsl_pamu.h>
+#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;