a5ds_common.c 1.04 KB
Newer Older
1
/*
2
 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <assert.h>

#include <common/debug.h>
#include <lib/mmio.h>
#include <platform_def.h>
#include <plat/arm/common/arm_config.h>
#include <plat/arm/common/plat_arm.h>

#define MAP_PERIPHBASE	MAP_REGION_FLAT(PERIPHBASE,\
					PERIPH_SIZE,\
					MT_DEVICE | MT_RW | MT_SECURE)

#define MAP_A5_PERIPHERALS	MAP_REGION_FLAT(A5_PERIPHERALS_BASE,\
					A5_PERIPHERALS_SIZE,\
					MT_DEVICE | MT_RW | MT_SECURE)

#ifdef IMAGE_BL1
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	MAP_PERIPHBASE,
	MAP_A5_PERIPHERALS,
28
	MAP_BOOT_RW,
29
30
31
32
33
34
35
36
	{0}
};
#endif
#ifdef IMAGE_BL2
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	MAP_PERIPHBASE,
	MAP_A5_PERIPHERALS,
37
	MAP_BOOT_RW,
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
	ARM_MAP_NS_DRAM1,
	{0}
};
#endif
#ifdef IMAGE_BL32
const mmap_region_t plat_arm_mmap[] = {
	ARM_MAP_SHARED_RAM,
	MAP_PERIPHBASE,
	MAP_A5_PERIPHERALS,
	{0}
};
#endif

ARM_CASSERT_MMAP

unsigned int plat_get_syscnt_freq2(void)
{
	return A5DS_TIMER_BASE_FREQUENCY;
}