]> git.baikalelectronics.ru Git - arm-tf.git/commitdiff
feat(zynqmp): build pm code as library
authorAmit Nagal <amit.nagal@amd.com>
Thu, 23 Mar 2023 08:46:01 +0000 (14:16 +0530)
committerAkshay Belsare <akshay.belsare@amd.com>
Mon, 27 Mar 2023 11:28:41 +0000 (16:58 +0530)
Build Platform Management(PM) code as an Library.
Building PM code as library provides an option to switch to different
firmware interfaces like custom packages.

Change-Id: I872d45edf55ac83a6efb86591d12a0fef7b598cb
Signed-off-by: Amit Nagal <amit.nagal@amd.com>
Signed-off-by: Akshay Belsare <akshay.belsare@amd.com>
plat/xilinx/zynqmp/libpm.mk [new file with mode: 0644]
plat/xilinx/zynqmp/platform.mk

diff --git a/plat/xilinx/zynqmp/libpm.mk b/plat/xilinx/zynqmp/libpm.mk
new file mode 100644 (file)
index 0000000..4ceb576
--- /dev/null
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2023, Advanced Micro Devices, Inc. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+LIBPM_SRCS     :=      $(addprefix plat/xilinx/common/pm_service/,     \
+                       pm_ipi.c)
+
+LIBPM_SRCS      +=      $(addprefix plat/xilinx/zynqmp/pm_service/,  \
+                        pm_svc_main.c                                  \
+                       pm_api_sys.c                                    \
+                       pm_api_pinctrl.c                                \
+                       pm_api_ioctl.c                                  \
+                       pm_api_clock.c                                  \
+                       pm_client.c)
+
+$(eval $(call MAKE_LIB,pm))
index 4671f5f1139a271d8d95d116d8dafab83c36699f..86b78397d10a46e4fa9d9cdd23ca2f03dea50634 100644 (file)
@@ -116,6 +116,9 @@ else
 endif
 $(eval $(call add_define_val,ZYNQMP_CONSOLE,ZYNQMP_CONSOLE_ID_${ZYNQMP_CONSOLE}))
 
+# Build PM code as a Library
+include plat/xilinx/zynqmp/libpm.mk
+
 BL31_SOURCES           +=      drivers/arm/cci/cci.c                           \
                                lib/cpus/aarch64/aem_generic.S                  \
                                lib/cpus/aarch64/cortex_a53.S                   \
@@ -123,19 +126,12 @@ BL31_SOURCES              +=      drivers/arm/cci/cci.c                           \
                                common/fdt_fixup.c                              \
                                ${LIBFDT_SRCS}                                  \
                                plat/xilinx/common/ipi_mailbox_service/ipi_mailbox_svc.c \
-                               plat/xilinx/common/pm_service/pm_ipi.c          \
                                plat/xilinx/common/plat_startup.c               \
                                plat/xilinx/zynqmp/bl31_zynqmp_setup.c          \
                                plat/xilinx/zynqmp/plat_psci.c                  \
                                plat/xilinx/zynqmp/plat_zynqmp.c                \
                                plat/xilinx/zynqmp/plat_topology.c              \
-                               plat/xilinx/zynqmp/sip_svc_setup.c              \
-                               plat/xilinx/zynqmp/pm_service/pm_svc_main.c     \
-                               plat/xilinx/zynqmp/pm_service/pm_api_sys.c      \
-                               plat/xilinx/zynqmp/pm_service/pm_api_pinctrl.c  \
-                               plat/xilinx/zynqmp/pm_service/pm_api_ioctl.c    \
-                               plat/xilinx/zynqmp/pm_service/pm_api_clock.c    \
-                               plat/xilinx/zynqmp/pm_service/pm_client.c
+                               plat/xilinx/zynqmp/sip_svc_setup.c
 
 ifeq (${SDEI_SUPPORT},1)
 BL31_SOURCES           +=      plat/xilinx/zynqmp/zynqmp_ehf.c                 \