treewide: Clean up DECLARE_GLOBAL_DATA_PTR usage

Remove DECLARE_GLOBAL_DATA_PTR from files where gd is not used, and
drop the unnecessary inclusion of asm/global_data.h.

Headers should be included directly by the files that need them,
rather than indirectly via global_data.h.

Reviewed-by: Patrice Chotard <patrice.chotard@foss.st.com> #STMicroelectronics boards and STM32MP1 ram test driver
Tested-by: Anshul Dalal <anshuld@ti.com> #TI boards
Acked-by: Yao Zi <me@ziyao.cc> #TH1520
Signed-off-by: Peng Fan <peng.fan@nxp.com>
This commit is contained in:
Peng Fan
2026-02-09 09:30:18 +08:00
committed by Tom Rini
parent 406982f091
commit 0f90b1e715
287 changed files with 0 additions and 810 deletions

View File

@@ -19,8 +19,6 @@
#include <mapmem.h>
#include <dm/uclass-internal.h>
DECLARE_GLOBAL_DATA_PTR;
int bootmeth_get_state_desc(struct udevice *dev, char *buf, int maxsize)
{
const struct bootmeth_ops *ops = bootmeth_get_ops(dev);

View File

@@ -8,14 +8,11 @@
#include <dm.h>
#include <fdt_support.h>
#include <asm/global_data.h>
#include <linux/libfdt.h>
#include <video.h>
#include <spl.h>
#include <bloblist.h>
DECLARE_GLOBAL_DATA_PTR;
static int fdt_simplefb_configure_node(void *blob, int off)
{
int xsize, ysize;

View File

@@ -5,8 +5,6 @@
#include <log.h>
#include <malloc.h>
#include <asm/global_data.h>
DECLARE_GLOBAL_DATA_PTR;
#include <image.h>
#include <relocate.h>
#include <u-boot/ecdsa.h>

View File

@@ -24,12 +24,9 @@
#include <fdt_support.h>
#endif
#include <asm/global_data.h>
#include <linux/errno.h>
#include <asm/io.h>
DECLARE_GLOBAL_DATA_PTR;
/* Set this if we have less than 4 MB of malloc() space */
#if CONFIG_SYS_MALLOC_LEN < (4096 * 1024)
#define CONSERVE_MEMORY true