SPM: Remove redundant 'tfm_spm_db_init' for IPC model

The job done by 'tfm_spm_db_init' can be covered in 'tfm_spm_init'. Do
not spend extra loop to bind static and memory data with runtime data.

- Remove function 'tfm_spm_db_init'.
- Remove the 'is_inited' member as it is not used under the IPC model.

Change-Id: Ic1b5c6c01ddfa255dfa11440af9882c4c17ce3a8
Signed-off-by: Ken Liu <Ken.Liu@arm.com>
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 177268c..836f838 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -649,11 +649,12 @@
 
     /* Init partition first for it will be used when init service */
     for (i = 0; i < g_spm_partition_db.partition_count; i++) {
+
         partition = &g_spm_partition_db.partitions[i];
 
-        if (!partition || !partition->memory_data || !partition->p_static) {
-            tfm_core_panic();
-        }
+        /* Skip NULL checking on statically reserved arraries. */
+        partition->p_static = &static_data_list[i];
+        partition->memory_data = &memory_data_list[i];
 
         if (!(partition->p_static->flags & SPM_PART_FLAG_IPC)) {
             tfm_core_panic();
@@ -1008,18 +1009,3 @@
         *res_ptr = (uint32_t)TFM_ERROR_INVALID_PARAMETER;
     }
 }
-
-enum spm_err_t tfm_spm_db_init(void)
-{
-    uint32_t i;
-
-    /* This function initialises partition db */
-
-    for (i = 0; i < g_spm_partition_db.partition_count; i++) {
-        g_spm_partition_db.partitions[i].p_static = &static_data_list[i];
-        g_spm_partition_db.partitions[i].memory_data = &memory_data_list[i];
-    }
-    g_spm_partition_db.is_init = 1;
-
-    return SPM_ERR_OK;
-}