[v2 10/16] global: Rework architecture global_data.h to include <linux/types.h>
Tom Rini
trini at konsulko.com
Thu Dec 14 19:16:52 CET 2023
In most cases, the architecture global data currently makes use of
assorted linux types, but does not include <linux/types.h> to provide
them. Add <linux/types.h> instead of relying on indirect inclusion.
Signed-off-by: Tom Rini <trini at konsulko.com>
---
Changes in v2:
- Update include/system-constraints.h and board/cssi/cmpc885/sdram.c
---
arch/mips/include/asm/global_data.h | 2 +-
arch/nios2/include/asm/global_data.h | 2 ++
arch/powerpc/include/asm/global_data.h | 1 -
arch/riscv/include/asm/global_data.h | 1 +
arch/x86/include/asm/global_data.h | 1 +
board/cssi/cmpc885/sdram.c | 1 +
include/system-constants.h | 2 ++
7 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/arch/mips/include/asm/global_data.h b/arch/mips/include/asm/global_data.h
index f0d3b07bf1eb..34b7e0bed945 100644
--- a/arch/mips/include/asm/global_data.h
+++ b/arch/mips/include/asm/global_data.h
@@ -7,8 +7,8 @@
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+#include <linux/types.h>
#include <asm/regdef.h>
-#include <asm/types.h>
struct octeon_eeprom_mac_addr {
u8 mac_addr_base[6];
diff --git a/arch/nios2/include/asm/global_data.h b/arch/nios2/include/asm/global_data.h
index 1a0e7d25fa3b..b56e8a5078e0 100644
--- a/arch/nios2/include/asm/global_data.h
+++ b/arch/nios2/include/asm/global_data.h
@@ -6,6 +6,8 @@
#ifndef __ASM_NIOS2_GLOBALDATA_H_
#define __ASM_NIOS2_GLOBALDATA_H_
+#include <linux/types.h>
+
/* Architecture-specific global data */
struct arch_global_data {
u32 dcache_line_size;
diff --git a/arch/powerpc/include/asm/global_data.h b/arch/powerpc/include/asm/global_data.h
index 43d71f5caec0..f7860122a00b 100644
--- a/arch/powerpc/include/asm/global_data.h
+++ b/arch/powerpc/include/asm/global_data.h
@@ -8,7 +8,6 @@
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
-#include <config.h>
#include <linux/types.h>
/* Architecture-specific global data */
diff --git a/arch/riscv/include/asm/global_data.h b/arch/riscv/include/asm/global_data.h
index 937fa4d15446..d00247ad9536 100644
--- a/arch/riscv/include/asm/global_data.h
+++ b/arch/riscv/include/asm/global_data.h
@@ -10,6 +10,7 @@
#ifndef __ASM_GBL_DATA_H
#define __ASM_GBL_DATA_H
+#include <linux/types.h>
#include <asm/smp.h>
#include <asm/u-boot.h>
#include <compiler.h>
diff --git a/arch/x86/include/asm/global_data.h b/arch/x86/include/asm/global_data.h
index 6f4a7130f1da..1ef7f1f0349e 100644
--- a/arch/x86/include/asm/global_data.h
+++ b/arch/x86/include/asm/global_data.h
@@ -9,6 +9,7 @@
#ifndef __ASSEMBLY__
+#include <linux/types.h>
#include <asm/processor.h>
#include <asm/mrccache.h>
diff --git a/board/cssi/cmpc885/sdram.c b/board/cssi/cmpc885/sdram.c
index 11a50c3a52d6..828784bd368e 100644
--- a/board/cssi/cmpc885/sdram.c
+++ b/board/cssi/cmpc885/sdram.c
@@ -4,6 +4,7 @@
* Charles Frey <charles.frey at c-s.fr>
*/
+#include <config.h>
#include <linux/sizes.h>
#include <linux/delay.h>
#include <init.h>
diff --git a/include/system-constants.h b/include/system-constants.h
index d688629f119b..e09fc418a47c 100644
--- a/include/system-constants.h
+++ b/include/system-constants.h
@@ -3,6 +3,8 @@
#ifndef __SYSTEM_CONSTANTS_H__
#define __SYSTEM_CONSTANTS_H__
+#include <config.h>
+
/*
* The most common case for our initial stack pointer address is to
* say that we have defined a static intiial ram address location and
--
2.34.1
More information about the U-Boot
mailing list