summaryrefslogtreecommitdiff
path: root/source/hal/source/platform/mps3/CMakeLists.txt
diff options
context:
space:
mode:
authorKshitij Sisodia <kshitij.sisodia@arm.com>2024-01-17 13:29:43 +0000
committerKshitij Sisodia <kshitij.sisodia@arm.com>2024-01-18 10:38:57 +0000
commit5385a64979c0380b60c57c74878ccb5189012c87 (patch)
treeba1879bb56501eae9334da379d3014ae99fd01fb /source/hal/source/platform/mps3/CMakeLists.txt
parent001a8ff315dc766a206b05a3e00e831e3f972b0d (diff)
downloadml-embedded-evaluation-kit-5385a64979c0380b60c57c74878ccb5189012c87.tar.gz
Cleanup: Timing adapter definitions
The NPU timing adapter base addresses had been defined in mutiple places, making it difficult to determine which one is actually being used. This patch cleans up unused definitions from memory-map header files for different targets and the CMake template files. The expectation is for component base addresses to be set by platform specific CMake files that include/wrap the component directories. Change-Id: Ic39794ffbdb872b4b0c900cbcec8e386bb32c4eb Signed-off-by: Kshitij Sisodia <kshitij.sisodia@arm.com>
Diffstat (limited to 'source/hal/source/platform/mps3/CMakeLists.txt')
-rw-r--r--source/hal/source/platform/mps3/CMakeLists.txt29
1 files changed, 22 insertions, 7 deletions
diff --git a/source/hal/source/platform/mps3/CMakeLists.txt b/source/hal/source/platform/mps3/CMakeLists.txt
index 5008f0b..4f77bdd 100644
--- a/source/hal/source/platform/mps3/CMakeLists.txt
+++ b/source/hal/source/platform/mps3/CMakeLists.txt
@@ -1,5 +1,6 @@
#----------------------------------------------------------------------------
-# SPDX-FileCopyrightText: Copyright 2022 Arm Limited and/or its affiliates <open-source-office@arm.com>
+# SPDX-FileCopyrightText: Copyright 2022, 2024 Arm Limited and/or its
+# affiliates <open-source-office@arm.com>
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -36,15 +37,23 @@ if (TARGET_SUBSYSTEM STREQUAL sse-300)
set(UART0_BAUDRATE "115200" CACHE STRING "UART baudrate")
set(SYSTEM_CORE_CLOCK "25000000" CACHE STRING "System peripheral clock (Hz)")
set(CLCD_CONFIG_BASE "0x4930A000" CACHE STRING "LCD configuration base address")
- set(ETHOS_U_BASE_ADDR "0x58102000" CACHE STRING "Ethos-U NPU base address")
set(ETHOS_U_IRQN "56" CACHE STRING "Ethos-U55 Interrupt")
set(ETHOS_U_SEC_ENABLED "1" CACHE STRING "Ethos-U NPU Security enable")
set(ETHOS_U_PRIV_ENABLED "1" CACHE STRING "Ethos-U NPU Privilege enable")
- if (ETHOS_U_NPU_TIMING_ADAPTER_ENABLED)
- set(TA0_BASE "0x58103000" CACHE STRING "Ethos-U NPU timing adapter 0")
- set(TA1_BASE "0x58103200" CACHE STRING "Ethos-U NPU timing adapter 1")
- endif()
+ if (ETHOS_U_SEC_ENABLED)
+ set(ETHOS_U_BASE_ADDR "0x58102000" CACHE STRING "Ethos-U NPU base address")
+ if (ETHOS_U_NPU_TIMING_ADAPTER_ENABLED)
+ set(TA0_BASE "0x58103000" CACHE STRING "Ethos-U NPU timing adapter 0")
+ set(TA1_BASE "0x58103200" CACHE STRING "Ethos-U NPU timing adapter 1")
+ endif()
+ else ()
+ set(ETHOS_U_BASE_ADDR "0x48102000" CACHE STRING "Ethos-U NPU base address")
+ if (ETHOS_U_NPU_TIMING_ADAPTER_ENABLED)
+ set(TA0_BASE "0x48103000" CACHE STRING "Ethos-U NPU timing adapter 0")
+ set(TA1_BASE "0x48103200" CACHE STRING "Ethos-U NPU timing adapter 1")
+ endif()
+ endif ()
endif()
# Define target specific base addresses here (before adding the components)
@@ -53,11 +62,17 @@ if (TARGET_SUBSYSTEM STREQUAL sse-310)
set(UART0_BAUDRATE "115200" CACHE STRING "UART baudrate")
set(SYSTEM_CORE_CLOCK "25000000" CACHE STRING "System peripheral clock (Hz)")
set(CLCD_CONFIG_BASE "0x4930A000" CACHE STRING "LCD configuration base address")
- set(ETHOS_U_BASE_ADDR "0x50004000" CACHE STRING "Ethos-U NPU base address")
+
set(ETHOS_U_IRQN "16" CACHE STRING "Ethos-U55 Interrupt")
set(ETHOS_U_SEC_ENABLED "1" CACHE STRING "Ethos-U NPU Security enable")
set(ETHOS_U_PRIV_ENABLED "1" CACHE STRING "Ethos-U NPU Privilege enable")
+ if (ETHOS_U_SEC_ENABLED)
+ set(ETHOS_U_BASE_ADDR "0x50004000" CACHE STRING "Ethos-U NPU base address")
+ else ()
+ set(ETHOS_U_BASE_ADDR "0x40004000" CACHE STRING "Ethos-U NPU base address")
+ endif ()
+
if (ETHOS_U_NPU_TIMING_ADAPTER_ENABLED)
message(FATAL_ERROR "Timing adapter support should be disabled for ${TARGET_SUBSYSTEM}")
endif()