Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest Xilinx-AMD System Device Tree flow update #281

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion lib/system/generic/xlnx/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ collect (PROJECT_LIB_HEADERS sys.h)

collect (PROJECT_LIB_SOURCES irq.c)

# vim: expandtab:ts=2:sw=2:smartindent
include(CheckSymbolExists)
check_symbol_exists(SDT "bspconfig.h" HAS_SYSTEM_DT)
if (HAS_SYSTEM_DT)
collect (PROJECT_LIB_HEADERS sys_devicetree.h)
endif()
5 changes: 5 additions & 0 deletions lib/system/generic/xlnx/sys.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2015, Xilinx Inc. and Contributors. All rights reserved.
* Copyright (C) 2023, Advanced Micro Devices, Inc.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
Expand Down Expand Up @@ -28,6 +29,10 @@
#include <xil_exception.h>
#include <xparameters.h>

#ifdef SDT
#include <metal/system/generic/xlnx/sys_devicetree.h>
#endif

#ifndef __METAL_GENERIC_XLNX_SYS__H__
#define __METAL_GENERIC_XLNX_SYS__H__

Expand Down
25 changes: 25 additions & 0 deletions lib/system/generic/xlnx/sys_devicetree.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2022-2023 Advanced Micro Devices, Inc. All Rights Reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/

/*
* @file generic/xlnx/sys_devicetree.h
* @brief Xilinx-AMD Specific symbols for System Device Tree Flow
*/

#ifndef __METAL_GENERIC_SYS_XLNX_SYS_DEVICETREE_H__
#define __METAL_GENERIC_SYS_XLNX_SYS_DEVICETREE_H__

/* The Xilinx-AMD System Device Tree (SDT) Flow BSP provides this file. */
#include "bspconfig.h"

#ifndef XPAR_SCUGIC_0_DEVICE_ID
#define XPAR_SCUGIC_0_DEVICE_ID XPAR_SCUGIC_SINGLE_DEVICE_ID
#endif

#ifndef XPAR_SCUGIC_0_DIST_BASEADDR
#define XPAR_SCUGIC_0_DIST_BASEADDR XPAR_SCUGIC_DIST_BASEADDR
#endif
#endif /* __METAL_GENERIC_SYS_XLNX_SYS_DEVICETREE_H__ */