uniphier_tsp_setup.c 682 Bytes
Newer Older
Masahiro Yamada's avatar
Masahiro Yamada committed
1
/*
2
 * Copyright (c) 2017-2020, ARM Limited and Contributors. All rights reserved.
Masahiro Yamada's avatar
Masahiro Yamada committed
3
4
5
6
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

7
8
#include <errno.h>

Masahiro Yamada's avatar
Masahiro Yamada committed
9
#include <platform_def.h>
10

11
#include <common/bl_common.h>
12
#include <lib/xlat_tables/xlat_mmu_helpers.h>
13
#include <plat/common/platform.h>
Masahiro Yamada's avatar
Masahiro Yamada committed
14
15
16

#include "../uniphier.h"

17
18
static unsigned int uniphier_soc = UNIPHIER_SOC_UNKNOWN;

Masahiro Yamada's avatar
Masahiro Yamada committed
19
20
void tsp_early_platform_setup(void)
{
21
22
23
24
25
	uniphier_soc = uniphier_get_soc_id();
	if (uniphier_soc == UNIPHIER_SOC_UNKNOWN)
		plat_error_handler(-ENOTSUP);

	uniphier_console_setup(uniphier_soc);
Masahiro Yamada's avatar
Masahiro Yamada committed
26
27
28
29
30
31
32
33
}

void tsp_platform_setup(void)
{
}

void tsp_plat_arch_setup(void)
{
34
	uniphier_mmap_setup();
Masahiro Yamada's avatar
Masahiro Yamada committed
35
36
	enable_mmu_el1(0);
}