Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 1 | /* |
Michal Simek | 2a47faa | 2023-04-14 08:43:51 +0200 | [diff] [blame] | 2 | * Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved. |
Tanmay Shah | fdae9e8 | 2022-08-26 15:06:00 -0700 | [diff] [blame] | 3 | * Copyright (c) 2018-2022, Xilinx, Inc. All rights reserved. |
Akshay Belsare | 589ccce | 2023-05-08 19:00:53 +0530 | [diff] [blame] | 4 | * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 5 | * |
| 6 | * SPDX-License-Identifier: BSD-3-Clause |
| 7 | */ |
| 8 | |
Tejas Patel | 6940996 | 2018-12-14 00:55:29 -0800 | [diff] [blame] | 9 | #ifndef PLAT_PRIVATE_H |
| 10 | #define PLAT_PRIVATE_H |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 11 | |
Shubhrajyoti Datta | abf6122 | 2021-03-17 23:01:17 +0530 | [diff] [blame] | 12 | #include <bl31/interrupt_mgmt.h> |
Prasad Kummari | 536e110 | 2023-06-22 10:50:02 +0530 | [diff] [blame] | 13 | #include <lib/xlat_tables/xlat_tables_v2.h> |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 14 | |
Tanmay Shah | fdae9e8 | 2022-08-26 15:06:00 -0700 | [diff] [blame] | 15 | typedef 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 Kummari | e7e8f86 | 2023-10-04 10:20:30 +0530 | [diff] [blame] | 20 | uint32_t get_uart_clk(void); |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 21 | void versal_config_setup(void); |
| 22 | |
Prasad Kummari | 0b37714 | 2023-10-26 16:32:26 +0530 | [diff] [blame] | 23 | const mmap_region_t *plat_get_mmap(void); |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 24 | |
Akshay Belsare | 589ccce | 2023-05-08 19:00:53 +0530 | [diff] [blame] | 25 | extern uint32_t platform_id, platform_version; |
| 26 | |
| 27 | void board_detection(void); |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 28 | void plat_versal_gic_driver_init(void); |
| 29 | void plat_versal_gic_init(void); |
| 30 | void plat_versal_gic_cpuif_enable(void); |
| 31 | void plat_versal_gic_cpuif_disable(void); |
| 32 | void plat_versal_gic_pcpu_init(void); |
Tejas Patel | 54d1319 | 2019-02-27 18:44:55 +0530 | [diff] [blame] | 33 | void plat_versal_gic_save(void); |
| 34 | void plat_versal_gic_resume(void); |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 35 | |
Venkatesh Yadav Abbarapu | bde8759 | 2022-05-24 11:11:12 +0530 | [diff] [blame] | 36 | uint32_t versal_calc_core_pos(u_register_t mpidr); |
Shubhrajyoti Datta | abf6122 | 2021-03-17 23:01:17 +0530 | [diff] [blame] | 37 | /* |
| 38 | * Register handler to specific GIC entrance |
| 39 | * for INTR_TYPE_EL3 type of interrupt |
| 40 | */ |
Venkatesh Yadav Abbarapu | bde8759 | 2022-05-24 11:11:12 +0530 | [diff] [blame] | 41 | int32_t request_intr_type_el3(uint32_t irq, interrupt_type_handler_t fiq_handler); |
Siva Durga Prasad Paladugu | fe4af66 | 2018-09-25 18:44:58 +0530 | [diff] [blame] | 42 | |
Tejas Patel | 6940996 | 2018-12-14 00:55:29 -0800 | [diff] [blame] | 43 | #endif /* PLAT_PRIVATE_H */ |