HAL: Rename platform init function

Align with HAL design document:
 - Rename 'tfm_spm_hal_post_init' to 'tfm_hal_platform_init'.
 - Set 'tfm_hal_platform_init' to weak, and platform with specific init
   operation needs to override it.
 - Remove 'tfm_spm_hal_post_init_platform' and move the operations to
   'tfm_hal_platform_init'.

Change-Id: Ia96b3a6bae716d154edab8709eb6e277bafcb45e
Signed-off-by: Summer Qin <summer.qin@arm.com>
diff --git a/platform/include/tfm_hal_platform.h b/platform/include/tfm_hal_platform.h
index bf61a84..f8f7bae 100644
--- a/platform/include/tfm_hal_platform.h
+++ b/platform/include/tfm_hal_platform.h
@@ -8,6 +8,19 @@
 #ifndef __TFM_HAL_PLATFORM_H__
 #define __TFM_HAL_PLATFORM_H__
 
+#include "tfm_hal_defs.h"
+
+/**
+ * \brief This function performs the platform-specific initialization.
+ *
+ * This function is called after architecture and platform common initialization
+ * has finished during system early startup.
+ *
+ * \retval TFM_HAL_SUCCESS          Init success.
+ * \retval TFM_HAL_ERROR_GENERIC    Generic errors.
+ */
+enum tfm_hal_status_t tfm_hal_platform_init(void);
+
 /**
  * \brief System reset
  */
diff --git a/platform/include/tfm_spm_hal.h b/platform/include/tfm_spm_hal.h
index 82d297a..673fbc9 100644
--- a/platform/include/tfm_spm_hal.h
+++ b/platform/include/tfm_spm_hal.h
@@ -69,32 +69,6 @@
 #endif
 
 /**
- * \brief This function initializes peripherals common to all platforms.
- *
- * Contrarily to SystemInit() intended for a high-priority hw initialization
- * (for example clock and power subsystems), and called on a very early boot
- * stage from startup code, this function is called from C code, hence variables
- * and other drivers data are protected from being cleared up by the C library
- * init.
- * In addition to performing initialization common to all platforms, it also
- * calls tfm_spm_hal_post_init_platform() function which implements
- * initialization of platform-specific peripherals and other hw.
- *
- * \return Returns values as specified by the \ref tfm_plat_err_t
- */
-enum tfm_plat_err_t tfm_spm_hal_post_init(void);
-
-/**
- * \brief This function initializes platform-specific peripherals and hardware.
- *
- * Called from tfm_spm_hal_post_init(), this function is intended for
- * platform-specific portion of hardware initialization.
- *
- * \return Returns values as specified by the \ref tfm_plat_err_t
- */
-enum tfm_plat_err_t tfm_spm_hal_post_init_platform(void);
-
-/**
  * \brief This function initialises the HW used for isolation, and sets the
  *        default configuration for them.
  *