[PATCH] xilinx: Consolidate zynqmp_mmio_read/write in zynqmp_firmware.h

Michal Simek michal.simek at amd.com
Fri Jun 23 14:51:57 CEST 2023


zynqmp_mmio_read/write() are firmware provided hooks that's why use only
zynqmp_firmware.h for function declaration.

Signed-off-by: Michal Simek <michal.simek at amd.com>
---

 arch/arm/mach-versal-net/include/mach/sys_proto.h | 2 --
 arch/arm/mach-versal/include/mach/sys_proto.h     | 2 --
 arch/arm/mach-zynqmp/include/mach/sys_proto.h     | 3 ---
 arch/arm/mach-zynqmp/mp.c                         | 1 +
 drivers/clk/clk_zynqmp.c                          | 1 +
 include/zynqmp_firmware.h                         | 1 +
 6 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/arch/arm/mach-versal-net/include/mach/sys_proto.h b/arch/arm/mach-versal-net/include/mach/sys_proto.h
index a20cf02712bd..23374d10a6b4 100644
--- a/arch/arm/mach-versal-net/include/mach/sys_proto.h
+++ b/arch/arm/mach-versal-net/include/mach/sys_proto.h
@@ -7,5 +7,3 @@
 #include <linux/build_bug.h>
 
 void mem_map_fill(void);
-
-int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
diff --git a/arch/arm/mach-versal/include/mach/sys_proto.h b/arch/arm/mach-versal/include/mach/sys_proto.h
index 433f9ba07c77..757bd873fbee 100644
--- a/arch/arm/mach-versal/include/mach/sys_proto.h
+++ b/arch/arm/mach-versal/include/mach/sys_proto.h
@@ -13,5 +13,3 @@ enum {
 void initialize_tcm(bool mode);
 void tcm_init(u8 mode);
 void mem_map_fill(void);
-
-int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
diff --git a/arch/arm/mach-zynqmp/include/mach/sys_proto.h b/arch/arm/mach-zynqmp/include/mach/sys_proto.h
index c6733ed1bbe7..ede00d73fe0c 100644
--- a/arch/arm/mach-zynqmp/include/mach/sys_proto.h
+++ b/arch/arm/mach-zynqmp/include/mach/sys_proto.h
@@ -48,9 +48,6 @@ enum {
 
 unsigned int zynqmp_get_silicon_version(void);
 
-int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
-int zynqmp_mmio_read(const u32 address, u32 *value);
-
 void initialize_tcm(bool mode);
 void mem_map_fill(void);
 #if defined(CONFIG_SYS_MEM_RSVD_FOR_MMU) || defined(CONFIG_DEFINE_TCM_OCM_MMAP)
diff --git a/arch/arm/mach-zynqmp/mp.c b/arch/arm/mach-zynqmp/mp.c
index b06c867e57f6..4c514258ba69 100644
--- a/arch/arm/mach-zynqmp/mp.c
+++ b/arch/arm/mach-zynqmp/mp.c
@@ -7,6 +7,7 @@
 #include <common.h>
 #include <cpu_func.h>
 #include <log.h>
+#include <zynqmp_firmware.h>
 #include <asm/arch/hardware.h>
 #include <asm/arch/sys_proto.h>
 #include <asm/io.h>
diff --git a/drivers/clk/clk_zynqmp.c b/drivers/clk/clk_zynqmp.c
index be0ee50e0e4f..8320d4918462 100644
--- a/drivers/clk/clk_zynqmp.c
+++ b/drivers/clk/clk_zynqmp.c
@@ -12,6 +12,7 @@
 #include <linux/bitops.h>
 #include <clk-uclass.h>
 #include <clk.h>
+#include <zynqmp_firmware.h>
 #include <asm/arch/sys_proto.h>
 #include <dm.h>
 #include <linux/err.h>
diff --git a/include/zynqmp_firmware.h b/include/zynqmp_firmware.h
index c56ad3f92067..18a87d274954 100644
--- a/include/zynqmp_firmware.h
+++ b/include/zynqmp_firmware.h
@@ -454,6 +454,7 @@ int zynqmp_pm_set_sd_config(u32 node, enum pm_sd_config_type config, u32 value);
 int zynqmp_pm_set_gem_config(u32 node, enum pm_gem_config_type config,
 			     u32 value);
 int zynqmp_pm_is_function_supported(const u32 api_id, const u32 id);
+int zynqmp_mmio_read(const u32 address, u32 *value);
 int zynqmp_mmio_write(const u32 address, const u32 mask, const u32 value);
 
 /* Type of Config Object */
-- 
2.36.1



More information about the U-Boot mailing list