blob: f55cde96110e850a24eefdae53a2e19f7b079c78 [file] [log] [blame]
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +05301/*
Venkatesh Yadav Abbarapu9156ffd2020-01-22 21:23:20 -07002 * Copyright (c) 2018-2020, ARM Limited and Contributors. All rights reserved.
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +05303 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
Tejas Patel354fe572018-12-14 00:55:37 -08007#include <plat_ipi.h>
Tejas Patel0a2f9ad2018-12-14 00:55:30 -08008#include <versal_def.h>
Tejas Patel69409962018-12-14 00:55:29 -08009#include <plat_private.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000010#include <common/debug.h>
11#include <drivers/generic_delay_timer.h>
12#include <lib/mmio.h>
13#include <lib/xlat_tables/xlat_tables.h>
14#include <plat/common/platform.h>
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053015
16/*
17 * Table of regions to map using the MMU.
18 * This doesn't include TZRAM as the 'mem_layout' argument passed to
19 * configure_mmu_elx() will give the available subset of that,
20 */
21const mmap_region_t plat_versal_mmap[] = {
22 MAP_REGION_FLAT(DEVICE0_BASE, DEVICE0_SIZE, MT_DEVICE | MT_RW | MT_SECURE),
23 MAP_REGION_FLAT(DEVICE1_BASE, DEVICE1_SIZE, MT_DEVICE | MT_RW | MT_SECURE),
24 MAP_REGION_FLAT(CRF_BASE, CRF_SIZE, MT_DEVICE | MT_RW | MT_SECURE),
Tejas Patel54d13192019-02-27 18:44:55 +053025 MAP_REGION_FLAT(FPD_MAINCCI_BASE, FPD_MAINCCI_SIZE, MT_DEVICE | MT_RW |
26 MT_SECURE),
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053027 { 0 }
28};
29
30const mmap_region_t *plat_versal_get_mmap(void)
31{
32 return plat_versal_mmap;
33}
34
35static void versal_print_platform_name(void)
36{
37 NOTICE("ATF running on Xilinx %s\n", PLATFORM_NAME);
38}
39
40void versal_config_setup(void)
41{
Tejas Patel354fe572018-12-14 00:55:37 -080042 /* Configure IPI data for versal */
43 versal_ipi_config_table_init();
44
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053045 versal_print_platform_name();
46
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053047 generic_delay_timer_init();
48}
49
Venkatesh Yadav Abbarapubde87592022-05-24 11:11:12 +053050uint32_t plat_get_syscnt_freq2(void)
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053051{
52 return VERSAL_CPU_CLOCK;
53}
54