xrdc.h 817 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright 2021-2024 NXP
  3. *
  4. * SPDX-License-Identifier: BSD-3-Clause
  5. */
  6. #ifndef IMX8ULP_XRDC_H
  7. #define IMX8ULP_XRDC_H
  8. #define DID_MAX 8
  9. #define PAC_SLOT_ALL 128
  10. #define MSC_SLOT_ALL 8
  11. enum xrdc_mda_sa {
  12. MDA_SA_S,
  13. MDA_SA_NS,
  14. MDA_SA_PT, /* pass through master's secure/nonsecure attribute */
  15. };
  16. struct xrdc_mda_config {
  17. uint16_t mda_id;
  18. uint16_t did;
  19. enum xrdc_mda_sa sa;
  20. };
  21. struct xrdc_pac_msc_config {
  22. uint16_t pac_msc_id;
  23. uint16_t slot_id;
  24. uint8_t dsel[DID_MAX];
  25. };
  26. struct xrdc_mrc_config {
  27. uint16_t mrc_id;
  28. uint16_t region_id;
  29. uint32_t region_start;
  30. uint32_t region_size;
  31. uint8_t dsel[DID_MAX];
  32. uint16_t accset[2];
  33. };
  34. /* APIs to apply and enable XRDC */
  35. int xrdc_apply_lpav_config(void);
  36. int xrdc_apply_hifi_config(void);
  37. int xrdc_apply_apd_config(void);
  38. void xrdc_enable(void);
  39. #endif