Platforms: Put timer driver to SPRT for IRQ testing only
In a previous change 362817f1713321203eb3147801e0711369060687
the timer driver was put into SPRT by default.
That change was actually for testing purpose only.
This patch puts timer driver to SPRT only when IRQ testing is enabled.
Change-Id: I8d7629d30b56f3982b041bbe8edf0c89a685f4bc
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/platform/ext/target/arm/mps2/an519/CMakeLists.txt b/platform/ext/target/arm/mps2/an519/CMakeLists.txt
index 5e0f015..2ddbae8 100644
--- a/platform/ext/target/arm/mps2/an519/CMakeLists.txt
+++ b/platform/ext/target/arm/mps2/an519/CMakeLists.txt
@@ -92,6 +92,7 @@
target_cfg.c
native_drivers/ppc_sse200_drv.c
native_drivers/arm_uart_drv.c
+ $<$<AND:$<NOT:$<BOOL:${TFM_ENABLE_SLIH_TEST}>>,$<NOT:$<BOOL:${TFM_ENABLE_FLIH_TEST}>>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c>
${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_isolation_mpu_v8m.c
$<$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c>
$<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c>
@@ -104,7 +105,9 @@
target_sources(tfm_sprt
PRIVATE
- native_drivers/timer_cmsdk/timer_cmsdk.c
+ # SLIH test Partition and FLIH test Partition access the timer as ARoT Partitions.
+ # Put the driver to SPRT so that both SLIH and FLIH tests can access it.
+ $<$<OR:$<BOOL:${TFM_ENABLE_SLIH_TEST}>,$<BOOL:${TFM_ENABLE_FLIH_TEST}>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c>
)
#========================= Platform Non-Secure ================================#
diff --git a/platform/ext/target/arm/mps2/an521/CMakeLists.txt b/platform/ext/target/arm/mps2/an521/CMakeLists.txt
index 9197514..cdd0e51 100644
--- a/platform/ext/target/arm/mps2/an521/CMakeLists.txt
+++ b/platform/ext/target/arm/mps2/an521/CMakeLists.txt
@@ -98,6 +98,7 @@
target_cfg.c
native_drivers/ppc_sse200_drv.c
native_drivers/arm_uart_drv.c
+ $<$<AND:$<NOT:$<BOOL:${TFM_ENABLE_SLIH_TEST}>>,$<NOT:$<BOOL:${TFM_ENABLE_FLIH_TEST}>>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c>
${CMAKE_SOURCE_DIR}/platform/ext/common/tfm_hal_isolation_mpu_v8m.c
$<$<OR:$<BOOL:${TEST_NS}>,$<BOOL:${TEST_S}>>:${CMAKE_CURRENT_SOURCE_DIR}/plat_test.c>
$<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/services/src/tfm_platform_system.c>
@@ -105,7 +106,9 @@
target_sources(tfm_sprt
PRIVATE
- native_drivers/timer_cmsdk/timer_cmsdk.c
+ # SLIH test Partition and FLIH test Partition access the timer as ARoT Partitions.
+ # Put the driver to SPRT so that both SLIH and FLIH tests can access it.
+ $<$<OR:$<BOOL:${TFM_ENABLE_SLIH_TEST}>,$<BOOL:${TFM_ENABLE_FLIH_TEST}>>:${CMAKE_CURRENT_SOURCE_DIR}/native_drivers/timer_cmsdk/timer_cmsdk.c>
)
target_compile_options(platform_s