Build: Add configuration for doorbell APIs

The doorbell APIs are not widely used.
This patch adds a build configuration for them to save memory by
disabling the APIs.

Corresponding changes are made as well:
1. SFN_BACKEND does not support doorbell - it does not provide the
   doorbell APIs, so the config should be disabled by default.
2. The psa_wait in SFN backend can be removed as well since neither
   of the API consumer, interrupt or doorbell is enabled.

Change-Id: I7c367dc0724f915ec2932b6c29db54bdfac06fa3
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/include/ffm/psa_api.h b/secure_fw/spm/include/ffm/psa_api.h
index 0322fa9..970ad2d 100644
--- a/secure_fw/spm/include/ffm/psa_api.h
+++ b/secure_fw/spm/include/ffm/psa_api.h
@@ -125,6 +125,8 @@
 
 /* PSA Partition API function body, for privileged use only. */
 
+/* This API is only used in IPC backend. */
+#if CONFIG_TFM_SPM_BACKEND_IPC == 1
 /**
  * \brief Function body of \ref psa_wait.
  *
@@ -140,8 +142,6 @@
 psa_signal_t tfm_spm_partition_psa_wait(psa_signal_t signal_mask,
                                         uint32_t timeout);
 
-/* This API is only used in IPC backend. */
-#if CONFIG_TFM_SPM_BACKEND_IPC == 1
 /**
  * \brief Function body of \ref psa_get.
  *
@@ -162,7 +162,7 @@
  *                                reference.
  */
 psa_status_t tfm_spm_partition_psa_get(psa_signal_t signal, psa_msg_t *msg);
-#endif
+#endif /* CONFIG_TFM_SPM_BACKEND_IPC == 1 */
 
 /**
  * \brief Function body of \ref psa_read.
@@ -257,6 +257,7 @@
 int32_t tfm_spm_partition_psa_reply(psa_handle_t msg_handle,
                                     psa_status_t status);
 
+#if CONFIG_TFM_DOORBELL_API == 1
 /**
  * \brief Function body of \ref psa_norify.
  *
@@ -276,6 +277,7 @@
  *                              currently asserted.
  */
 void tfm_spm_partition_psa_clear(void);
+#endif /* CONFIG_TFM_DOORBELL_API == 1 */
 
 /**
  * \brief Function body of \ref psa_panic.