blob: c7d2c08e26dce31a99502f477263a9f50237f2c1 [file] [log] [blame]
Wendy Liang3aebacf2017-09-13 11:02:42 -07001/*
Michal Simek2a47faa2023-04-14 08:43:51 +02002 * Copyright (c) 2017-2018, Arm Limited and Contributors. All rights reserved.
Michal Simek646cdd12023-04-25 10:18:10 +02003 * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved.
4 * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved.
Wendy Liang3aebacf2017-09-13 11:02:42 -07005 *
6 * SPDX-License-Identifier: BSD-3-Clause
7 */
8
9/*
10 * Zynq UltraScale+ MPSoC IPI agent registers access management
11 */
12
Michal Simek646cdd12023-04-25 10:18:10 +020013#include <lib/utils_def.h>
Jolly Shahb07fd0c2019-01-08 11:25:28 -080014#include <ipi.h>
Jolly Shah4c172372019-01-08 11:21:29 -080015#include <plat_ipi.h>
Antonio Nino Diaze0f90632018-12-14 00:18:21 +000016
Wendy Liang3aebacf2017-09-13 11:02:42 -070017/* Zynqmp ipi configuration table */
Boyan Karatotev05e9d4d2022-11-22 14:31:41 +000018static const struct ipi_config zynqmp_ipi_table[] = {
Wendy Liang3aebacf2017-09-13 11:02:42 -070019 /* APU IPI */
20 {
21 .ipi_bit_mask = 0x1,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053022 .ipi_reg_base = 0xFF300000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070023 .secure_only = 0,
24 },
25 /* RPU0 IPI */
26 {
27 .ipi_bit_mask = 0x100,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053028 .ipi_reg_base = 0xFF310000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070029 .secure_only = 0,
30 },
31 /* RPU1 IPI */
32 {
33 .ipi_bit_mask = 0x200,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053034 .ipi_reg_base = 0xFF320000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070035 .secure_only = 0,
36 },
37 /* PMU0 IPI */
38 {
39 .ipi_bit_mask = 0x10000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053040 .ipi_reg_base = 0xFF330000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070041 .secure_only = IPI_SECURE_MASK,
42 },
43 /* PMU1 IPI */
44 {
45 .ipi_bit_mask = 0x20000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053046 .ipi_reg_base = 0xFF331000U,
Rajan Vajaba2b0562018-01-30 03:59:23 -080047 .secure_only = 0,
Wendy Liang3aebacf2017-09-13 11:02:42 -070048 },
49 /* PMU2 IPI */
50 {
51 .ipi_bit_mask = 0x40000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053052 .ipi_reg_base = 0xFF332000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070053 .secure_only = IPI_SECURE_MASK,
54 },
55 /* PMU3 IPI */
56 {
57 .ipi_bit_mask = 0x80000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053058 .ipi_reg_base = 0xFF333000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070059 .secure_only = IPI_SECURE_MASK,
60 },
61 /* PL0 IPI */
62 {
63 .ipi_bit_mask = 0x1000000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053064 .ipi_reg_base = 0xFF340000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070065 .secure_only = 0,
66 },
67 /* PL1 IPI */
68 {
69 .ipi_bit_mask = 0x2000000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053070 .ipi_reg_base = 0xFF350000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070071 .secure_only = 0,
72 },
73 /* PL2 IPI */
74 {
75 .ipi_bit_mask = 0x4000000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053076 .ipi_reg_base = 0xFF360000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070077 .secure_only = 0,
78 },
79 /* PL3 IPI */
80 {
81 .ipi_bit_mask = 0x8000000,
Venkatesh Yadav Abbarapued4f1e82022-04-29 09:58:30 +053082 .ipi_reg_base = 0xFF370000U,
Wendy Liang3aebacf2017-09-13 11:02:42 -070083 .secure_only = 0,
84 },
85};
86
Jolly Shah2f952be2019-01-08 11:27:36 -080087/**
88 * zynqmp_ipi_config_table_init() - Initialize ZynqMP IPI configuration data
89 *
90 */
91void zynqmp_ipi_config_table_init(void)
92{
93 ipi_config_table_init(zynqmp_ipi_table, ARRAY_SIZE(zynqmp_ipi_table));
94}