SPM: Sort out main.c including and dependency check

This patch contains:
 - Including are now sorted by alphabet.
 - Sort out the compile-time dependency checking.

Change-Id: I84e981daf38f4ebb47205bc1a076f954d9dad897
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/secure_fw/spm/cmsis_func/main.c b/secure_fw/spm/cmsis_func/main.c
index f52ff64..0d6a23b 100644
--- a/secure_fw/spm/cmsis_func/main.c
+++ b/secure_fw/spm/cmsis_func/main.c
@@ -5,15 +5,14 @@
  *
  */
 
+#include "log/tfm_log.h"
 #include "region.h"
+#include "spm_func.h"
 #include "tfm_internal.h"
 #include "tfm_irq_list.h"
 #include "tfm_nspm.h"
 #include "tfm_spm_hal.h"
 #include "tfm_version.h"
-#include "log/tfm_log.h"
-#include "spm_func.h"
-#include "spm_partition_defs.h"
 
 /*
  * Avoids the semihosting issue
@@ -25,9 +24,7 @@
 
 #ifndef TFM_LVL
 #error TFM_LVL is not defined!
-#endif
-
-#if (TFM_LVL != 1)
+#elif (TFM_LVL != 1)
 #error Only TFM_LVL 1 is supported for library model!
 #endif