SPM: Fix Privileged mode of Partitions

In isolation level 1, all partitions run in privileged mode.
This patch fixes the tfm_spm_partition_get_privileged_mode() function.

Change-Id: I536174143bf51fdcdcbf77b2769f50eab4a8c86c
Signed-off-by: Kevin Peng <kevin.peng@arm.com>
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.c b/secure_fw/spm/cmsis_psa/spm_ipc.c
index 18cb640..359bfac 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.c
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.c
@@ -313,11 +313,15 @@
 
 uint32_t tfm_spm_partition_get_privileged_mode(uint32_t partition_flags)
 {
+#if TFM_LVL == 1
+    return TFM_PARTITION_PRIVILEGED_MODE;
+#else /* TFM_LVL == 1 */
     if (partition_flags & SPM_PART_FLAG_PSA_ROT) {
         return TFM_PARTITION_PRIVILEGED_MODE;
     } else {
         return TFM_PARTITION_UNPRIVILEGED_MODE;
     }
+#endif /* TFM_LVL == 1 */
 }
 
 struct service_t *tfm_spm_get_service_by_sid(uint32_t sid)
diff --git a/secure_fw/spm/cmsis_psa/spm_ipc.h b/secure_fw/spm/cmsis_psa/spm_ipc.h
index a694f8d..7d6e342 100644
--- a/secure_fw/spm/cmsis_psa/spm_ipc.h
+++ b/secure_fw/spm/cmsis_psa/spm_ipc.h
@@ -135,9 +135,9 @@
 };
 
 /**
- * \brief                   Get the current partition mode.
+ * \brief                   Get the privileged mode of Partition.
  *
- * \param[in] partition_flags               Flags of current partition
+ * \param[in] partition_flags               Flags of the Partition
  *
  * \retval TFM_PARTITION_PRIVILEGED_MODE    Privileged mode
  * \retval TFM_PARTITION_UNPRIVILEGED_MODE  Unprivileged mode