--- /dev/null
+#
+# 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))
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 \
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 \