blob: a4a0cff929f5ea55b49cafc24d6aab52fb0374d1 [file] [log] [blame]
Usama Arif82e95092019-06-18 16:46:05 +01001/*
Avinash Mehta81ffc162019-12-18 10:18:46 +00002 * Copyright (c) 2019-2020, Arm Limited. All rights reserved.
Usama Arif82e95092019-06-18 16:46:05 +01003 *
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
24const mmap_region_t plat_arm_mmap[] = {
25 ARM_MAP_SHARED_RAM,
Usama Arif82e95092019-06-18 16:46:05 +010026 MAP_PERIPHBASE,
27 MAP_A5_PERIPHERALS,
Avinash Mehta81ffc162019-12-18 10:18:46 +000028 MAP_BOOT_RW,
Usama Arif82e95092019-06-18 16:46:05 +010029 {0}
30};
31#endif
32#ifdef IMAGE_BL2
33const mmap_region_t plat_arm_mmap[] = {
34 ARM_MAP_SHARED_RAM,
Usama Arif82e95092019-06-18 16:46:05 +010035 MAP_PERIPHBASE,
36 MAP_A5_PERIPHERALS,
Avinash Mehta81ffc162019-12-18 10:18:46 +000037 MAP_BOOT_RW,
Usama Arif82e95092019-06-18 16:46:05 +010038 ARM_MAP_NS_DRAM1,
39 {0}
40};
41#endif
42#ifdef IMAGE_BL32
43const mmap_region_t plat_arm_mmap[] = {
44 ARM_MAP_SHARED_RAM,
45 MAP_PERIPHBASE,
46 MAP_A5_PERIPHERALS,
47 {0}
48};
49#endif
50
51ARM_CASSERT_MMAP
52
53unsigned int plat_get_syscnt_freq2(void)
54{
55 return A5DS_TIMER_BASE_FREQUENCY;
56}