1 /*
2 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7 #include <assert.h>
8
9 #include <common/debug.h>
10 #include <lib/mmio.h>
11 #include <platform_def.h>
12 #include <plat/arm/common/arm_config.h>
13 #include <plat/arm/common/plat_arm.h>
14
15 #define MAP_PERIPHBASE MAP_REGION_FLAT(PERIPHBASE,\
16 PERIPH_SIZE,\
17 MT_DEVICE | MT_RW | MT_SECURE)
18
19 #define MAP_A5_PERIPHERALS MAP_REGION_FLAT(A5_PERIPHERALS_BASE,\
20 A5_PERIPHERALS_SIZE,\
21 MT_DEVICE | MT_RW | MT_SECURE)
22
23 #ifdef IMAGE_BL1
24 const mmap_region_t plat_arm_mmap[] = {
25 ARM_MAP_SHARED_RAM,
26 MAP_PERIPHBASE,
27 MAP_A5_PERIPHERALS,
28 MAP_BOOT_RW,
29 {0}
30 };
31 #endif
32 #ifdef IMAGE_BL2
33 const mmap_region_t plat_arm_mmap[] = {
34 ARM_MAP_SHARED_RAM,
35 MAP_PERIPHBASE,
36 MAP_A5_PERIPHERALS,
37 MAP_BOOT_RW,
38 ARM_MAP_NS_DRAM1,
39 {0}
40 };
41 #endif
42 #ifdef IMAGE_BL32
43 const mmap_region_t plat_arm_mmap[] = {
44 ARM_MAP_SHARED_RAM,
45 MAP_PERIPHBASE,
46 MAP_A5_PERIPHERALS,
47 {0}
48 };
49 #endif
50
51 ARM_CASSERT_MMAP
52
plat_get_syscnt_freq2(void)53 unsigned int plat_get_syscnt_freq2(void)
54 {
55 return A5DS_TIMER_BASE_FREQUENCY;
56 }
57