blob: 51eb7599fdcc4b1c5d402ac000843ec84204f9b2 [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>
Tejas Patel354fe572018-12-14 00:55:37 -080013#include <ipi.h>
14#include <plat_ipi.h>
Tejas Patel354fe572018-12-14 00:55:37 -080015
16/* versal ipi configuration table */
Boyan Karatotev05e9d4d2022-11-22 14:31:41 +000017static const struct ipi_config versal_ipi_table[] = {
Michal Simekf0ff0482023-02-08 13:34:47 +010018 /* PMC IPI */
19 [IPI_ID_PMC] = {
20 .ipi_bit_mask = PMC_IPI_TRIG_BIT,
Michal Simek32e44682023-02-09 13:33:43 +010021 .ipi_reg_base = PMC_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070022 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080023 },
24
Michal Simekf0ff0482023-02-08 13:34:47 +010025 /* A72 IPI */
26 [IPI_ID_APU] = {
27 .ipi_bit_mask = IPI0_TRIG_BIT,
Tejas Patel354fe572018-12-14 00:55:37 -080028 .ipi_reg_base = IPI0_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070029 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080030 },
31
32 /* RPU0 IPI */
33 [IPI_ID_RPU0] = {
34 .ipi_bit_mask = IPI1_TRIG_BIT,
35 .ipi_reg_base = IPI1_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070036 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080037 },
38
39 /* RPU1 IPI */
40 [IPI_ID_RPU1] = {
41 .ipi_bit_mask = IPI2_TRIG_BIT,
42 .ipi_reg_base = IPI2_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070043 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080044 },
45
46 /* IPI3 IPI */
47 [IPI_ID_3] = {
48 .ipi_bit_mask = IPI3_TRIG_BIT,
49 .ipi_reg_base = IPI3_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070050 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080051 },
52
53 /* IPI4 IPI */
54 [IPI_ID_4] = {
55 .ipi_bit_mask = IPI4_TRIG_BIT,
56 .ipi_reg_base = IPI4_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070057 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080058 },
59
60 /* IPI5 IPI */
61 [IPI_ID_5] = {
62 .ipi_bit_mask = IPI5_TRIG_BIT,
63 .ipi_reg_base = IPI5_REG_BASE,
Abhyuday Godhasara589afa52021-08-11 06:15:13 -070064 .secure_only = 0U,
Tejas Patel354fe572018-12-14 00:55:37 -080065 },
66};
67
68/* versal_ipi_config_table_init() - Initialize versal IPI configuration data
69 *
70 * @ipi_config_table - IPI configuration table
71 * @ipi_total - Total number of IPI available
72 *
73 */
74void versal_ipi_config_table_init(void)
75{
76 ipi_config_table_init(versal_ipi_table, ARRAY_SIZE(versal_ipi_table));
77}