cx25821-sram.h 9.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247
  1. /* SPDX-License-Identifier: GPL-2.0-or-later */
  2. /*
  3. * Driver for the Conexant CX25821 PCIe bridge
  4. *
  5. * Copyright (C) 2009 Conexant Systems Inc.
  6. * Authors <[email protected]>, <[email protected]>
  7. */
  8. #ifndef __ATHENA_SRAM_H__
  9. #define __ATHENA_SRAM_H__
  10. /* #define RX_SRAM_START_SIZE = 0; // Start of reserved SRAM */
  11. #define VID_CMDS_SIZE 80 /* Video CMDS size in bytes */
  12. #define AUDIO_CMDS_SIZE 80 /* AUDIO CMDS size in bytes */
  13. #define MBIF_CMDS_SIZE 80 /* MBIF CMDS size in bytes */
  14. /* #define RX_SRAM_POOL_START_SIZE = 0; // Start of usable RX SRAM for buffers */
  15. #define VID_IQ_SIZE 64 /* VID instruction queue size in bytes */
  16. #define MBIF_IQ_SIZE 64
  17. #define AUDIO_IQ_SIZE 64 /* AUD instruction queue size in bytes */
  18. #define VID_CDT_SIZE 64 /* VID cluster descriptor table size in bytes */
  19. #define MBIF_CDT_SIZE 64 /* MBIF/HBI cluster descriptor table size in bytes */
  20. #define AUDIO_CDT_SIZE 48 /* AUD cluster descriptor table size in bytes */
  21. /* #define RX_SRAM_POOL_FREE_SIZE = 16; // Start of available RX SRAM */
  22. /* #define RX_SRAM_END_SIZE = 0; // End of RX SRAM */
  23. /* #define TX_SRAM_POOL_START_SIZE = 0; // Start of transmit pool SRAM */
  24. /* #define MSI_DATA_SIZE = 64; // Reserved (MSI Data, RISC working stora */
  25. #define VID_CLUSTER_SIZE 1440 /* VID cluster data line */
  26. #define AUDIO_CLUSTER_SIZE 128 /* AUDIO cluster data line */
  27. #define MBIF_CLUSTER_SIZE 1440 /* MBIF/HBI cluster data line */
  28. /* #define TX_SRAM_POOL_FREE_SIZE = 704; // Start of available TX SRAM */
  29. /* #define TX_SRAM_END_SIZE = 0; // End of TX SRAM */
  30. /* Receive SRAM */
  31. #define RX_SRAM_START 0x10000
  32. #define VID_A_DOWN_CMDS 0x10000
  33. #define VID_B_DOWN_CMDS 0x10050
  34. #define VID_C_DOWN_CMDS 0x100A0
  35. #define VID_D_DOWN_CMDS 0x100F0
  36. #define VID_E_DOWN_CMDS 0x10140
  37. #define VID_F_DOWN_CMDS 0x10190
  38. #define VID_G_DOWN_CMDS 0x101E0
  39. #define VID_H_DOWN_CMDS 0x10230
  40. #define VID_A_UP_CMDS 0x10280
  41. #define VID_B_UP_CMDS 0x102D0
  42. #define VID_C_UP_CMDS 0x10320
  43. #define VID_D_UP_CMDS 0x10370
  44. #define VID_E_UP_CMDS 0x103C0
  45. #define VID_F_UP_CMDS 0x10410
  46. #define VID_I_UP_CMDS 0x10460
  47. #define VID_J_UP_CMDS 0x104B0
  48. #define AUD_A_DOWN_CMDS 0x10500
  49. #define AUD_B_DOWN_CMDS 0x10550
  50. #define AUD_C_DOWN_CMDS 0x105A0
  51. #define AUD_D_DOWN_CMDS 0x105F0
  52. #define AUD_A_UP_CMDS 0x10640
  53. #define AUD_B_UP_CMDS 0x10690
  54. #define AUD_C_UP_CMDS 0x106E0
  55. #define AUD_E_UP_CMDS 0x10730
  56. #define MBIF_A_DOWN_CMDS 0x10780
  57. #define MBIF_B_DOWN_CMDS 0x107D0
  58. #define DMA_SCRATCH_PAD 0x10820 /* Scratch pad area from 0x10820 to 0x10B40 */
  59. /* #define RX_SRAM_POOL_START = 0x105B0; */
  60. #define VID_A_IQ 0x11000
  61. #define VID_B_IQ 0x11040
  62. #define VID_C_IQ 0x11080
  63. #define VID_D_IQ 0x110C0
  64. #define VID_E_IQ 0x11100
  65. #define VID_F_IQ 0x11140
  66. #define VID_G_IQ 0x11180
  67. #define VID_H_IQ 0x111C0
  68. #define VID_I_IQ 0x11200
  69. #define VID_J_IQ 0x11240
  70. #define AUD_A_IQ 0x11280
  71. #define AUD_B_IQ 0x112C0
  72. #define AUD_C_IQ 0x11300
  73. #define AUD_D_IQ 0x11340
  74. #define AUD_E_IQ 0x11380
  75. #define MBIF_A_IQ 0x11000
  76. #define MBIF_B_IQ 0x110C0
  77. #define VID_A_CDT 0x10C00
  78. #define VID_B_CDT 0x10C40
  79. #define VID_C_CDT 0x10C80
  80. #define VID_D_CDT 0x10CC0
  81. #define VID_E_CDT 0x10D00
  82. #define VID_F_CDT 0x10D40
  83. #define VID_G_CDT 0x10D80
  84. #define VID_H_CDT 0x10DC0
  85. #define VID_I_CDT 0x10E00
  86. #define VID_J_CDT 0x10E40
  87. #define AUD_A_CDT 0x10E80
  88. #define AUD_B_CDT 0x10EB0
  89. #define AUD_C_CDT 0x10EE0
  90. #define AUD_D_CDT 0x10F10
  91. #define AUD_E_CDT 0x10F40
  92. #define MBIF_A_CDT 0x10C00
  93. #define MBIF_B_CDT 0x10CC0
  94. /* Cluster Buffer for RX */
  95. #define VID_A_UP_CLUSTER_1 0x11400
  96. #define VID_A_UP_CLUSTER_2 0x119A0
  97. #define VID_A_UP_CLUSTER_3 0x11F40
  98. #define VID_A_UP_CLUSTER_4 0x124E0
  99. #define VID_B_UP_CLUSTER_1 0x12A80
  100. #define VID_B_UP_CLUSTER_2 0x13020
  101. #define VID_B_UP_CLUSTER_3 0x135C0
  102. #define VID_B_UP_CLUSTER_4 0x13B60
  103. #define VID_C_UP_CLUSTER_1 0x14100
  104. #define VID_C_UP_CLUSTER_2 0x146A0
  105. #define VID_C_UP_CLUSTER_3 0x14C40
  106. #define VID_C_UP_CLUSTER_4 0x151E0
  107. #define VID_D_UP_CLUSTER_1 0x15780
  108. #define VID_D_UP_CLUSTER_2 0x15D20
  109. #define VID_D_UP_CLUSTER_3 0x162C0
  110. #define VID_D_UP_CLUSTER_4 0x16860
  111. #define VID_E_UP_CLUSTER_1 0x16E00
  112. #define VID_E_UP_CLUSTER_2 0x173A0
  113. #define VID_E_UP_CLUSTER_3 0x17940
  114. #define VID_E_UP_CLUSTER_4 0x17EE0
  115. #define VID_F_UP_CLUSTER_1 0x18480
  116. #define VID_F_UP_CLUSTER_2 0x18A20
  117. #define VID_F_UP_CLUSTER_3 0x18FC0
  118. #define VID_F_UP_CLUSTER_4 0x19560
  119. #define VID_I_UP_CLUSTER_1 0x19B00
  120. #define VID_I_UP_CLUSTER_2 0x1A0A0
  121. #define VID_I_UP_CLUSTER_3 0x1A640
  122. #define VID_I_UP_CLUSTER_4 0x1ABE0
  123. #define VID_J_UP_CLUSTER_1 0x1B180
  124. #define VID_J_UP_CLUSTER_2 0x1B720
  125. #define VID_J_UP_CLUSTER_3 0x1BCC0
  126. #define VID_J_UP_CLUSTER_4 0x1C260
  127. #define AUD_A_UP_CLUSTER_1 0x1C800
  128. #define AUD_A_UP_CLUSTER_2 0x1C880
  129. #define AUD_A_UP_CLUSTER_3 0x1C900
  130. #define AUD_B_UP_CLUSTER_1 0x1C980
  131. #define AUD_B_UP_CLUSTER_2 0x1CA00
  132. #define AUD_B_UP_CLUSTER_3 0x1CA80
  133. #define AUD_C_UP_CLUSTER_1 0x1CB00
  134. #define AUD_C_UP_CLUSTER_2 0x1CB80
  135. #define AUD_C_UP_CLUSTER_3 0x1CC00
  136. #define AUD_E_UP_CLUSTER_1 0x1CC80
  137. #define AUD_E_UP_CLUSTER_2 0x1CD00
  138. #define AUD_E_UP_CLUSTER_3 0x1CD80
  139. #define RX_SRAM_POOL_FREE 0x1CE00
  140. #define RX_SRAM_END 0x1D000
  141. /* Free Receive SRAM 144 Bytes */
  142. /* Transmit SRAM */
  143. #define TX_SRAM_POOL_START 0x00000
  144. #define VID_A_DOWN_CLUSTER_1 0x00040
  145. #define VID_A_DOWN_CLUSTER_2 0x005E0
  146. #define VID_A_DOWN_CLUSTER_3 0x00B80
  147. #define VID_A_DOWN_CLUSTER_4 0x01120
  148. #define VID_B_DOWN_CLUSTER_1 0x016C0
  149. #define VID_B_DOWN_CLUSTER_2 0x01C60
  150. #define VID_B_DOWN_CLUSTER_3 0x02200
  151. #define VID_B_DOWN_CLUSTER_4 0x027A0
  152. #define VID_C_DOWN_CLUSTER_1 0x02D40
  153. #define VID_C_DOWN_CLUSTER_2 0x032E0
  154. #define VID_C_DOWN_CLUSTER_3 0x03880
  155. #define VID_C_DOWN_CLUSTER_4 0x03E20
  156. #define VID_D_DOWN_CLUSTER_1 0x043C0
  157. #define VID_D_DOWN_CLUSTER_2 0x04960
  158. #define VID_D_DOWN_CLUSTER_3 0x04F00
  159. #define VID_D_DOWN_CLUSTER_4 0x054A0
  160. #define VID_E_DOWN_CLUSTER_1 0x05a40
  161. #define VID_E_DOWN_CLUSTER_2 0x05FE0
  162. #define VID_E_DOWN_CLUSTER_3 0x06580
  163. #define VID_E_DOWN_CLUSTER_4 0x06B20
  164. #define VID_F_DOWN_CLUSTER_1 0x070C0
  165. #define VID_F_DOWN_CLUSTER_2 0x07660
  166. #define VID_F_DOWN_CLUSTER_3 0x07C00
  167. #define VID_F_DOWN_CLUSTER_4 0x081A0
  168. #define VID_G_DOWN_CLUSTER_1 0x08740
  169. #define VID_G_DOWN_CLUSTER_2 0x08CE0
  170. #define VID_G_DOWN_CLUSTER_3 0x09280
  171. #define VID_G_DOWN_CLUSTER_4 0x09820
  172. #define VID_H_DOWN_CLUSTER_1 0x09DC0
  173. #define VID_H_DOWN_CLUSTER_2 0x0A360
  174. #define VID_H_DOWN_CLUSTER_3 0x0A900
  175. #define VID_H_DOWN_CLUSTER_4 0x0AEA0
  176. #define AUD_A_DOWN_CLUSTER_1 0x0B500
  177. #define AUD_A_DOWN_CLUSTER_2 0x0B580
  178. #define AUD_A_DOWN_CLUSTER_3 0x0B600
  179. #define AUD_B_DOWN_CLUSTER_1 0x0B680
  180. #define AUD_B_DOWN_CLUSTER_2 0x0B700
  181. #define AUD_B_DOWN_CLUSTER_3 0x0B780
  182. #define AUD_C_DOWN_CLUSTER_1 0x0B800
  183. #define AUD_C_DOWN_CLUSTER_2 0x0B880
  184. #define AUD_C_DOWN_CLUSTER_3 0x0B900
  185. #define AUD_D_DOWN_CLUSTER_1 0x0B980
  186. #define AUD_D_DOWN_CLUSTER_2 0x0BA00
  187. #define AUD_D_DOWN_CLUSTER_3 0x0BA80
  188. #define TX_SRAM_POOL_FREE 0x0BB00
  189. #define TX_SRAM_END 0x0C000
  190. #define BYTES_TO_DWORDS(bcount) ((bcount) >> 2)
  191. #define BYTES_TO_QWORDS(bcount) ((bcount) >> 3)
  192. #define BYTES_TO_OWORDS(bcount) ((bcount) >> 4)
  193. #define VID_IQ_SIZE_DW BYTES_TO_DWORDS(VID_IQ_SIZE)
  194. #define VID_CDT_SIZE_QW BYTES_TO_QWORDS(VID_CDT_SIZE)
  195. #define VID_CLUSTER_SIZE_OW BYTES_TO_OWORDS(VID_CLUSTER_SIZE)
  196. #define AUDIO_IQ_SIZE_DW BYTES_TO_DWORDS(AUDIO_IQ_SIZE)
  197. #define AUDIO_CDT_SIZE_QW BYTES_TO_QWORDS(AUDIO_CDT_SIZE)
  198. #define AUDIO_CLUSTER_SIZE_QW BYTES_TO_QWORDS(AUDIO_CLUSTER_SIZE)
  199. #define MBIF_IQ_SIZE_DW BYTES_TO_DWORDS(MBIF_IQ_SIZE)
  200. #define MBIF_CDT_SIZE_QW BYTES_TO_QWORDS(MBIF_CDT_SIZE)
  201. #define MBIF_CLUSTER_SIZE_OW BYTES_TO_OWORDS(MBIF_CLUSTER_SIZE)
  202. #endif