soc_ipi.c 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. /*
  2. * Copyright (c) 2022, Xilinx, Inc. All rights reserved.
  3. * Copyright (c) 2022-2024, Advanced Micro Devices, Inc. All rights reserved.
  4. *
  5. * SPDX-License-Identifier: BSD-3-Clause
  6. */
  7. /*
  8. * SoC IPI agent registers access management
  9. */
  10. #include <lib/utils_def.h>
  11. #include <plat_ipi.h>
  12. /* versal2 ipi configuration table */
  13. static const struct ipi_config ipi_table[IPI_ID_MAX] = {
  14. /* A78 IPI */
  15. [IPI_ID_APU] = {
  16. .ipi_bit_mask = IPI0_TRIG_BIT,
  17. .ipi_reg_base = IPI0_REG_BASE,
  18. .secure_only = 0,
  19. },
  20. /* PMC IPI */
  21. [IPI_ID_PMC] = {
  22. .ipi_bit_mask = PMC_IPI_TRIG_BIT,
  23. .ipi_reg_base = IPI0_REG_BASE,
  24. .secure_only = IPI_SECURE_MASK,
  25. },
  26. /* RPU0 IPI */
  27. [IPI_ID_RPU0] = {
  28. .ipi_bit_mask = IPI1_TRIG_BIT,
  29. .ipi_reg_base = IPI1_REG_BASE,
  30. .secure_only = 0,
  31. },
  32. /* RPU1 IPI */
  33. [IPI_ID_RPU1] = {
  34. .ipi_bit_mask = IPI2_TRIG_BIT,
  35. .ipi_reg_base = IPI2_REG_BASE,
  36. .secure_only = 0,
  37. },
  38. /* IPI3 IPI */
  39. [IPI_ID_3] = {
  40. .ipi_bit_mask = IPI3_TRIG_BIT,
  41. .ipi_reg_base = IPI3_REG_BASE,
  42. .secure_only = 0,
  43. },
  44. /* IPI4 IPI */
  45. [IPI_ID_4] = {
  46. .ipi_bit_mask = IPI4_TRIG_BIT,
  47. .ipi_reg_base = IPI4_REG_BASE,
  48. .secure_only = 0,
  49. },
  50. /* IPI5 IPI */
  51. [IPI_ID_5] = {
  52. .ipi_bit_mask = IPI5_TRIG_BIT,
  53. .ipi_reg_base = IPI5_REG_BASE,
  54. .secure_only = 0,
  55. },
  56. };
  57. /**
  58. * soc_ipi_config_table_init() - Initialize versal2 IPI configuration data.
  59. */
  60. void soc_ipi_config_table_init(void)
  61. {
  62. ipi_config_table_init(ipi_table, ARRAY_SIZE(ipi_table));
  63. }