blob: b3f6acafe5eed3f79521a2fe6f985cd8a31cce32 [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
Michal Simek058251a2023-04-13 13:19:11 +020012#include <lib/xlat_tables/xlat_tables_v2.h>
Shubhrajyoti Dattaabf61222021-03-17 23:01:17 +053013#include <bl31/interrupt_mgmt.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
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053020void versal_config_setup(void);
21
22const mmap_region_t *plat_versal_get_mmap(void);
23
Akshay Belsare589ccce2023-05-08 19:00:53 +053024extern uint32_t platform_id, platform_version;
25
26void board_detection(void);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053027void plat_versal_gic_driver_init(void);
28void plat_versal_gic_init(void);
29void plat_versal_gic_cpuif_enable(void);
30void plat_versal_gic_cpuif_disable(void);
31void plat_versal_gic_pcpu_init(void);
Tejas Patel54d13192019-02-27 18:44:55 +053032void plat_versal_gic_save(void);
33void plat_versal_gic_resume(void);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053034
Venkatesh Yadav Abbarapubde87592022-05-24 11:11:12 +053035uint32_t versal_calc_core_pos(u_register_t mpidr);
Shubhrajyoti Dattaabf61222021-03-17 23:01:17 +053036/*
37 * Register handler to specific GIC entrance
38 * for INTR_TYPE_EL3 type of interrupt
39 */
Venkatesh Yadav Abbarapubde87592022-05-24 11:11:12 +053040int32_t request_intr_type_el3(uint32_t irq, interrupt_type_handler_t fiq_handler);
Siva Durga Prasad Paladugufe4af662018-09-25 18:44:58 +053041
Tejas Patel69409962018-12-14 00:55:29 -080042#endif /* PLAT_PRIVATE_H */