summaryrefslogtreecommitdiff
path: root/arch/arm/mach-mediatek/mt8512/lowlevel_init.S
diff options
context:
space:
mode:
authormingming lee <mingming.lee@mediatek.com>2019-12-31 11:29:19 +0800
committerTom Rini <trini@konsulko.com>2020-01-16 09:39:45 -0500
commit953bb4c3ce026395a2a4b9fb5e1fda79cde2fd97 (patch)
tree647d13c9cac927987abe913af5f0481b82a4093f /arch/arm/mach-mediatek/mt8512/lowlevel_init.S
parent0c0859cf2dae59932774c8034c8228d1b80368f1 (diff)
ARM: MediaTek: Add support for MediaTek MT8512 SoC
Add support for MediaTek MT8512 SoC. This include the file that will initialize the SoC after boot and its device tree. Signed-off-by: mingming lee <mingming.lee@mediatek.com>
Diffstat (limited to 'arch/arm/mach-mediatek/mt8512/lowlevel_init.S')
-rw-r--r--arch/arm/mach-mediatek/mt8512/lowlevel_init.S32
1 files changed, 32 insertions, 0 deletions
diff --git a/arch/arm/mach-mediatek/mt8512/lowlevel_init.S b/arch/arm/mach-mediatek/mt8512/lowlevel_init.S
new file mode 100644
index 0000000000..ad392120f4
--- /dev/null
+++ b/arch/arm/mach-mediatek/mt8512/lowlevel_init.S
@@ -0,0 +1,32 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+/*
+ * Copyright (C) 2019 MediaTek Inc.
+ * Author: Mingming Lee <mingming.lee@mediatek.com>
+ */
+
+/*
+ * Switch from AArch64 EL2 to AArch32 EL2
+ * @param inputs:
+ * x0: argument, zero
+ * x1: machine nr
+ * x2: fdt address
+ * x3: input argument
+ * x4: kernel entry point
+ * @param outputs for secure firmware:
+ * x0: function id
+ * x1: kernel entry point
+ * x2: machine nr
+ * x3: fdt address
+*/
+.global armv8_el2_to_aarch32
+armv8_el2_to_aarch32:
+ mov x3, x2
+ mov x2, x1
+ mov x1, x4
+ mov x4, #0
+ /* Define in src\bsp\trustzone\atf\v1.2\ */
+ /* mt8xxx\plat\mediatek\common\sip_svc.h */
+ /* MTK_SIP_KERNEL_BOOT_AARCH64 for U-BOOT-64 to KERNEL*/
+ ldr x0, =0xC2000200
+ SMC #0
+ ret