SPM: Change to new SPM log APIs

Change the LOG_MSG to new log APIs in SPM part.

Change-Id: Ief970fdcff6dfa80b272d29234014ead1ffb18ff
Signed-off-by: Shawn Shan <Shawn.Shan@arm.com>
diff --git a/secure_fw/spm/cmsis_func/main.c b/secure_fw/spm/cmsis_func/main.c
index 169f146..bfc11cd 100644
--- a/secure_fw/spm/cmsis_func/main.c
+++ b/secure_fw/spm/cmsis_func/main.c
@@ -7,13 +7,13 @@
 
 #include "arch.h"
 #include "common/tfm_boot_data.h"
-#include "log/tfm_log.h"
 #include "region.h"
 #include "spm_func.h"
 #include "tfm_hal_platform.h"
 #include "tfm_irq_list.h"
 #include "tfm_nspm.h"
 #include "tfm_spm_hal.h"
+#include "tfm_spm_log.h"
 #include "tfm_version.h"
 
 /*
@@ -30,6 +30,12 @@
 #error Only TFM_LVL 1 is supported for library model!
 #endif
 
+#define PRINT_TFM_VERSION  SPMLOG_INFMSGVAL("Booting TFM v", VERSION_MAJOR); \
+                           SPMLOG_INFMSGVAL(".", VERSION_MINOR); \
+                           SPMLOG_INFMSG(" "); \
+                           SPMLOG_INFMSG(VERSION_STRING); \
+                           SPMLOG_INFMSG("\r\n")
+
 REGION_DECLARE(Image$$, ARM_LIB_STACK_MSP,  $$ZI$$Base);
 
 static int32_t tfm_core_init(void)
@@ -75,10 +81,11 @@
     /* Configures architecture-specific coprocessors */
     tfm_arch_configure_coprocessors();
 
-    LOG_MSG("\033[1;34m[Sec Thread] Secure image initializing!\033[0m\r\n");
+    SPMLOG_INFMSG("\033[1;34m[Sec Thread] Secure image initializing!\033[0m\r\n");
 
 #ifdef TFM_CORE_DEBUG
-    LOG_MSG("TF-M isolation level is: %d\r\n", TFM_LVL);
+    SPMLOG_DBGMSGVAL("TF-M isolation level is: ", TFM_LVL);
+    SPMLOG_DBGMSG("\r\n");
 #endif
 
     tfm_core_validate_boot_data();
@@ -131,8 +138,7 @@
         tfm_core_panic();
     }
     /* Print the TF-M version */
-    LOG_MSG("\033[1;34mBooting TFM v%d.%d %s\033[0m\r\n",
-            VERSION_MAJOR, VERSION_MINOR, VERSION_STRING);
+    PRINT_TFM_VERSION;
 
     if (tfm_spm_db_init() != SPM_ERR_OK) {
         tfm_core_panic();
@@ -173,7 +179,7 @@
 
 #ifdef TFM_CORE_DEBUG
     /* Jumps to non-secure code */
-    LOG_MSG("\033[1;34mJumping to non-secure code...\033[0m\r\n");
+    SPMLOG_DBGMSG("\033[1;34mJumping to non-secure code...\033[0m\r\n");
 #endif
 
     jump_to_ns_code();