k3-psil-am654.c 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2019 Texas Instruments Incorporated - http://www.ti.com
  4. * Author: Peter Ujfalusi <peter.ujfalusi@ti.com>
  5. */
  6. #include <linux/kernel.h>
  7. #include "k3-psil-priv.h"
  8. #define PSIL_ETHERNET(x) \
  9. { \
  10. .thread_id = x, \
  11. .ep_config = { \
  12. .ep_type = PSIL_EP_NATIVE, \
  13. .pkt_mode = 1, \
  14. .needs_epib = 1, \
  15. .psd_size = 16, \
  16. }, \
  17. }
  18. /* PSI-L source thread IDs, used for RX (DMA_DEV_TO_MEM) */
  19. static struct psil_ep am654_src_ep_map[] = {
  20. /* PRU_ICSSG0 */
  21. PSIL_ETHERNET(0x4100),
  22. PSIL_ETHERNET(0x4101),
  23. PSIL_ETHERNET(0x4102),
  24. PSIL_ETHERNET(0x4103),
  25. /* PRU_ICSSG1 */
  26. PSIL_ETHERNET(0x4200),
  27. PSIL_ETHERNET(0x4201),
  28. PSIL_ETHERNET(0x4202),
  29. PSIL_ETHERNET(0x4203),
  30. /* PRU_ICSSG2 */
  31. PSIL_ETHERNET(0x4300),
  32. PSIL_ETHERNET(0x4301),
  33. PSIL_ETHERNET(0x4302),
  34. PSIL_ETHERNET(0x4303),
  35. /* CPSW0 */
  36. PSIL_ETHERNET(0x7000),
  37. };
  38. /* PSI-L destination thread IDs, used for TX (DMA_MEM_TO_DEV) */
  39. static struct psil_ep am654_dst_ep_map[] = {
  40. /* PRU_ICSSG0 */
  41. PSIL_ETHERNET(0xc100),
  42. PSIL_ETHERNET(0xc101),
  43. PSIL_ETHERNET(0xc102),
  44. PSIL_ETHERNET(0xc103),
  45. PSIL_ETHERNET(0xc104),
  46. PSIL_ETHERNET(0xc105),
  47. PSIL_ETHERNET(0xc106),
  48. PSIL_ETHERNET(0xc107),
  49. /* PRU_ICSSG1 */
  50. PSIL_ETHERNET(0xc200),
  51. PSIL_ETHERNET(0xc201),
  52. PSIL_ETHERNET(0xc202),
  53. PSIL_ETHERNET(0xc203),
  54. PSIL_ETHERNET(0xc204),
  55. PSIL_ETHERNET(0xc205),
  56. PSIL_ETHERNET(0xc206),
  57. PSIL_ETHERNET(0xc207),
  58. /* PRU_ICSSG2 */
  59. PSIL_ETHERNET(0xc300),
  60. PSIL_ETHERNET(0xc301),
  61. PSIL_ETHERNET(0xc302),
  62. PSIL_ETHERNET(0xc303),
  63. PSIL_ETHERNET(0xc304),
  64. PSIL_ETHERNET(0xc305),
  65. PSIL_ETHERNET(0xc306),
  66. PSIL_ETHERNET(0xc307),
  67. /* CPSW0 */
  68. PSIL_ETHERNET(0xf000),
  69. PSIL_ETHERNET(0xf001),
  70. PSIL_ETHERNET(0xf002),
  71. PSIL_ETHERNET(0xf003),
  72. PSIL_ETHERNET(0xf004),
  73. PSIL_ETHERNET(0xf005),
  74. PSIL_ETHERNET(0xf006),
  75. PSIL_ETHERNET(0xf007),
  76. };
  77. struct psil_ep_map am654_ep_map = {
  78. .name = "am654",
  79. .src = am654_src_ep_map,
  80. .src_count = ARRAY_SIZE(am654_src_ep_map),
  81. .dst = am654_dst_ep_map,
  82. .dst_count = ARRAY_SIZE(am654_dst_ep_map),
  83. };