Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 1 | /* |
Michal Simek | 2a47faa | 2023-04-14 08:43:51 +0200 | [diff] [blame] | 2 | * Copyright (c) 2017-2018, Arm Limited and Contributors. All rights reserved. |
Michal Simek | 646cdd1 | 2023-04-25 10:18:10 +0200 | [diff] [blame] | 3 | * Copyright (c) 2017-2022, Xilinx, Inc. All rights reserved. |
| 4 | * Copyright (c) 2022-2023, Advanced Micro Devices, Inc. All rights reserved. |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 5 | * |
| 6 | * SPDX-License-Identifier: BSD-3-Clause |
| 7 | */ |
| 8 | |
| 9 | /* |
| 10 | * Zynq UltraScale+ MPSoC IPI agent registers access management |
| 11 | */ |
| 12 | |
Michal Simek | 646cdd1 | 2023-04-25 10:18:10 +0200 | [diff] [blame] | 13 | #include <lib/utils_def.h> |
Jolly Shah | b07fd0c | 2019-01-08 11:25:28 -0800 | [diff] [blame] | 14 | #include <ipi.h> |
Jolly Shah | 4c17237 | 2019-01-08 11:21:29 -0800 | [diff] [blame] | 15 | #include <plat_ipi.h> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 16 | |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 17 | /* Zynqmp ipi configuration table */ |
Boyan Karatotev | 05e9d4d | 2022-11-22 14:31:41 +0000 | [diff] [blame] | 18 | static const struct ipi_config zynqmp_ipi_table[] = { |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 19 | /* APU IPI */ |
| 20 | { |
| 21 | .ipi_bit_mask = 0x1, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 22 | .ipi_reg_base = 0xFF300000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 23 | .secure_only = 0, |
| 24 | }, |
| 25 | /* RPU0 IPI */ |
| 26 | { |
| 27 | .ipi_bit_mask = 0x100, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 28 | .ipi_reg_base = 0xFF310000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 29 | .secure_only = 0, |
| 30 | }, |
| 31 | /* RPU1 IPI */ |
| 32 | { |
| 33 | .ipi_bit_mask = 0x200, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 34 | .ipi_reg_base = 0xFF320000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 35 | .secure_only = 0, |
| 36 | }, |
| 37 | /* PMU0 IPI */ |
| 38 | { |
| 39 | .ipi_bit_mask = 0x10000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 40 | .ipi_reg_base = 0xFF330000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 41 | .secure_only = IPI_SECURE_MASK, |
| 42 | }, |
| 43 | /* PMU1 IPI */ |
| 44 | { |
| 45 | .ipi_bit_mask = 0x20000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 46 | .ipi_reg_base = 0xFF331000U, |
Rajan Vaja | ba2b056 | 2018-01-30 03:59:23 -0800 | [diff] [blame] | 47 | .secure_only = 0, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 48 | }, |
| 49 | /* PMU2 IPI */ |
| 50 | { |
| 51 | .ipi_bit_mask = 0x40000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 52 | .ipi_reg_base = 0xFF332000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 53 | .secure_only = IPI_SECURE_MASK, |
| 54 | }, |
| 55 | /* PMU3 IPI */ |
| 56 | { |
| 57 | .ipi_bit_mask = 0x80000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 58 | .ipi_reg_base = 0xFF333000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 59 | .secure_only = IPI_SECURE_MASK, |
| 60 | }, |
| 61 | /* PL0 IPI */ |
| 62 | { |
| 63 | .ipi_bit_mask = 0x1000000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 64 | .ipi_reg_base = 0xFF340000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 65 | .secure_only = 0, |
| 66 | }, |
| 67 | /* PL1 IPI */ |
| 68 | { |
| 69 | .ipi_bit_mask = 0x2000000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 70 | .ipi_reg_base = 0xFF350000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 71 | .secure_only = 0, |
| 72 | }, |
| 73 | /* PL2 IPI */ |
| 74 | { |
| 75 | .ipi_bit_mask = 0x4000000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 76 | .ipi_reg_base = 0xFF360000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 77 | .secure_only = 0, |
| 78 | }, |
| 79 | /* PL3 IPI */ |
| 80 | { |
| 81 | .ipi_bit_mask = 0x8000000, |
Venkatesh Yadav Abbarapu | ed4f1e8 | 2022-04-29 09:58:30 +0530 | [diff] [blame] | 82 | .ipi_reg_base = 0xFF370000U, |
Wendy Liang | 3aebacf | 2017-09-13 11:02:42 -0700 | [diff] [blame] | 83 | .secure_only = 0, |
| 84 | }, |
| 85 | }; |
| 86 | |
Jolly Shah | 2f952be | 2019-01-08 11:27:36 -0800 | [diff] [blame] | 87 | /** |
Prasad Kummari | 7d0623a | 2023-06-09 14:32:00 +0530 | [diff] [blame] | 88 | * zynqmp_ipi_config_table_init() - Initialize ZynqMP IPI configuration data. |
Jolly Shah | 2f952be | 2019-01-08 11:27:36 -0800 | [diff] [blame] | 89 | * |
| 90 | */ |
| 91 | void zynqmp_ipi_config_table_init(void) |
| 92 | { |
| 93 | ipi_config_table_init(zynqmp_ipi_table, ARRAY_SIZE(zynqmp_ipi_table)); |
| 94 | } |