SPM: Add build config for IPC-only FF-M APIs

Use macro "CONFIG_TFM_SPM_BACKEND_IPC" to control FF-M APIs
and SPM APIs that are only used by IPC backend:
- psa_get()
- psa_reply()
- spm_get_handle_by_signal()

Signed-off-by: Mingyang Sun <mingyang.sun@arm.com>
Change-Id: I86a7679a325e72ee9eaa7c323cb6965a27975ae3
diff --git a/secure_fw/spm/ffm/psa_api.c b/secure_fw/spm/ffm/psa_api.c
index 08ead03..e115a83 100644
--- a/secure_fw/spm/ffm/psa_api.c
+++ b/secure_fw/spm/ffm/psa_api.c
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 #include "bitops.h"
+#include "config_impl.h"
 #include "critical_section.h"
 #include "psa/lifecycle.h"
 #include "psa/service.h"
@@ -470,6 +471,8 @@
     return partition->signals_asserted & signal_mask;
 }
 
+/* This API is only used in IPC backend. */
+#if CONFIG_TFM_SPM_BACKEND_IPC == 1
 psa_status_t tfm_spm_partition_psa_get(psa_signal_t signal, psa_msg_t *msg)
 {
     struct conn_handle_t *tmp_msg = NULL;
@@ -528,6 +531,7 @@
 
     return PSA_SUCCESS;
 }
+#endif
 
 size_t tfm_spm_partition_psa_read(psa_handle_t msg_handle, uint32_t invec_idx,
                                   void *buffer, size_t num_bytes)