blob: e462fa16e558e73e22856e488ebb5a07fb3cdddc [file] [log] [blame]
Usama Arif82e95092019-06-18 16:46:05 +01001/*
2 * Copyright (c) 2019, 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
24const mmap_region_t plat_arm_mmap[] = {
25 ARM_MAP_SHARED_RAM,
26 MAP_FLASH1_RW,
27 MAP_PERIPHBASE,
28 MAP_A5_PERIPHERALS,
29 {0}
30};
31#endif
32#ifdef IMAGE_BL2
33const mmap_region_t plat_arm_mmap[] = {
34 ARM_MAP_SHARED_RAM,
35 MAP_FLASH1_RW,
36 MAP_PERIPHBASE,
37 MAP_A5_PERIPHERALS,
38 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}