From 535d366137d2dd0804d3e67ada78151e0e318eeb Mon Sep 17 00:00:00 2001
From: Emekcan Aras <emekcan.aras@arm.com>
Date: Fri, 3 Mar 2023 12:25:04 +0000
Subject: [PATCH 3/6] Platform: corstone1000: Reorganize bl2 files

From: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>

To be consistnant, organize bl2 files same as bl1 files

Upstream-Status: Submitted [https://review.trustedfirmware.org/c/TF-M/trusted-firmware-m/+/20555]
Signed-off-by: Mohamed Omar Asaker <mohamed.omarasaker@arm.com>
Change-Id: I3332f4dbbde1c5f2cde5a187b038dc3430b9503f
---
 platform/ext/target/arm/corstone1000/CMakeLists.txt         | 6 +++---
 .../ext/target/arm/corstone1000/{ => bl2}/boot_hal_bl2.c    | 0
 .../corstone1000/{bl2_flash_map.c => bl2/flash_map_bl2.c}   | 0
 .../{bl2_security_cnt.c => bl2/security_cnt_bl2.c}          | 0
 4 files changed, 3 insertions(+), 3 deletions(-)
 rename platform/ext/target/arm/corstone1000/{ => bl2}/boot_hal_bl2.c (100%)
 rename platform/ext/target/arm/corstone1000/{bl2_flash_map.c => bl2/flash_map_bl2.c} (100%)
 rename platform/ext/target/arm/corstone1000/{bl2_security_cnt.c => bl2/security_cnt_bl2.c} (100%)

diff --git a/platform/ext/target/arm/corstone1000/CMakeLists.txt b/platform/ext/target/arm/corstone1000/CMakeLists.txt
index a4fe28c08..3d4c787a6 100644
--- a/platform/ext/target/arm/corstone1000/CMakeLists.txt
+++ b/platform/ext/target/arm/corstone1000/CMakeLists.txt
@@ -196,7 +196,7 @@ target_sources(platform_bl2
         Native_Driver/arm_watchdog_drv.c
         fip_parser/fip_parser.c
         fw_update_agent/fwu_agent.c
-        bl2_security_cnt.c
+        bl2/security_cnt_bl2.c
         $<$<NOT:$<BOOL:${PLATFORM_DEFAULT_OTP}>>:${PLATFORM_DIR}/ext/accelerator/cc312/otp_cc312.c>
         io/io_block.c
         io/io_flash.c
@@ -235,8 +235,8 @@ target_compile_definitions(platform_bl2
 # platform_init/quit* apis symbol collision in bl1.
 target_sources(bl2
     PRIVATE
-        bl2_flash_map.c
-        boot_hal_bl2.c
+        bl2/flash_map_bl2.c
+        bl2/boot_hal_bl2.c
 )
 
 target_link_libraries(bl2
diff --git a/platform/ext/target/arm/corstone1000/boot_hal_bl2.c b/platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
similarity index 100%
rename from platform/ext/target/arm/corstone1000/boot_hal_bl2.c
rename to platform/ext/target/arm/corstone1000/bl2/boot_hal_bl2.c
diff --git a/platform/ext/target/arm/corstone1000/bl2_flash_map.c b/platform/ext/target/arm/corstone1000/bl2/flash_map_bl2.c
similarity index 100%
rename from platform/ext/target/arm/corstone1000/bl2_flash_map.c
rename to platform/ext/target/arm/corstone1000/bl2/flash_map_bl2.c
diff --git a/platform/ext/target/arm/corstone1000/bl2_security_cnt.c b/platform/ext/target/arm/corstone1000/bl2/security_cnt_bl2.c
similarity index 100%
rename from platform/ext/target/arm/corstone1000/bl2_security_cnt.c
rename to platform/ext/target/arm/corstone1000/bl2/security_cnt_bl2.c
-- 
2.17.1

