blob: 28d15a59e618dae7781100d818c0720b141788a5 [file] [log] [blame]
Abdellatif El Khlifiad9b8e52021-04-21 17:20:43 +01001/*
2 * Copyright (c) 2021, Arm Limited and Contributors. All rights reserved.
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#include <assert.h>
8
9#include <common/bl_common.h>
10
11#include <plat/arm/common/plat_arm.h>
12#include <plat/common/platform.h>
13#include <platform_def.h>
14
15/*
16 * Table of regions to map using the MMU.
17 * Replace or extend the below regions as required
18 */
19
20const mmap_region_t plat_arm_mmap[] = {
21 ARM_MAP_SHARED_RAM,
22 ARM_MAP_NS_SHARED_RAM,
23 ARM_MAP_NS_DRAM1,
24 DIPHDA_MAP_DEVICE,
25 DIPHDA_EXTERNAL_FLASH,
26 {0}
27};
28
29/* diphda only has one always-on power domain and there
30 * is no power control present
31 */
32void __init plat_arm_pwrc_setup(void)
33{
34}
35
36unsigned int plat_get_syscnt_freq2(void)
37{
38 /* Returning the Generic Timer Frequency */
39 return SYS_COUNTER_FREQ_IN_TICKS;
40}
41
42
43/*
44 * Helper function to initialize ARM interconnect driver.
45 */
46void plat_arm_interconnect_init(void)
47{
48}
49
50/*
51 * Helper function to place current master into coherency
52 */
53void plat_arm_interconnect_enter_coherency(void)
54{
55}
56
57/*
58 * Helper function to remove current master from coherency
59 */
60void plat_arm_interconnect_exit_coherency(void)
61{
62}
63
64/*
65 * This function is invoked during Mbed TLS library initialisation to get a heap
66 * The function simply returns the default allocated heap.
67 */
68
69#if TRUSTED_BOARD_BOOT
70int plat_get_mbedtls_heap(void **heap_addr, size_t *heap_size)
71{
72 assert(heap_addr != NULL);
73 assert(heap_size != NULL);
74
75 return arm_get_mbedtls_heap(heap_addr, heap_size);
76}
77#endif