versal_ipi.c 1.6 KB

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