Partitions: Combine tfm_xxx_secure_api.c and tfm_xxx_ipc.c

After Library Model is deprecated, tfm_xxx_secure_api.c are mostly same
with tfm_xxx_ipc.c. Combine them and rename the file name to
tfm_xxx_api.c.

Signed-off-by: Summer Qin <summer.qin@arm.com>
Change-Id: If4fc72563dd2459a6918188a68d8303412702667
diff --git a/interface/CMakeLists.txt b/interface/CMakeLists.txt
index 6558b3d..16aacc2 100644
--- a/interface/CMakeLists.txt
+++ b/interface/CMakeLists.txt
@@ -57,6 +57,12 @@
 
 target_sources(tfm_sprt
     PRIVATE
+        $<$<BOOL:${TFM_PARTITION_INITIAL_ATTESTATION}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_attest_api.c>
+        $<$<BOOL:${TFM_PARTITION_CRYPTO}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_crypto_api.c>
+        $<$<BOOL:${TFM_PARTITION_FIRMWARE_UPDATE}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_fwu_api.c>
+        $<$<BOOL:${TFM_PARTITION_INTERNAL_TRUSTED_STORAGE}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_its_api.c>
+        $<$<BOOL:${TFM_PARTITION_PLATFORM}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_platform_api.c>
+        $<$<BOOL:${TFM_PARTITION_PROTECTED_STORAGE}>:${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_ps_api.c>
         ${CMAKE_CURRENT_SOURCE_DIR}/src/tfm_psa_call_pack.c
 )
 
diff --git a/interface/src/tfm_initial_attestation_ipc_api.c b/interface/src/tfm_attest_api.c
similarity index 93%
rename from interface/src/tfm_initial_attestation_ipc_api.c
rename to interface/src/tfm_attest_api.c
index 44e18da..b4334f0 100644
--- a/interface/src/tfm_initial_attestation_ipc_api.c
+++ b/interface/src/tfm_attest_api.c
@@ -1,12 +1,11 @@
 /*
- * Copyright (c) 2018-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2018-2022, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
  */
 
 #include "psa/initial_attestation.h"
-#include "tfm_ns_interface.h"
 #include "psa/client.h"
 #include "psa/crypto_types.h"
 #include "psa_manifest/sid.h"
diff --git a/interface/src/tfm_crypto_ipc_api.c b/interface/src/tfm_crypto_api.c
similarity index 99%
rename from interface/src/tfm_crypto_ipc_api.c
rename to interface/src/tfm_crypto_api.c
index 833e948..5cb22f8 100644
--- a/interface/src/tfm_crypto_ipc_api.c
+++ b/interface/src/tfm_crypto_api.c
@@ -9,7 +9,6 @@
 #include "psa/crypto.h"
 #include "psa/client.h"
 #include "psa_manifest/sid.h"
-#include "tfm_ns_interface.h"
 
 #define API_DISPATCH(in_vec, out_vec)          \
     psa_call(TFM_CRYPTO_HANDLE, PSA_IPC_CALL,  \
diff --git a/interface/src/tfm_firmware_update_ipc_api.c b/interface/src/tfm_fwu_api.c
similarity index 100%
rename from interface/src/tfm_firmware_update_ipc_api.c
rename to interface/src/tfm_fwu_api.c
diff --git a/interface/src/tfm_its_ipc_api.c b/interface/src/tfm_its_api.c
similarity index 100%
rename from interface/src/tfm_its_ipc_api.c
rename to interface/src/tfm_its_api.c
diff --git a/interface/src/tfm_platform_ipc_api.c b/interface/src/tfm_platform_api.c
similarity index 100%
rename from interface/src/tfm_platform_ipc_api.c
rename to interface/src/tfm_platform_api.c
diff --git a/interface/src/tfm_ps_ipc_api.c b/interface/src/tfm_ps_api.c
similarity index 97%
rename from interface/src/tfm_ps_ipc_api.c
rename to interface/src/tfm_ps_api.c
index c74c425..047f4d1 100644
--- a/interface/src/tfm_ps_ipc_api.c
+++ b/interface/src/tfm_ps_api.c
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2017-2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2017-2022, Arm Limited. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  *
@@ -8,7 +8,6 @@
 #include "psa/client.h"
 #include "psa/protected_storage.h"
 #include "psa_manifest/sid.h"
-#include "tfm_ns_interface.h"
 #include "tfm_ps_defs.h"
 
 psa_status_t psa_ps_set(psa_storage_uid_t uid,