[PATCH 03/33] arm: xilinx: Remove <common.h> and add needed includes

Tom Rini trini at konsulko.com
Tue Apr 30 15:35:29 CEST 2024


Remove <common.h> from all mach-versal-net, mach-versal, mach-zynq and
mach-zynqmp files and when needed add missing include files directly.

Signed-off-by: Tom Rini <trini at konsulko.com>
---
Cc: Michal Simek <michal.simek at amd.com>
---
 arch/arm/mach-versal-net/clk.c                 | 2 +-
 arch/arm/mach-versal-net/cpu.c                 | 2 +-
 arch/arm/mach-versal/clk.c                     | 2 +-
 arch/arm/mach-versal/cpu.c                     | 2 +-
 arch/arm/mach-versal/mp.c                      | 3 ++-
 arch/arm/mach-zynq/clk.c                       | 1 -
 arch/arm/mach-zynq/cpu.c                       | 3 ++-
 arch/arm/mach-zynq/ddrc.c                      | 2 +-
 arch/arm/mach-zynq/slcr.c                      | 1 -
 arch/arm/mach-zynq/spl.c                       | 1 -
 arch/arm/mach-zynqmp-r5/cpu.c                  | 1 -
 arch/arm/mach-zynqmp/aes.c                     | 3 +--
 arch/arm/mach-zynqmp/clk.c                     | 2 +-
 arch/arm/mach-zynqmp/cpu.c                     | 4 +++-
 arch/arm/mach-zynqmp/ecc_spl_init.c            | 1 -
 arch/arm/mach-zynqmp/handoff.c                 | 1 -
 arch/arm/mach-zynqmp/include/mach/zynqmp_aes.h | 2 ++
 arch/arm/mach-zynqmp/mp.c                      | 4 +++-
 arch/arm/mach-zynqmp/psu_spl_init.c            | 1 -
 arch/arm/mach-zynqmp/spl.c                     | 1 -
 20 files changed, 19 insertions(+), 20 deletions(-)

diff --git a/arch/arm/mach-versal-net/clk.c b/arch/arm/mach-versal-net/clk.c
index d097de7afa63..a88b5101eb1b 100644
--- a/arch/arm/mach-versal-net/clk.c
+++ b/arch/arm/mach-versal-net/clk.c
@@ -6,10 +6,10 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <init.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-versal-net/cpu.c b/arch/arm/mach-versal-net/cpu.c
index a82741e70fc8..59b0cb2e78f3 100644
--- a/arch/arm/mach-versal-net/cpu.c
+++ b/arch/arm/mach-versal-net/cpu.c
@@ -6,11 +6,11 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
+#include <asm/u-boot.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-versal/clk.c b/arch/arm/mach-versal/clk.c
index 5e3f44c77822..0c7d468f1dd0 100644
--- a/arch/arm/mach-versal/clk.c
+++ b/arch/arm/mach-versal/clk.c
@@ -4,10 +4,10 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <init.h>
 #include <time.h>
 #include <asm/global_data.h>
+#include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-versal/cpu.c b/arch/arm/mach-versal/cpu.c
index e4dc305d9288..7de431e55005 100644
--- a/arch/arm/mach-versal/cpu.c
+++ b/arch/arm/mach-versal/cpu.c
@@ -4,11 +4,11 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <init.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
+#include <asm/u-boot.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-versal/mp.c b/arch/arm/mach-versal/mp.c
index 2487b482ddb1..921ca49c3596 100644
--- a/arch/arm/mach-versal/mp.c
+++ b/arch/arm/mach-versal/mp.c
@@ -4,7 +4,8 @@
  * Siva Durga Prasad Paladugu <siva.durga.prasad.paladugu at amd.com>
  */
 
-#include <common.h>
+#include <config.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-zynq/clk.c b/arch/arm/mach-zynq/clk.c
index 5e1ba8d43ed1..c1b018cf22e9 100644
--- a/arch/arm/mach-zynq/clk.c
+++ b/arch/arm/mach-zynq/clk.c
@@ -4,7 +4,6 @@
  * Copyright (C) 2013 Xilinx, Inc. All rights reserved.
  */
 #include <clk.h>
-#include <common.h>
 #include <dm.h>
 #include <init.h>
 #include <malloc.h>
diff --git a/arch/arm/mach-zynq/cpu.c b/arch/arm/mach-zynq/cpu.c
index 3b6518c71c90..c75e453d5730 100644
--- a/arch/arm/mach-zynq/cpu.c
+++ b/arch/arm/mach-zynq/cpu.c
@@ -3,10 +3,11 @@
  * Copyright (C) 2012 Michal Simek <monstr at monstr.eu>
  * Copyright (C) 2012 Xilinx, Inc. All rights reserved.
  */
-#include <common.h>
+#include <config.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <zynqpl.h>
+#include <linux/errno.h>
 #include <asm/cache.h>
 #include <asm/io.h>
 #include <asm/arch/clk.h>
diff --git a/arch/arm/mach-zynq/ddrc.c b/arch/arm/mach-zynq/ddrc.c
index 28988ef95b5a..b9a2eef5a6f0 100644
--- a/arch/arm/mach-zynq/ddrc.c
+++ b/arch/arm/mach-zynq/ddrc.c
@@ -4,7 +4,7 @@
  * Copyright (C) 2012 - 2017 Xilinx, Inc. All rights reserved.
  */
 
-#include <common.h>
+#include <linux/string.h>
 #include <asm/io.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-zynq/slcr.c b/arch/arm/mach-zynq/slcr.c
index 5d9f4d23f34b..ef877df0fe85 100644
--- a/arch/arm/mach-zynq/slcr.c
+++ b/arch/arm/mach-zynq/slcr.c
@@ -3,7 +3,6 @@
  * Copyright (c) 2013 - 2017 Xilinx Inc.
  */
 
-#include <common.h>
 #include <asm/io.h>
 #include <malloc.h>
 #include <asm/arch/hardware.h>
diff --git a/arch/arm/mach-zynq/spl.c b/arch/arm/mach-zynq/spl.c
index fea1c9b12ad1..8ef12ed65ceb 100644
--- a/arch/arm/mach-zynq/spl.c
+++ b/arch/arm/mach-zynq/spl.c
@@ -2,7 +2,6 @@
 /*
  * (C) Copyright 2014 - 2017 Xilinx, Inc. Michal Simek
  */
-#include <common.h>
 #include <debug_uart.h>
 #include <hang.h>
 #include <image.h>
diff --git a/arch/arm/mach-zynqmp-r5/cpu.c b/arch/arm/mach-zynqmp-r5/cpu.c
index 0d368443d824..9a912dd5bd7c 100644
--- a/arch/arm/mach-zynqmp-r5/cpu.c
+++ b/arch/arm/mach-zynqmp-r5/cpu.c
@@ -3,7 +3,6 @@
  * Copyright (C) 2018 Xilinx, Inc. (Michal Simek)
  */
 
-#include <common.h>
 #include <cpu_func.h>
 #include <init.h>
 #include <asm/armv7_mpu.h>
diff --git a/arch/arm/mach-zynqmp/aes.c b/arch/arm/mach-zynqmp/aes.c
index 8a2b7fdcbe9f..9a05fbf9c11b 100644
--- a/arch/arm/mach-zynqmp/aes.c
+++ b/arch/arm/mach-zynqmp/aes.c
@@ -7,9 +7,8 @@
  * Christian Taedcke <christian.taedcke at weidmueller.com>
  */
 
-#include <common.h>
 #include <mach/zynqmp_aes.h>
-
+#include <linux/errno.h>
 #include <asm/arch/sys_proto.h>
 #include <cpu_func.h>
 #include <memalign.h>
diff --git a/arch/arm/mach-zynqmp/clk.c b/arch/arm/mach-zynqmp/clk.c
index 3b05f8455bf5..dc8e2cbd3da4 100644
--- a/arch/arm/mach-zynqmp/clk.c
+++ b/arch/arm/mach-zynqmp/clk.c
@@ -4,13 +4,13 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <init.h>
 #include <time.h>
 #include <asm/arch/clk.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/global_data.h>
+#include <asm/u-boot.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
diff --git a/arch/arm/mach-zynqmp/cpu.c b/arch/arm/mach-zynqmp/cpu.c
index 6ae27894ecd9..d7b5e99504c4 100644
--- a/arch/arm/mach-zynqmp/cpu.c
+++ b/arch/arm/mach-zynqmp/cpu.c
@@ -4,14 +4,16 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <init.h>
 #include <time.h>
+#include <linux/errno.h>
+#include <linux/types.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/armv8/mmu.h>
 #include <asm/cache.h>
 #include <asm/global_data.h>
+#include <asm/u-boot.h>
 #include <asm/io.h>
 #include <zynqmp_firmware.h>
 #include <asm/cache.h>
diff --git a/arch/arm/mach-zynqmp/ecc_spl_init.c b/arch/arm/mach-zynqmp/ecc_spl_init.c
index f547d8e3a5bf..1eef10789514 100644
--- a/arch/arm/mach-zynqmp/ecc_spl_init.c
+++ b/arch/arm/mach-zynqmp/ecc_spl_init.c
@@ -5,7 +5,6 @@
  *  Jorge Ramirez-Ortiz <jorge at foundries.io>
  */
 
-#include <common.h>
 #include <cpu_func.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/ecc_spl_init.h>
diff --git a/arch/arm/mach-zynqmp/handoff.c b/arch/arm/mach-zynqmp/handoff.c
index dce92438926e..b007307e1f36 100644
--- a/arch/arm/mach-zynqmp/handoff.c
+++ b/arch/arm/mach-zynqmp/handoff.c
@@ -5,7 +5,6 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <asm/io.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
diff --git a/arch/arm/mach-zynqmp/include/mach/zynqmp_aes.h b/arch/arm/mach-zynqmp/include/mach/zynqmp_aes.h
index 2a9cffbd0f80..01a13d4c7c06 100644
--- a/arch/arm/mach-zynqmp/include/mach/zynqmp_aes.h
+++ b/arch/arm/mach-zynqmp/include/mach/zynqmp_aes.h
@@ -9,6 +9,8 @@
 #ifndef ZYNQMP_AES_H
 #define ZYNQMP_AES_H
 
+#include <linux/types.h>
+
 struct zynqmp_aes {
 	u64 srcaddr;
 	u64 ivaddr;
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index aff9054212c5..9b46a25a1cbe 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -4,14 +4,16 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
+#include <config.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <vsprintf.h>
 #include <zynqmp_firmware.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
 #include <linux/delay.h>
+#include <linux/string.h>
 
 #define LOCK		0
 #define SPLIT		1
diff --git a/arch/arm/mach-zynqmp/psu_spl_init.c b/arch/arm/mach-zynqmp/psu_spl_init.c
index b4d7f44bbeee..5b4d66359bfb 100644
--- a/arch/arm/mach-zynqmp/psu_spl_init.c
+++ b/arch/arm/mach-zynqmp/psu_spl_init.c
@@ -4,7 +4,6 @@
  *
  * Michal Simek <michal.simek at amd.com>
  */
-#include <common.h>
 #include <asm/io.h>
 #include <asm/arch/psu_init_gpl.h>
 #include <linux/delay.h>
diff --git a/arch/arm/mach-zynqmp/spl.c b/arch/arm/mach-zynqmp/spl.c
index 979ff3aef6c2..6b67245f348c 100644
--- a/arch/arm/mach-zynqmp/spl.c
+++ b/arch/arm/mach-zynqmp/spl.c
@@ -5,7 +5,6 @@
  * Michal Simek <michal.simek at amd.com>
  */
 
-#include <common.h>
 #include <image.h>
 #include <init.h>
 #include <log.h>
-- 
2.34.1



More information about the U-Boot mailing list