k3-psil.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. /* SPDX-License-Identifier: GPL-2.0 */
  2. /*
  3. * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
  4. */
  5. #ifndef K3_PSIL_H_
  6. #define K3_PSIL_H_
  7. #include <linux/types.h>
  8. #define K3_PSIL_DST_THREAD_ID_OFFSET 0x8000
  9. struct device;
  10. /**
  11. * enum udma_tp_level - Channel Throughput Levels
  12. * @UDMA_TP_NORMAL: Normal channel
  13. * @UDMA_TP_HIGH: High Throughput channel
  14. * @UDMA_TP_ULTRAHIGH: Ultra High Throughput channel
  15. */
  16. enum udma_tp_level {
  17. UDMA_TP_NORMAL = 0,
  18. UDMA_TP_HIGH,
  19. UDMA_TP_ULTRAHIGH,
  20. UDMA_TP_LAST,
  21. };
  22. /**
  23. * enum psil_endpoint_type - PSI-L Endpoint type
  24. * @PSIL_EP_NATIVE: Normal channel
  25. * @PSIL_EP_PDMA_XY: XY mode PDMA
  26. * @PSIL_EP_PDMA_MCAN: MCAN mode PDMA
  27. * @PSIL_EP_PDMA_AASRC: AASRC mode PDMA
  28. */
  29. enum psil_endpoint_type {
  30. PSIL_EP_NATIVE = 0,
  31. PSIL_EP_PDMA_XY,
  32. PSIL_EP_PDMA_MCAN,
  33. PSIL_EP_PDMA_AASRC,
  34. };
  35. /**
  36. * struct psil_endpoint_config - PSI-L Endpoint configuration
  37. * @ep_type: PSI-L endpoint type
  38. * @pkt_mode: If set, the channel must be in Packet mode, otherwise in
  39. * TR mode
  40. * @notdpkt: TDCM must be suppressed on the TX channel
  41. * @needs_epib: Endpoint needs EPIB
  42. * @psd_size: If set, PSdata is used by the endpoint
  43. * @channel_tpl: Desired throughput level for the channel
  44. * @pdma_acc32: ACC32 must be enabled on the PDMA side
  45. * @pdma_burst: BURST must be enabled on the PDMA side
  46. */
  47. struct psil_endpoint_config {
  48. enum psil_endpoint_type ep_type;
  49. unsigned pkt_mode:1;
  50. unsigned notdpkt:1;
  51. unsigned needs_epib:1;
  52. u32 psd_size;
  53. enum udma_tp_level channel_tpl;
  54. /* PDMA properties, valid for PSIL_EP_PDMA_* */
  55. unsigned pdma_acc32:1;
  56. unsigned pdma_burst:1;
  57. };
  58. #endif /* K3_PSIL_H_ */