blob: 9cd86361f23ddb7724c4d29087f10a1199a117c6 [file] [log] [blame]
Michal Simek91794362022-08-31 16:45:14 +02001/*
Michal Simek2a47faa2023-04-14 08:43:51 +02002 * Copyright (c) 2018-2019, Arm Limited and Contributors. All rights reserved.
Michal Simek91794362022-08-31 16:45:14 +02003 * Copyright (c) 2021-2022, Xilinx, Inc. All rights reserved.
Jay Buddhabhatti5b9f3912023-02-02 22:34:03 -08004 * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
Michal Simek91794362022-08-31 16:45:14 +02005 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9#ifndef PLAT_PRIVATE_H
10#define PLAT_PRIVATE_H
11
Jay Buddhabhattic6daff02022-09-05 02:56:32 -070012#include <bl31/interrupt_mgmt.h>
Michal Simek91794362022-08-31 16:45:14 +020013#include <lib/xlat_tables/xlat_tables_v2.h>
14
Jay Buddhabhattic6daff02022-09-05 02:56:32 -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
Michal Simek91794362022-08-31 16:45:14 +020020void versal_net_config_setup(void);
Prasad Kummarie7e8f862023-10-04 10:20:30 +053021uint32_t get_uart_clk(void);
Michal Simek91794362022-08-31 16:45:14 +020022
Prasad Kummari0b377142023-10-26 16:32:26 +053023const mmap_region_t *plat_get_mmap(void);
Michal Simek91794362022-08-31 16:45:14 +020024
25void plat_versal_net_gic_driver_init(void);
26void plat_versal_net_gic_init(void);
27void plat_versal_net_gic_cpuif_enable(void);
Jay Buddhabhattic6daff02022-09-05 02:56:32 -070028void plat_versal_net_gic_cpuif_disable(void);
Michal Simek91794362022-08-31 16:45:14 +020029void plat_versal_net_gic_pcpu_init(void);
Jay Buddhabhattic6daff02022-09-05 02:56:32 -070030void plat_versal_net_gic_save(void);
31void plat_versal_net_gic_resume(void);
32void plat_versal_net_gic_redistif_on(void);
33void plat_versal_net_gic_redistif_off(void);
Michal Simek91794362022-08-31 16:45:14 +020034
35extern uint32_t cpu_clock, platform_id, platform_version;
36void board_detection(void);
37char *board_name_decode(void);
38uint64_t smc_handler(uint32_t smc_fid, uint64_t x1, uint64_t x2, uint64_t x3,
39 uint64_t x4, void *cookie, void *handle, uint64_t flags);
40int32_t sip_svc_setup_init(void);
Jay Buddhabhattic6daff02022-09-05 02:56:32 -070041/*
42 * Register handler to specific GIC entrance
43 * for INTR_TYPE_EL3 type of interrupt
44 */
45int request_intr_type_el3(uint32_t irq, interrupt_type_handler_t fiq_handler);
Michal Simek91794362022-08-31 16:45:14 +020046
Michal Simek91794362022-08-31 16:45:14 +020047#endif /* PLAT_PRIVATE_H */