target_reg_init.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504
  1. /*
  2. * Copyright (c) 2016 The Linux Foundation. All rights reserved.
  3. *
  4. * Permission to use, copy, modify, and/or distribute this software for
  5. * any purpose with or without fee is hereby granted, provided that the
  6. * above copyright notice and this permission notice appear in all
  7. * copies.
  8. *
  9. * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
  10. * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
  11. * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
  12. * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
  13. * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
  14. * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
  15. * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  16. * PERFORMANCE OF THIS SOFTWARE.
  17. */
  18. #ifndef TARGET_REG_INIT_H
  19. #define TARGET_REG_INIT_H
  20. #include "reg_struct.h"
  21. #include "targaddrs.h"
  22. /*** WARNING : Add to the end of the TABLE! do not change the order ****/
  23. typedef struct targetdef_s TARGET_REGISTER_TABLE;
  24. #define ATH_UNSUPPORTED_REG_OFFSET 0xffffffff
  25. #define ATH_SUPPORTED_BY_TARGET(reg_offset) \
  26. ((reg_offset) != ATH_UNSUPPORTED_REG_OFFSET)
  27. #if defined(MY_TARGET_DEF)
  28. /* Cross-platform compatibility */
  29. #if !defined(SOC_RESET_CONTROL_OFFSET) && defined(RESET_CONTROL_OFFSET)
  30. #define SOC_RESET_CONTROL_OFFSET RESET_CONTROL_OFFSET
  31. #endif
  32. #if !defined(CLOCK_GPIO_OFFSET)
  33. #define CLOCK_GPIO_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  34. #define CLOCK_GPIO_BT_CLK_OUT_EN_LSB 0
  35. #define CLOCK_GPIO_BT_CLK_OUT_EN_MASK 0
  36. #endif
  37. #if !defined(WLAN_MAC_BASE_ADDRESS)
  38. #define WLAN_MAC_BASE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  39. #endif
  40. #if !defined(CE0_BASE_ADDRESS)
  41. #define CE0_BASE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  42. #define CE1_BASE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  43. #define CE_COUNT 0
  44. #endif
  45. #if !defined(MSI_NUM_REQUEST)
  46. #define MSI_NUM_REQUEST 0
  47. #define MSI_ASSIGN_FW 0
  48. #define MSI_ASSIGN_CE_INITIAL 0
  49. #endif
  50. #if !defined(FW_INDICATOR_ADDRESS)
  51. #define FW_INDICATOR_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  52. #endif
  53. #if !defined(FW_CPU_PLL_CONFIG)
  54. #define FW_CPU_PLL_CONFIG ATH_UNSUPPORTED_REG_OFFSET
  55. #endif
  56. #if !defined(DRAM_BASE_ADDRESS)
  57. #define DRAM_BASE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  58. #endif
  59. #if !defined(SOC_CORE_BASE_ADDRESS)
  60. #define SOC_CORE_BASE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  61. #endif
  62. #if !defined(CPU_INTR_ADDRESS)
  63. #define CPU_INTR_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  64. #endif
  65. #if !defined(SOC_LF_TIMER_CONTROL0_ADDRESS)
  66. #define SOC_LF_TIMER_CONTROL0_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  67. #define SOC_LF_TIMER_CONTROL0_ENABLE_MASK ATH_UNSUPPORTED_REG_OFFSET
  68. #endif
  69. #if !defined(SOC_RESET_CONTROL_ADDRESS)
  70. #define SOC_RESET_CONTROL_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  71. #define SOC_RESET_CONTROL_CE_RST_MASK ATH_UNSUPPORTED_REG_OFFSET
  72. #define SOC_RESET_CONTROL_CPU_WARM_RST_MASK ATH_UNSUPPORTED_REG_OFFSET
  73. #endif
  74. #if !defined(CORE_CTRL_ADDRESS)
  75. #define CORE_CTRL_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  76. #define CORE_CTRL_CPU_INTR_MASK 0
  77. #endif
  78. #if !defined(PCIE_INTR_ENABLE_ADDRESS)
  79. #define PCIE_INTR_ENABLE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  80. #define PCIE_INTR_CLR_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  81. #define PCIE_INTR_FIRMWARE_MASK ATH_UNSUPPORTED_REG_OFFSET
  82. #define PCIE_INTR_CE_MASK_ALL ATH_UNSUPPORTED_REG_OFFSET
  83. #define PCIE_INTR_CAUSE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  84. #endif
  85. #if !defined(WIFICMN_PCIE_BAR_REG_ADDRESS)
  86. #define WIFICMN_PCIE_BAR_REG_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  87. #endif
  88. #if !defined(WIFICMN_INT_STATUS_ADDRESS)
  89. #define WIFICMN_INT_STATUS_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  90. #endif
  91. #if !defined(FW_AXI_MSI_ADDR)
  92. #define FW_AXI_MSI_ADDR ATH_UNSUPPORTED_REG_OFFSET
  93. #endif
  94. #if !defined(FW_AXI_MSI_DATA)
  95. #define FW_AXI_MSI_DATA ATH_UNSUPPORTED_REG_OFFSET
  96. #endif
  97. #if !defined(WLAN_SUBSYSTEM_CORE_ID_ADDRESS)
  98. #define WLAN_SUBSYSTEM_CORE_ID_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  99. #endif
  100. #if !defined(FPGA_VERSION_ADDRESS)
  101. #define FPGA_VERSION_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  102. #endif
  103. #if !defined(SI_CONFIG_ADDRESS)
  104. #define SI_CONFIG_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  105. #define SI_CONFIG_BIDIR_OD_DATA_LSB 0
  106. #define SI_CONFIG_BIDIR_OD_DATA_MASK 0
  107. #define SI_CONFIG_I2C_LSB 0
  108. #define SI_CONFIG_I2C_MASK 0
  109. #define SI_CONFIG_POS_SAMPLE_LSB 0
  110. #define SI_CONFIG_POS_SAMPLE_MASK 0
  111. #define SI_CONFIG_INACTIVE_CLK_LSB 0
  112. #define SI_CONFIG_INACTIVE_CLK_MASK 0
  113. #define SI_CONFIG_INACTIVE_DATA_LSB 0
  114. #define SI_CONFIG_INACTIVE_DATA_MASK 0
  115. #define SI_CONFIG_DIVIDER_LSB 0
  116. #define SI_CONFIG_DIVIDER_MASK 0
  117. #define SI_CONFIG_OFFSET 0
  118. #define SI_TX_DATA0_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  119. #define SI_TX_DATA1_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  120. #define SI_RX_DATA0_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  121. #define SI_RX_DATA1_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  122. #define SI_CS_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  123. #define SI_CS_DONE_ERR_MASK 0
  124. #define SI_CS_DONE_INT_MASK 0
  125. #define SI_CS_START_LSB 0
  126. #define SI_CS_START_MASK 0
  127. #define SI_CS_RX_CNT_LSB 0
  128. #define SI_CS_RX_CNT_MASK 0
  129. #define SI_CS_TX_CNT_LSB 0
  130. #define SI_CS_TX_CNT_MASK 0
  131. #endif
  132. #ifndef SI_BASE_ADDRESS
  133. #define SI_BASE_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  134. #endif
  135. #ifndef WLAN_GPIO_PIN10_ADDRESS
  136. #define WLAN_GPIO_PIN10_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  137. #endif
  138. #ifndef WLAN_GPIO_PIN11_ADDRESS
  139. #define WLAN_GPIO_PIN11_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  140. #endif
  141. #ifndef WLAN_GPIO_PIN12_ADDRESS
  142. #define WLAN_GPIO_PIN12_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  143. #endif
  144. #ifndef WLAN_GPIO_PIN13_ADDRESS
  145. #define WLAN_GPIO_PIN13_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  146. #endif
  147. #ifndef WIFICMN_INT_STATUS_ADDRESS
  148. #define WIFICMN_INT_STATUS_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  149. #endif
  150. static struct targetdef_s my_target_def = {
  151. .d_RTC_SOC_BASE_ADDRESS = RTC_SOC_BASE_ADDRESS,
  152. .d_RTC_WMAC_BASE_ADDRESS = RTC_WMAC_BASE_ADDRESS,
  153. .d_SYSTEM_SLEEP_OFFSET = WLAN_SYSTEM_SLEEP_OFFSET,
  154. .d_WLAN_SYSTEM_SLEEP_OFFSET = WLAN_SYSTEM_SLEEP_OFFSET,
  155. .d_WLAN_SYSTEM_SLEEP_DISABLE_LSB = WLAN_SYSTEM_SLEEP_DISABLE_LSB,
  156. .d_WLAN_SYSTEM_SLEEP_DISABLE_MASK = WLAN_SYSTEM_SLEEP_DISABLE_MASK,
  157. .d_CLOCK_CONTROL_OFFSET = CLOCK_CONTROL_OFFSET,
  158. .d_CLOCK_CONTROL_SI0_CLK_MASK = CLOCK_CONTROL_SI0_CLK_MASK,
  159. .d_RESET_CONTROL_OFFSET = SOC_RESET_CONTROL_OFFSET,
  160. .d_RESET_CONTROL_SI0_RST_MASK = RESET_CONTROL_SI0_RST_MASK,
  161. .d_WLAN_RESET_CONTROL_OFFSET = WLAN_RESET_CONTROL_OFFSET,
  162. .d_WLAN_RESET_CONTROL_COLD_RST_MASK = WLAN_RESET_CONTROL_COLD_RST_MASK,
  163. .d_WLAN_RESET_CONTROL_WARM_RST_MASK = WLAN_RESET_CONTROL_WARM_RST_MASK,
  164. .d_GPIO_BASE_ADDRESS = GPIO_BASE_ADDRESS,
  165. .d_GPIO_PIN0_OFFSET = GPIO_PIN0_OFFSET,
  166. .d_GPIO_PIN1_OFFSET = GPIO_PIN1_OFFSET,
  167. .d_GPIO_PIN0_CONFIG_MASK = GPIO_PIN0_CONFIG_MASK,
  168. .d_GPIO_PIN1_CONFIG_MASK = GPIO_PIN1_CONFIG_MASK,
  169. .d_SI_CONFIG_BIDIR_OD_DATA_LSB = SI_CONFIG_BIDIR_OD_DATA_LSB,
  170. .d_SI_CONFIG_BIDIR_OD_DATA_MASK = SI_CONFIG_BIDIR_OD_DATA_MASK,
  171. .d_SI_CONFIG_I2C_LSB = SI_CONFIG_I2C_LSB,
  172. .d_SI_CONFIG_I2C_MASK = SI_CONFIG_I2C_MASK,
  173. .d_SI_CONFIG_POS_SAMPLE_LSB = SI_CONFIG_POS_SAMPLE_LSB,
  174. .d_SI_CONFIG_POS_SAMPLE_MASK = SI_CONFIG_POS_SAMPLE_MASK,
  175. .d_SI_CONFIG_INACTIVE_CLK_LSB = SI_CONFIG_INACTIVE_CLK_LSB,
  176. .d_SI_CONFIG_INACTIVE_CLK_MASK = SI_CONFIG_INACTIVE_CLK_MASK,
  177. .d_SI_CONFIG_INACTIVE_DATA_LSB = SI_CONFIG_INACTIVE_DATA_LSB,
  178. .d_SI_CONFIG_INACTIVE_DATA_MASK = SI_CONFIG_INACTIVE_DATA_MASK,
  179. .d_SI_CONFIG_DIVIDER_LSB = SI_CONFIG_DIVIDER_LSB,
  180. .d_SI_CONFIG_DIVIDER_MASK = SI_CONFIG_DIVIDER_MASK,
  181. .d_SI_BASE_ADDRESS = SI_BASE_ADDRESS,
  182. .d_SI_CONFIG_OFFSET = SI_CONFIG_OFFSET,
  183. .d_SI_TX_DATA0_OFFSET = SI_TX_DATA0_OFFSET,
  184. .d_SI_TX_DATA1_OFFSET = SI_TX_DATA1_OFFSET,
  185. .d_SI_RX_DATA0_OFFSET = SI_RX_DATA0_OFFSET,
  186. .d_SI_RX_DATA1_OFFSET = SI_RX_DATA1_OFFSET,
  187. .d_SI_CS_OFFSET = SI_CS_OFFSET,
  188. .d_SI_CS_DONE_ERR_MASK = SI_CS_DONE_ERR_MASK,
  189. .d_SI_CS_DONE_INT_MASK = SI_CS_DONE_INT_MASK,
  190. .d_SI_CS_START_LSB = SI_CS_START_LSB,
  191. .d_SI_CS_START_MASK = SI_CS_START_MASK,
  192. .d_SI_CS_RX_CNT_LSB = SI_CS_RX_CNT_LSB,
  193. .d_SI_CS_RX_CNT_MASK = SI_CS_RX_CNT_MASK,
  194. .d_SI_CS_TX_CNT_LSB = SI_CS_TX_CNT_LSB,
  195. .d_SI_CS_TX_CNT_MASK = SI_CS_TX_CNT_MASK,
  196. .d_BOARD_DATA_SZ = MY_TARGET_BOARD_DATA_SZ,
  197. .d_BOARD_EXT_DATA_SZ = MY_TARGET_BOARD_EXT_DATA_SZ,
  198. .d_MBOX_BASE_ADDRESS = MBOX_BASE_ADDRESS,
  199. .d_LOCAL_SCRATCH_OFFSET = LOCAL_SCRATCH_OFFSET,
  200. .d_CPU_CLOCK_OFFSET = CPU_CLOCK_OFFSET,
  201. .d_GPIO_PIN10_OFFSET = GPIO_PIN10_OFFSET,
  202. .d_GPIO_PIN11_OFFSET = GPIO_PIN11_OFFSET,
  203. .d_GPIO_PIN12_OFFSET = GPIO_PIN12_OFFSET,
  204. .d_GPIO_PIN13_OFFSET = GPIO_PIN13_OFFSET,
  205. .d_CLOCK_GPIO_OFFSET = CLOCK_GPIO_OFFSET,
  206. .d_CPU_CLOCK_STANDARD_LSB = CPU_CLOCK_STANDARD_LSB,
  207. .d_CPU_CLOCK_STANDARD_MASK = CPU_CLOCK_STANDARD_MASK,
  208. .d_LPO_CAL_ENABLE_LSB = LPO_CAL_ENABLE_LSB,
  209. .d_LPO_CAL_ENABLE_MASK = LPO_CAL_ENABLE_MASK,
  210. .d_CLOCK_GPIO_BT_CLK_OUT_EN_LSB = CLOCK_GPIO_BT_CLK_OUT_EN_LSB,
  211. .d_CLOCK_GPIO_BT_CLK_OUT_EN_MASK = CLOCK_GPIO_BT_CLK_OUT_EN_MASK,
  212. .d_ANALOG_INTF_BASE_ADDRESS = ANALOG_INTF_BASE_ADDRESS,
  213. .d_WLAN_MAC_BASE_ADDRESS = WLAN_MAC_BASE_ADDRESS,
  214. .d_CE0_BASE_ADDRESS = CE0_BASE_ADDRESS,
  215. .d_CE1_BASE_ADDRESS = CE1_BASE_ADDRESS,
  216. .d_FW_INDICATOR_ADDRESS = FW_INDICATOR_ADDRESS,
  217. .d_FW_CPU_PLL_CONFIG = FW_CPU_PLL_CONFIG,
  218. .d_DRAM_BASE_ADDRESS = DRAM_BASE_ADDRESS,
  219. .d_SOC_CORE_BASE_ADDRESS = SOC_CORE_BASE_ADDRESS,
  220. .d_CORE_CTRL_ADDRESS = CORE_CTRL_ADDRESS,
  221. .d_CE_COUNT = CE_COUNT,
  222. .d_MSI_NUM_REQUEST = MSI_NUM_REQUEST,
  223. .d_MSI_ASSIGN_FW = MSI_ASSIGN_FW,
  224. .d_MSI_ASSIGN_CE_INITIAL = MSI_ASSIGN_CE_INITIAL,
  225. .d_PCIE_INTR_ENABLE_ADDRESS = PCIE_INTR_ENABLE_ADDRESS,
  226. .d_PCIE_INTR_CLR_ADDRESS = PCIE_INTR_CLR_ADDRESS,
  227. .d_PCIE_INTR_FIRMWARE_MASK = PCIE_INTR_FIRMWARE_MASK,
  228. .d_PCIE_INTR_CE_MASK_ALL = PCIE_INTR_CE_MASK_ALL,
  229. .d_CORE_CTRL_CPU_INTR_MASK = CORE_CTRL_CPU_INTR_MASK,
  230. .d_WIFICMN_PCIE_BAR_REG_ADDRESS = WIFICMN_PCIE_BAR_REG_ADDRESS,
  231. /* htt_rx.c */
  232. /* htt tx */
  233. .d_MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK
  234. = MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK,
  235. .d_MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK
  236. = MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK,
  237. .d_MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK
  238. = MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK,
  239. .d_MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK
  240. = MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK,
  241. .d_MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB
  242. = MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB,
  243. .d_MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB
  244. = MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB,
  245. .d_MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB
  246. = MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB,
  247. .d_MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB
  248. = MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB,
  249. /* copy_engine.c */
  250. .d_DST_WR_INDEX_ADDRESS = DST_WR_INDEX_ADDRESS,
  251. .d_SRC_WATERMARK_ADDRESS = SRC_WATERMARK_ADDRESS,
  252. .d_SRC_WATERMARK_LOW_MASK = SRC_WATERMARK_LOW_MASK,
  253. .d_SRC_WATERMARK_HIGH_MASK = SRC_WATERMARK_HIGH_MASK,
  254. .d_DST_WATERMARK_LOW_MASK = DST_WATERMARK_LOW_MASK,
  255. .d_DST_WATERMARK_HIGH_MASK = DST_WATERMARK_HIGH_MASK,
  256. .d_CURRENT_SRRI_ADDRESS = CURRENT_SRRI_ADDRESS,
  257. .d_CURRENT_DRRI_ADDRESS = CURRENT_DRRI_ADDRESS,
  258. .d_HOST_IS_SRC_RING_HIGH_WATERMARK_MASK
  259. = HOST_IS_SRC_RING_HIGH_WATERMARK_MASK,
  260. .d_HOST_IS_SRC_RING_LOW_WATERMARK_MASK
  261. = HOST_IS_SRC_RING_LOW_WATERMARK_MASK,
  262. .d_HOST_IS_DST_RING_HIGH_WATERMARK_MASK
  263. = HOST_IS_DST_RING_HIGH_WATERMARK_MASK,
  264. .d_HOST_IS_DST_RING_LOW_WATERMARK_MASK
  265. = HOST_IS_DST_RING_LOW_WATERMARK_MASK,
  266. .d_HOST_IS_ADDRESS = HOST_IS_ADDRESS,
  267. .d_HOST_IS_COPY_COMPLETE_MASK = HOST_IS_COPY_COMPLETE_MASK,
  268. .d_CE_CMD_ADDRESS = CE_CMD_ADDRESS,
  269. .d_CE_CMD_HALT_MASK = CE_CMD_HALT_MASK,
  270. .d_CE_WRAPPER_BASE_ADDRESS = CE_WRAPPER_BASE_ADDRESS,
  271. .d_CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS
  272. = CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS,
  273. .d_HOST_IE_ADDRESS = HOST_IE_ADDRESS,
  274. .d_HOST_IE_COPY_COMPLETE_MASK = HOST_IE_COPY_COMPLETE_MASK,
  275. .d_SR_BA_ADDRESS = SR_BA_ADDRESS,
  276. .d_SR_SIZE_ADDRESS = SR_SIZE_ADDRESS,
  277. .d_CE_CTRL1_ADDRESS = CE_CTRL1_ADDRESS,
  278. .d_CE_CTRL1_DMAX_LENGTH_MASK = CE_CTRL1_DMAX_LENGTH_MASK,
  279. .d_DR_BA_ADDRESS = DR_BA_ADDRESS,
  280. .d_DR_SIZE_ADDRESS = DR_SIZE_ADDRESS,
  281. .d_MISC_IE_ADDRESS = MISC_IE_ADDRESS,
  282. .d_MISC_IS_AXI_ERR_MASK = MISC_IS_AXI_ERR_MASK,
  283. .d_MISC_IS_DST_ADDR_ERR_MASK = MISC_IS_DST_ADDR_ERR_MASK,
  284. .d_MISC_IS_SRC_LEN_ERR_MASK = MISC_IS_SRC_LEN_ERR_MASK,
  285. .d_MISC_IS_DST_MAX_LEN_VIO_MASK = MISC_IS_DST_MAX_LEN_VIO_MASK,
  286. .d_MISC_IS_DST_RING_OVERFLOW_MASK = MISC_IS_DST_RING_OVERFLOW_MASK,
  287. .d_MISC_IS_SRC_RING_OVERFLOW_MASK = MISC_IS_SRC_RING_OVERFLOW_MASK,
  288. .d_SRC_WATERMARK_LOW_LSB = SRC_WATERMARK_LOW_LSB,
  289. .d_SRC_WATERMARK_HIGH_LSB = SRC_WATERMARK_HIGH_LSB,
  290. .d_DST_WATERMARK_LOW_LSB = DST_WATERMARK_LOW_LSB,
  291. .d_DST_WATERMARK_HIGH_LSB = DST_WATERMARK_HIGH_LSB,
  292. .d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK
  293. = CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK,
  294. .d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB
  295. = CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB,
  296. .d_CE_CTRL1_DMAX_LENGTH_LSB = CE_CTRL1_DMAX_LENGTH_LSB,
  297. .d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK
  298. = CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK,
  299. .d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK
  300. = CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK,
  301. .d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB
  302. = CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB,
  303. .d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB
  304. = CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB,
  305. .d_CE_CMD_HALT_STATUS_MASK = CE_CMD_HALT_STATUS_MASK,
  306. .d_CE_CMD_HALT_STATUS_LSB = CE_CMD_HALT_STATUS_LSB,
  307. .d_SR_WR_INDEX_ADDRESS = SR_WR_INDEX_ADDRESS,
  308. .d_DST_WATERMARK_ADDRESS = DST_WATERMARK_ADDRESS,
  309. .d_PCIE_INTR_CAUSE_ADDRESS = PCIE_INTR_CAUSE_ADDRESS,
  310. .d_SOC_RESET_CONTROL_ADDRESS = SOC_RESET_CONTROL_ADDRESS,
  311. .d_SOC_RESET_CONTROL_CE_RST_MASK = SOC_RESET_CONTROL_CE_RST_MASK,
  312. .d_SOC_RESET_CONTROL_CPU_WARM_RST_MASK
  313. = SOC_RESET_CONTROL_CPU_WARM_RST_MASK,
  314. .d_CPU_INTR_ADDRESS = CPU_INTR_ADDRESS,
  315. .d_SOC_LF_TIMER_CONTROL0_ADDRESS = SOC_LF_TIMER_CONTROL0_ADDRESS,
  316. .d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK
  317. = SOC_LF_TIMER_CONTROL0_ENABLE_MASK,
  318. .d_SI_CONFIG_ERR_INT_MASK = SI_CONFIG_ERR_INT_MASK,
  319. .d_SI_CONFIG_ERR_INT_LSB = SI_CONFIG_ERR_INT_LSB,
  320. .d_GPIO_ENABLE_W1TS_LOW_ADDRESS = GPIO_ENABLE_W1TS_LOW_ADDRESS,
  321. .d_GPIO_PIN0_CONFIG_LSB = GPIO_PIN0_CONFIG_LSB,
  322. .d_GPIO_PIN0_PAD_PULL_LSB = GPIO_PIN0_PAD_PULL_LSB,
  323. .d_GPIO_PIN0_PAD_PULL_MASK = GPIO_PIN0_PAD_PULL_MASK,
  324. .d_SOC_CHIP_ID_ADDRESS = SOC_CHIP_ID_ADDRESS,
  325. .d_SOC_CHIP_ID_REVISION_MASK = SOC_CHIP_ID_REVISION_MASK,
  326. .d_SOC_CHIP_ID_REVISION_LSB = SOC_CHIP_ID_REVISION_LSB,
  327. .d_SOC_CHIP_ID_REVISION_MSB = SOC_CHIP_ID_REVISION_MSB,
  328. .d_WIFICMN_PCIE_BAR_REG_ADDRESS = WIFICMN_PCIE_BAR_REG_ADDRESS,
  329. .d_FW_AXI_MSI_ADDR = FW_AXI_MSI_ADDR,
  330. .d_FW_AXI_MSI_DATA = FW_AXI_MSI_DATA,
  331. .d_WLAN_SUBSYSTEM_CORE_ID_ADDRESS = WLAN_SUBSYSTEM_CORE_ID_ADDRESS,
  332. .d_FPGA_VERSION_ADDRESS = FPGA_VERSION_ADDRESS,
  333. .d_WIFICMN_INT_STATUS_ADDRESS = WIFICMN_INT_STATUS_ADDRESS,
  334. };
  335. struct targetdef_s *MY_TARGET_DEF = &my_target_def;
  336. #else
  337. #endif
  338. #if defined(MY_CEREG_DEF)
  339. #if !defined(CE_DDR_ADDRESS_FOR_RRI_LOW)
  340. #define CE_DDR_ADDRESS_FOR_RRI_LOW ATH_UNSUPPORTED_REG_OFFSET
  341. #endif
  342. #if !defined(CE_DDR_ADDRESS_FOR_RRI_HIGH)
  343. #define CE_DDR_ADDRESS_FOR_RRI_HIGH ATH_UNSUPPORTED_REG_OFFSET
  344. #endif
  345. #if !defined(SR_BA_ADDRESS_HIGH)
  346. #define SR_BA_ADDRESS_HIGH ATH_UNSUPPORTED_REG_OFFSET
  347. #endif
  348. #if !defined(DR_BA_ADDRESS_HIGH)
  349. #define DR_BA_ADDRESS_HIGH ATH_UNSUPPORTED_REG_OFFSET
  350. #endif
  351. #if !defined(CE_CMD_REGISTER)
  352. #define CE_CMD_REGISTER ATH_UNSUPPORTED_REG_OFFSET
  353. #endif
  354. #if !defined(CE_MSI_ADDRESS)
  355. #define CE_MSI_ADDRESS ATH_UNSUPPORTED_REG_OFFSET
  356. #endif
  357. #if !defined(CE_MSI_ADDRESS_HIGH)
  358. #define CE_MSI_ADDRESS_HIGH ATH_UNSUPPORTED_REG_OFFSET
  359. #endif
  360. #if !defined(CE_MSI_DATA)
  361. #define CE_MSI_DATA ATH_UNSUPPORTED_REG_OFFSET
  362. #endif
  363. #if !defined(CE_MSI_ENABLE_BIT)
  364. #define CE_MSI_ENABLE_BIT ATH_UNSUPPORTED_REG_OFFSET
  365. #endif
  366. #if !defined(CE_CTRL1_IDX_UPD_EN_MASK)
  367. #define CE_CTRL1_IDX_UPD_EN_MASK ATH_UNSUPPORTED_REG_OFFSET
  368. #endif
  369. #if !defined(CE_WRAPPER_DEBUG_OFFSET)
  370. #define CE_WRAPPER_DEBUG_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  371. #endif
  372. #if !defined(CE_DEBUG_OFFSET)
  373. #define CE_DEBUG_OFFSET ATH_UNSUPPORTED_REG_OFFSET
  374. #endif
  375. #if !defined(A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_ENABLES)
  376. #define A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_ENABLES ATH_UNSUPPORTED_REG_OFFSET
  377. #endif
  378. #if !defined(A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_STATUS)
  379. #define A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_STATUS ATH_UNSUPPORTED_REG_OFFSET
  380. #endif
  381. static struct ce_reg_def my_ce_reg_def = {
  382. /* copy_engine.c */
  383. .d_DST_WR_INDEX_ADDRESS = DST_WR_INDEX_ADDRESS,
  384. .d_SRC_WATERMARK_ADDRESS = SRC_WATERMARK_ADDRESS,
  385. .d_SRC_WATERMARK_LOW_MASK = SRC_WATERMARK_LOW_MASK,
  386. .d_SRC_WATERMARK_HIGH_MASK = SRC_WATERMARK_HIGH_MASK,
  387. .d_DST_WATERMARK_LOW_MASK = DST_WATERMARK_LOW_MASK,
  388. .d_DST_WATERMARK_HIGH_MASK = DST_WATERMARK_HIGH_MASK,
  389. .d_CURRENT_SRRI_ADDRESS = CURRENT_SRRI_ADDRESS,
  390. .d_CURRENT_DRRI_ADDRESS = CURRENT_DRRI_ADDRESS,
  391. .d_HOST_IS_SRC_RING_HIGH_WATERMARK_MASK
  392. = HOST_IS_SRC_RING_HIGH_WATERMARK_MASK,
  393. .d_HOST_IS_SRC_RING_LOW_WATERMARK_MASK
  394. = HOST_IS_SRC_RING_LOW_WATERMARK_MASK,
  395. .d_HOST_IS_DST_RING_HIGH_WATERMARK_MASK
  396. = HOST_IS_DST_RING_HIGH_WATERMARK_MASK,
  397. .d_HOST_IS_DST_RING_LOW_WATERMARK_MASK
  398. = HOST_IS_DST_RING_LOW_WATERMARK_MASK,
  399. .d_HOST_IS_ADDRESS = HOST_IS_ADDRESS,
  400. .d_MISC_IS_ADDRESS = MISC_IS_ADDRESS,
  401. .d_HOST_IS_COPY_COMPLETE_MASK = HOST_IS_COPY_COMPLETE_MASK,
  402. .d_CE_WRAPPER_BASE_ADDRESS = CE_WRAPPER_BASE_ADDRESS,
  403. .d_CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS
  404. = CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS,
  405. .d_CE_DDR_ADDRESS_FOR_RRI_LOW = CE_DDR_ADDRESS_FOR_RRI_LOW,
  406. .d_CE_DDR_ADDRESS_FOR_RRI_HIGH = CE_DDR_ADDRESS_FOR_RRI_HIGH,
  407. .d_HOST_IE_ADDRESS = HOST_IE_ADDRESS,
  408. .d_HOST_IE_COPY_COMPLETE_MASK = HOST_IE_COPY_COMPLETE_MASK,
  409. .d_SR_BA_ADDRESS = SR_BA_ADDRESS,
  410. .d_SR_BA_ADDRESS_HIGH = SR_BA_ADDRESS_HIGH,
  411. .d_SR_SIZE_ADDRESS = SR_SIZE_ADDRESS,
  412. .d_CE_CTRL1_ADDRESS = CE_CTRL1_ADDRESS,
  413. .d_CE_CTRL1_DMAX_LENGTH_MASK = CE_CTRL1_DMAX_LENGTH_MASK,
  414. .d_DR_BA_ADDRESS = DR_BA_ADDRESS,
  415. .d_DR_BA_ADDRESS_HIGH = DR_BA_ADDRESS_HIGH,
  416. .d_DR_SIZE_ADDRESS = DR_SIZE_ADDRESS,
  417. .d_CE_CMD_REGISTER = CE_CMD_REGISTER,
  418. .d_CE_MSI_ADDRESS = CE_MSI_ADDRESS,
  419. .d_CE_MSI_ADDRESS_HIGH = CE_MSI_ADDRESS_HIGH,
  420. .d_CE_MSI_DATA = CE_MSI_DATA,
  421. .d_CE_MSI_ENABLE_BIT = CE_MSI_ENABLE_BIT,
  422. .d_MISC_IE_ADDRESS = MISC_IE_ADDRESS,
  423. .d_MISC_IS_AXI_ERR_MASK = MISC_IS_AXI_ERR_MASK,
  424. .d_MISC_IS_DST_ADDR_ERR_MASK = MISC_IS_DST_ADDR_ERR_MASK,
  425. .d_MISC_IS_SRC_LEN_ERR_MASK = MISC_IS_SRC_LEN_ERR_MASK,
  426. .d_MISC_IS_DST_MAX_LEN_VIO_MASK = MISC_IS_DST_MAX_LEN_VIO_MASK,
  427. .d_MISC_IS_DST_RING_OVERFLOW_MASK = MISC_IS_DST_RING_OVERFLOW_MASK,
  428. .d_MISC_IS_SRC_RING_OVERFLOW_MASK = MISC_IS_SRC_RING_OVERFLOW_MASK,
  429. .d_SRC_WATERMARK_LOW_LSB = SRC_WATERMARK_LOW_LSB,
  430. .d_SRC_WATERMARK_HIGH_LSB = SRC_WATERMARK_HIGH_LSB,
  431. .d_DST_WATERMARK_LOW_LSB = DST_WATERMARK_LOW_LSB,
  432. .d_DST_WATERMARK_HIGH_LSB = DST_WATERMARK_HIGH_LSB,
  433. .d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK
  434. = CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK,
  435. .d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB
  436. = CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB,
  437. .d_CE_CTRL1_DMAX_LENGTH_LSB = CE_CTRL1_DMAX_LENGTH_LSB,
  438. .d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK
  439. = CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK,
  440. .d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK
  441. = CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK,
  442. .d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB
  443. = CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB,
  444. .d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB
  445. = CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB,
  446. .d_CE_CTRL1_IDX_UPD_EN_MASK = CE_CTRL1_IDX_UPD_EN_MASK,
  447. .d_CE_WRAPPER_DEBUG_OFFSET = CE_WRAPPER_DEBUG_OFFSET,
  448. .d_CE_WRAPPER_DEBUG_SEL_MSB = CE_WRAPPER_DEBUG_SEL_MSB,
  449. .d_CE_WRAPPER_DEBUG_SEL_LSB = CE_WRAPPER_DEBUG_SEL_LSB,
  450. .d_CE_WRAPPER_DEBUG_SEL_MASK = CE_WRAPPER_DEBUG_SEL_MASK,
  451. .d_CE_DEBUG_OFFSET = CE_DEBUG_OFFSET,
  452. .d_CE_DEBUG_SEL_MSB = CE_DEBUG_SEL_MSB,
  453. .d_CE_DEBUG_SEL_LSB = CE_DEBUG_SEL_LSB,
  454. .d_CE_DEBUG_SEL_MASK = CE_DEBUG_SEL_MASK,
  455. .d_CE0_BASE_ADDRESS = CE0_BASE_ADDRESS,
  456. .d_CE1_BASE_ADDRESS = CE1_BASE_ADDRESS,
  457. .d_A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_ENABLES
  458. = A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_ENABLES,
  459. .d_A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_STATUS
  460. = A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_STATUS
  461. };
  462. struct ce_reg_def *MY_CEREG_DEF = &my_ce_reg_def;
  463. #else
  464. #endif
  465. #endif