blob: 091a6f7a96e6b1b6ba395d5b7cdc265479a3fb61 [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>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000012#include <lib/xlat_tables/xlat_mmu_helpers.h>
Masahiro Yamadaca971b52020-02-03 19:45:16 +090013#include <plat/common/platform.h>
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090014
15#include "../uniphier.h"
16
Masahiro Yamadaca971b52020-02-03 19:45:16 +090017static unsigned int uniphier_soc = UNIPHIER_SOC_UNKNOWN;
18
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090019void tsp_early_platform_setup(void)
20{
Masahiro Yamadaca971b52020-02-03 19:45:16 +090021 uniphier_soc = uniphier_get_soc_id();
22 if (uniphier_soc == UNIPHIER_SOC_UNKNOWN)
23 plat_error_handler(-ENOTSUP);
24
25 uniphier_console_setup(uniphier_soc);
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090026}
27
28void tsp_platform_setup(void)
29{
30}
31
32void tsp_plat_arch_setup(void)
33{
Masahiro Yamada1a741d92020-02-03 19:46:15 +090034 uniphier_mmap_setup(uniphier_soc);
Masahiro Yamadad9cf7bb2017-05-15 13:00:00 +090035 enable_mmu_el1(0);
36}