From 9a0eb104f884fe9da218d8a43a52abc2ba9c4275 Mon Sep 17 00:00:00 2001 From: Ben Levinsky Date: Mon, 11 Sep 2023 14:22:52 -0700 Subject: [PATCH] lib: generic: Add support for a78 platform with System Device Tree workflow System Device Tree workflow is AMD-Xilinx workflow whereby the BSP, libraries and applications in software are derived from a hardware-design. The hardware-design is used to generate a system device tree (SDT) that describes information for Linux and other processing environments. The xreg/xcpu files are not generated for SDT workflow. Because of this do not include if SDT symbol is present in BSP. Signed-off-by: Ben Levinsky --- lib/system/generic/xlnx_common/CMakeLists.txt | 4 ++-- lib/system/generic/xlnx_common/zynqmp_aarch64/sys.c | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/system/generic/xlnx_common/CMakeLists.txt b/lib/system/generic/xlnx_common/CMakeLists.txt index 3dfb1d01..6b65658f 100644 --- a/lib/system/generic/xlnx_common/CMakeLists.txt +++ b/lib/system/generic/xlnx_common/CMakeLists.txt @@ -2,8 +2,8 @@ collect (PROJECT_LIB_HEADERS sys.h) collect (PROJECT_LIB_SOURCES irq.c) -if ("${PROJECT_MACHINE}" STREQUAL "zynqmp_a53" OR "${PROJECT_MACHINE}" STREQUAL "zynqmp_a72") +if ("${PROJECT_MACHINE}" STREQUAL "zynqmp_a53" OR "${PROJECT_MACHINE}" STREQUAL "zynqmp_a72" OR "${PROJECT_MACHINE}" STREQUAL "zynqmp_a78") add_subdirectory(zynqmp_aarch64) -endif ("${PROJECT_MACHINE}" STREQUAL "zynqmp_a53" OR "${PROJECT_MACHINE}" STREQUAL "zynqmp_a72") + endif ("${PROJECT_MACHINE}" STREQUAL "zynqmp_a53" OR "${PROJECT_MACHINE}" STREQUAL "zynqmp_a72" OR "${PROJECT_MACHINE}" STREQUAL "zynqmp_a78") # vim: expandtab:ts=2:sw=2:smartindent diff --git a/lib/system/generic/xlnx_common/zynqmp_aarch64/sys.c b/lib/system/generic/xlnx_common/zynqmp_aarch64/sys.c index 1de54b18..e3bf1bed 100644 --- a/lib/system/generic/xlnx_common/zynqmp_aarch64/sys.c +++ b/lib/system/generic/xlnx_common/zynqmp_aarch64/sys.c @@ -19,6 +19,9 @@ #include "xil_mmu.h" #include "xscugic.h" +/* System Device Tree (SDT) flow does not have the files generated. */ +#ifndef SDT + #ifdef VERSAL_NET #include "xcpu_cortexa78.h" #elif defined(versal) @@ -26,6 +29,7 @@ #else #include "xreg_cortexa53.h" #endif /* defined(versal) */ +#endif /* !SDT */ void sys_irq_restore_enable(unsigned int flags) {