xref: /rk3399_ARM-atf/plat/qti/msm8916/tsp/msm8916_tsp_setup.c (revision 52e486f6a6192bd18d36cdcbc35c59092eefc810)
1 /*
2  * Copyright (c) 2023, Stephan Gerhold <stephan@gerhold.net>
3  * Copyright (c) 2025, Arm Limited. All rights reserved.
4  *
5  * SPDX-License-Identifier: BSD-3-Clause
6  */
7 
8 #include <common/debug.h>
9 #include <platform_tsp.h>
10 
11 #include "../msm8916_setup.h"
12 #include <platform_def.h>
13 
14 void tsp_early_platform_setup(u_register_t arg0, u_register_t arg1,
15 			      u_register_t arg2, u_register_t arg3)
16 {
17 	msm8916_early_platform_setup();
18 }
19 
20 void tsp_plat_arch_setup(void)
21 {
22 	msm8916_plat_arch_setup(BL32_BASE, BL32_END - BL32_BASE);
23 	enable_mmu_el1(0);
24 }
25 
26 void tsp_platform_setup(void)
27 {
28 	INFO("TSP: Platform setup start\n");
29 	msm8916_platform_setup();
30 	INFO("TSP: Platform setup done\n");
31 
32 	console_switch_state(CONSOLE_FLAG_RUNTIME);
33 }
34