blob: a4210cd1ae8be9927b7d1bba34afea07d24eb40d [file] [log] [blame]
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +05301/*
Michal Simek2a47faa2023-04-14 08:43:51 +02002 * Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.
Tanmay Shahfdae9e82022-08-26 15:06:00 -07003 * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved.
Akshay Belsare589ccce2023-05-08 19:00:53 +05304 * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +05305 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
Tejas Patel69409962018-12-14 00:55:29 -08009#ifndef PLAT_PRIVATE_H
10#define PLAT_PRIVATE_H
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053011
Shubhrajyoti Dattaabf61222021-03-17 23:01:17 +053012#include <bl31/interrupt_mgmt.h>
Prasad Kummari536e1102023-06-22 10:50:02 +053013#include <lib/xlat_tables/xlat_tables_v2.h>
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053014
Tanmay Shahfdae9e82022-08-26 15:06:00 -070015typedef struct versal_intr_info_type_el3 {
16 uint32_t id;
17 interrupt_type_handler_t handler;
18} versal_intr_info_type_el3_t;
19
Prasad Kummarie7e8f862023-10-04 10:20:30 +053020uint32_t get_uart_clk(void);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053021void versal_config_setup(void);
22
Prasad Kummari0b377142023-10-26 16:32:26 +053023const mmap_region_t *plat_get_mmap(void);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053024
Akshay Belsare589ccce2023-05-08 19:00:53 +053025extern uint32_t platform_id, platform_version;
26
27void board_detection(void);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053028void plat_versal_gic_driver_init(void);
29void plat_versal_gic_init(void);
30void plat_versal_gic_cpuif_enable(void);
31void plat_versal_gic_cpuif_disable(void);
32void plat_versal_gic_pcpu_init(void);
Tejas Patel54d13192019-02-27 18:44:55 +053033void plat_versal_gic_save(void);
34void plat_versal_gic_resume(void);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053035
Venkatesh Yadav Abbarapubde87592022-05-24 11:11:12 +053036uint32_t versal_calc_core_pos(u_register_t mpidr);
Shubhrajyoti Dattaabf61222021-03-17 23:01:17 +053037/*
38 * Register handler to specific GIC entrance
39 * for INTR_TYPE_EL3 type of interrupt
40 */
Venkatesh Yadav Abbarapubde87592022-05-24 11:11:12 +053041int32_t request_intr_type_el3(uint32_t irq, interrupt_type_handler_t fiq_handler);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053042
Tejas Patel69409962018-12-14 00:55:29 -080043#endif /* PLAT_PRIVATE_H */