feat(mediatek): introduce mtk init framework

Provide six initcall levels for drivers/modules initialize HW
controllers or runtime arguments during cold boot.

The initcall level cold boot execution order:

-MTK_EARLY_PLAT_INIT
Call before MMU enabled.

-MTK_ARCH_INIT
MMU Enabled, arch related init(GiC init, interrupt type registration).

-MTK_PLAT_SETUP_0_INIT
MTK driver init level 0.

-MTK_PLAT_SETUP_1_INIT
MTK driver init level 1.

-MTK_PLAT_RUNTIME_INIT
MTK driver init. After this initcall, TF-A handovers to MTK 2nd
bootloader.

-MTK_PLAT_BL33_DEFER_INIT
MTK 2nd bootloader traps to TF-A before handover to rich OS.
This initcall executed in the trap handler(boot_to_kernel).

Change-Id: Icd7fe95372441db73c975ccb6ce77a6c529df1cc
diff --git a/plat/mediatek/lib/mtk_init/rules.mk b/plat/mediatek/lib/mtk_init/rules.mk
new file mode 100644
index 0000000..cc6ca95
--- /dev/null
+++ b/plat/mediatek/lib/mtk_init/rules.mk
@@ -0,0 +1,14 @@
+#
+# Copyright (c) 2022, MediaTek Inc. All rights reserved.
+#
+# SPDX-License-Identifier: BSD-3-Clause
+#
+
+LOCAL_DIR := $(call GET_LOCAL_DIR)
+
+MODULE := mtk_init
+
+LOCAL_SRCS-y := $(LOCAL_DIR)/mtk_init.c
+LOCAL_SRCS-y += $(LOCAL_DIR)/mtk_mmap_init.c
+
+$(eval $(call MAKE_MODULE,$(MODULE),$(LOCAL_SRCS-y),$(MTK_BL)))