Build: Add memory protection configuration

Add a config macro "CONFIG_TFM_ENABLE_MEMORY_PROTECT" to control if the
memory protection function is enabled or not. The default value is "OFF"
and it is set to "ON" when the isolation level greater than 1.

Change-Id: I3e5495c97183e07a0f9b82ea4923ea20ee10071a
Signed-off-by: Edison Ai <edison.ai@arm.com>
Co-authored-by: Shawn Shan <shawn.shan@arm.com>
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 0435212..3607753 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -105,7 +105,7 @@
  */
 enum tfm_plat_err_t tfm_spm_hal_init_isolation_hw(void);
 
-#if TFM_LVL != 1
+#ifdef CONFIG_TFM_ENABLE_MEMORY_PROTECT
 /**
  * \brief This function initialises the HW used for isolation, and sets the
  *        default configuration for them.
@@ -114,7 +114,7 @@
  * \return Returns values as specified by the \ref tfm_plat_err_t
  */
 enum tfm_plat_err_t tfm_spm_hal_setup_isolation_hw(void);
-#endif
+#endif /* CONFIG_TFM_ENABLE_MEMORY_PROTECT */
 
 /**
  * \brief Configure peripherals for a partition based on the platform data and