[U-Boot] [PATCH 1/2] arm64: zynqmp: Do not protect zynqmp_pmufw_version()

There is hard dependency for CLK_ZYNQMP to have zynqmp_pmufw_version() but also FPGA code is calling this function which is possible to use without actual CLK_ZYNQMP firmware driver to be enabled. This patch enables the case where only fixed-clock CLK setup is used.
Signed-off-by: Michal Simek michal.simek@xilinx.com ---
arch/arm/cpu/armv8/zynqmp/cpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/arch/arm/cpu/armv8/zynqmp/cpu.c b/arch/arm/cpu/armv8/zynqmp/cpu.c index 4ee8e3f627e9..5ef1a52862c0 100644 --- a/arch/arm/cpu/armv8/zynqmp/cpu.c +++ b/arch/arm/cpu/armv8/zynqmp/cpu.c @@ -179,8 +179,7 @@ int __maybe_unused invoke_smc(u32 pm_api_id, u32 arg0, u32 arg1, u32 arg2, return regs.regs[0]; }
-#if defined(CONFIG_CLK_ZYNQMP) -unsigned int zynqmp_pmufw_version(void) +unsigned int __maybe_unused zynqmp_pmufw_version(void) { int ret; u32 ret_payload[PAYLOAD_ARG_CNT]; @@ -202,7 +201,6 @@ unsigned int zynqmp_pmufw_version(void)
return pm_api_version; } -#endif
static int zynqmp_mmio_rawwrite(const u32 address, const u32 mask,

Function should be compiled only when CONFIG_BOARD_LATE_INIT is defined.
Signed-off-by: Michal Simek michal.simek@xilinx.com ---
board/xilinx/zynqmp/zynqmp.c | 2 ++ 1 file changed, 2 insertions(+)
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index 13c404b6ef08..1dcb26db95e1 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -489,6 +489,7 @@ void reset_cpu(ulong addr) { }
+#if defined(CONFIG_BOARD_LATE_INIT) static const struct { u32 bit; const char *name; @@ -655,6 +656,7 @@ int board_late_init(void)
return 0; } +#endif
int checkboard(void) {
participants (1)
-
Michal Simek