blob: 4bbb2595c4564d9e2910254059bb1cc100d32fcb [file] [log] [blame]
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +09001/*
Masahiro Yamadae30ec7f2020-01-17 13:46:38 +09002 * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +09003 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Masahiro Yamadaca971b52020-02-03 19:45:16 +09007#include <errno.h>
8
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +09009#include <platform_def.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010
Antonio Nino Diazde97ff32019-01-25 13:28:38 +000011#include <common/bl_common.h>
Masahiro Yamadaca971b52020-02-03 19:45:16 +090012#include <plat/common/platform.h>
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090013
14#include "../uniphier.h"
15
Masahiro Yamadaca971b52020-02-03 19:45:16 +090016static unsigned int uniphier_soc = UNIPHIER_SOC_UNKNOWN;
17
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090018void tsp_early_platform_setup(void)
19{
Masahiro Yamadaca971b52020-02-03 19:45:16 +090020 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);
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090025}
26
27void tsp_platform_setup(void)
28{
29}
30
31void tsp_plat_arch_setup(void)
32{
Masahiro Yamada1a741d92020-02-03 19:46:15 +090033 uniphier_mmap_setup(uniphier_soc);
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090034}