1 /*
2  * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
3  *
4  * SPDX-License-Identifier: BSD-3-Clause
5  */
6 
7 #include <errno.h>
8 
9 #include <platform_def.h>
10 
11 #include <common/bl_common.h>
12 #include <plat/common/platform.h>
13 
14 #include "../uniphier.h"
15 
16 static unsigned int uniphier_soc = UNIPHIER_SOC_UNKNOWN;
17 
tsp_early_platform_setup(void)18 void tsp_early_platform_setup(void)
19 {
20 	uniphier_soc = uniphier_get_soc_id();
21 	if (uniphier_soc == UNIPHIER_SOC_UNKNOWN)
22 		plat_error_handler(-ENOTSUP);
23 
24 	uniphier_console_setup(uniphier_soc);
25 }
26 
tsp_platform_setup(void)27 void tsp_platform_setup(void)
28 {
29 }
30 
tsp_plat_arch_setup(void)31 void tsp_plat_arch_setup(void)
32 {
33 	uniphier_mmap_setup(uniphier_soc);
34 }
35