blob: 74b082df1f9845855dd64110e42d10789df74c04 [file] [log] [blame]
Tejas Patel354fe572018-12-14 00:55:37 -08001/*
Michal Simek646cdd12023-04-25 10:18:10 +02002 * Copyright (c) 2019-2022, Xilinx, Inc. All rights reserved.
3 * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
Tejas Patel354fe572018-12-14 00:55:37 -08004 *
5 * SPDX-License-Identifier: BSD-3-Clause
6 */
7
8/*
9 * Versal IPI agent registers access management
10 */
11
Michal Simek646cdd12023-04-25 10:18:10 +020012#include <lib/utils_def.h>
Prasad Kummari536e1102023-06-22 10:50:02 +053013
Tejas Patel354fe572018-12-14 00:55:37 -080014#include <ipi.h>
15#include <plat_ipi.h>
Tejas Patel354fe572018-12-14 00:55:37 -080016
17/* versal ipi configuration table */
Boyan Karatotev05e9d4d2022-11-22 14:31:41 +000018static const struct ipi_config versal_ipi_table[] = {
Michal Simekf0ff0482023-02-08 13:34:47 +010019 /* PMC IPI */
20 [IPI_ID_PMC] = {
21 .ipi_bit_mask = PMC_IPI_TRIG_BIT,
Michal Simek32e44682023-02-09 13:33:43 +010022 .ipi_reg_base = PMC_REG_BASE,
Jay Buddhabhatti84be8e82023-07-31 01:31:00 -070023 .secure_only = IPI_SECURE_MASK,
Tejas Patel354fe572018-12-14 00:55:37 -080024 },
25
Michal Simekf0ff0482023-02-08 13:34:47 +010026 /* A72 IPI */
27 [IPI_ID_APU] = {
28 .ipi_bit_mask = IPI0_TRIG_BIT,
Tejas Patel354fe572018-12-14 00:55:37 -080029 .ipi_reg_base = IPI0_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070030 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080031 },
32
33 /* RPU0 IPI */
34 [IPI_ID_RPU0] = {
35 .ipi_bit_mask = IPI1_TRIG_BIT,
36 .ipi_reg_base = IPI1_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070037 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080038 },
39
40 /* RPU1 IPI */
41 [IPI_ID_RPU1] = {
42 .ipi_bit_mask = IPI2_TRIG_BIT,
43 .ipi_reg_base = IPI2_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070044 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080045 },
46
47 /* IPI3 IPI */
48 [IPI_ID_3] = {
49 .ipi_bit_mask = IPI3_TRIG_BIT,
50 .ipi_reg_base = IPI3_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070051 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080052 },
53
54 /* IPI4 IPI */
55 [IPI_ID_4] = {
56 .ipi_bit_mask = IPI4_TRIG_BIT,
57 .ipi_reg_base = IPI4_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070058 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080059 },
60
61 /* IPI5 IPI */
62 [IPI_ID_5] = {
63 .ipi_bit_mask = IPI5_TRIG_BIT,
64 .ipi_reg_base = IPI5_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070065 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080066 },
67};
68
Prasad Kummari7d0623a2023-06-09 14:32:00 +053069/* versal_ipi_config_table_init() - Initialize versal IPI configuration data.
70 * @ipi_config_table: IPI configuration table.
71 * @ipi_total: Total number of IPI available.
Tejas Patel354fe572018-12-14 00:55:37 -080072 *
73 */
74void versal_ipi_config_table_init(void)
75{
76 ipi_config_table_init(versal_ipi_table, ARRAY_SIZE(versal_ipi_table));
77}