reg_struct.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665
  1. /*
  2. * Copyright (c) 2015-2018 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 REG_STRUCT_H
  19. #define REG_STRUCT_H
  20. #define MISSING_REGISTER 0
  21. #define UNSUPPORTED_REGISTER_OFFSET 0xffffffff
  22. /**
  23. * is_register_supported() - return true if the register offset is valid
  24. * @reg: register address being checked
  25. *
  26. * Return: true if the register offset is valid
  27. */
  28. static inline bool is_register_supported(uint32_t reg)
  29. {
  30. return (reg != MISSING_REGISTER) &&
  31. (reg != UNSUPPORTED_REGISTER_OFFSET);
  32. }
  33. struct targetdef_s {
  34. uint32_t d_RTC_SOC_BASE_ADDRESS;
  35. uint32_t d_RTC_WMAC_BASE_ADDRESS;
  36. uint32_t d_SYSTEM_SLEEP_OFFSET;
  37. uint32_t d_WLAN_SYSTEM_SLEEP_OFFSET;
  38. uint32_t d_WLAN_SYSTEM_SLEEP_DISABLE_LSB;
  39. uint32_t d_WLAN_SYSTEM_SLEEP_DISABLE_MASK;
  40. uint32_t d_CLOCK_CONTROL_OFFSET;
  41. uint32_t d_CLOCK_CONTROL_SI0_CLK_MASK;
  42. uint32_t d_RESET_CONTROL_OFFSET;
  43. uint32_t d_RESET_CONTROL_MBOX_RST_MASK;
  44. uint32_t d_RESET_CONTROL_SI0_RST_MASK;
  45. uint32_t d_WLAN_RESET_CONTROL_OFFSET;
  46. uint32_t d_WLAN_RESET_CONTROL_COLD_RST_MASK;
  47. uint32_t d_WLAN_RESET_CONTROL_WARM_RST_MASK;
  48. uint32_t d_GPIO_BASE_ADDRESS;
  49. uint32_t d_GPIO_PIN0_OFFSET;
  50. uint32_t d_GPIO_PIN1_OFFSET;
  51. uint32_t d_GPIO_PIN0_CONFIG_MASK;
  52. uint32_t d_GPIO_PIN1_CONFIG_MASK;
  53. uint32_t d_SI_CONFIG_BIDIR_OD_DATA_LSB;
  54. uint32_t d_SI_CONFIG_BIDIR_OD_DATA_MASK;
  55. uint32_t d_SI_CONFIG_I2C_LSB;
  56. uint32_t d_SI_CONFIG_I2C_MASK;
  57. uint32_t d_SI_CONFIG_POS_SAMPLE_LSB;
  58. uint32_t d_SI_CONFIG_POS_SAMPLE_MASK;
  59. uint32_t d_SI_CONFIG_INACTIVE_CLK_LSB;
  60. uint32_t d_SI_CONFIG_INACTIVE_CLK_MASK;
  61. uint32_t d_SI_CONFIG_INACTIVE_DATA_LSB;
  62. uint32_t d_SI_CONFIG_INACTIVE_DATA_MASK;
  63. uint32_t d_SI_CONFIG_DIVIDER_LSB;
  64. uint32_t d_SI_CONFIG_DIVIDER_MASK;
  65. uint32_t d_SI_BASE_ADDRESS;
  66. uint32_t d_SI_CONFIG_OFFSET;
  67. uint32_t d_SI_TX_DATA0_OFFSET;
  68. uint32_t d_SI_TX_DATA1_OFFSET;
  69. uint32_t d_SI_RX_DATA0_OFFSET;
  70. uint32_t d_SI_RX_DATA1_OFFSET;
  71. uint32_t d_SI_CS_OFFSET;
  72. uint32_t d_SI_CS_DONE_ERR_MASK;
  73. uint32_t d_SI_CS_DONE_INT_MASK;
  74. uint32_t d_SI_CS_START_LSB;
  75. uint32_t d_SI_CS_START_MASK;
  76. uint32_t d_SI_CS_RX_CNT_LSB;
  77. uint32_t d_SI_CS_RX_CNT_MASK;
  78. uint32_t d_SI_CS_TX_CNT_LSB;
  79. uint32_t d_SI_CS_TX_CNT_MASK;
  80. uint32_t d_BOARD_DATA_SZ;
  81. uint32_t d_BOARD_EXT_DATA_SZ;
  82. uint32_t d_MBOX_BASE_ADDRESS;
  83. uint32_t d_LOCAL_SCRATCH_OFFSET;
  84. uint32_t d_CPU_CLOCK_OFFSET;
  85. uint32_t d_LPO_CAL_OFFSET;
  86. uint32_t d_GPIO_PIN10_OFFSET;
  87. uint32_t d_GPIO_PIN11_OFFSET;
  88. uint32_t d_GPIO_PIN12_OFFSET;
  89. uint32_t d_GPIO_PIN13_OFFSET;
  90. uint32_t d_CLOCK_GPIO_OFFSET;
  91. uint32_t d_CPU_CLOCK_STANDARD_LSB;
  92. uint32_t d_CPU_CLOCK_STANDARD_MASK;
  93. uint32_t d_LPO_CAL_ENABLE_LSB;
  94. uint32_t d_LPO_CAL_ENABLE_MASK;
  95. uint32_t d_CLOCK_GPIO_BT_CLK_OUT_EN_LSB;
  96. uint32_t d_CLOCK_GPIO_BT_CLK_OUT_EN_MASK;
  97. uint32_t d_ANALOG_INTF_BASE_ADDRESS;
  98. uint32_t d_WLAN_MAC_BASE_ADDRESS;
  99. uint32_t d_FW_INDICATOR_ADDRESS;
  100. uint32_t d_FW_CPU_PLL_CONFIG;
  101. uint32_t d_DRAM_BASE_ADDRESS;
  102. uint32_t d_SOC_CORE_BASE_ADDRESS;
  103. uint32_t d_CORE_CTRL_ADDRESS;
  104. uint32_t d_CE_COUNT;
  105. uint32_t d_MSI_NUM_REQUEST;
  106. uint32_t d_MSI_ASSIGN_FW;
  107. uint32_t d_MSI_ASSIGN_CE_INITIAL;
  108. uint32_t d_PCIE_INTR_ENABLE_ADDRESS;
  109. uint32_t d_PCIE_INTR_CLR_ADDRESS;
  110. uint32_t d_PCIE_INTR_FIRMWARE_MASK;
  111. uint32_t d_PCIE_INTR_CE_MASK_ALL;
  112. uint32_t d_CORE_CTRL_CPU_INTR_MASK;
  113. uint32_t d_WIFICMN_PCIE_BAR_REG_ADDRESS;
  114. /* htt_rx.c */
  115. /* htt tx */
  116. uint32_t d_MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_MASK;
  117. uint32_t d_MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_MASK;
  118. uint32_t d_MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_MASK;
  119. uint32_t d_MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_MASK;
  120. uint32_t d_MSDU_LINK_EXT_3_TCP_OVER_IPV4_CHECKSUM_EN_LSB;
  121. uint32_t d_MSDU_LINK_EXT_3_TCP_OVER_IPV6_CHECKSUM_EN_LSB;
  122. uint32_t d_MSDU_LINK_EXT_3_UDP_OVER_IPV4_CHECKSUM_EN_LSB;
  123. uint32_t d_MSDU_LINK_EXT_3_UDP_OVER_IPV6_CHECKSUM_EN_LSB;
  124. /* copy_engine.c */
  125. uint32_t d_SR_WR_INDEX_ADDRESS;
  126. uint32_t d_DST_WATERMARK_ADDRESS;
  127. /* htt_rx.c */
  128. uint32_t d_RX_MSDU_END_4_FIRST_MSDU_MASK;
  129. uint32_t d_RX_MSDU_END_4_FIRST_MSDU_LSB;
  130. uint32_t d_RX_MPDU_START_0_RETRY_LSB;
  131. uint32_t d_RX_MPDU_START_0_RETRY_MASK;
  132. uint32_t d_RX_MPDU_START_0_SEQ_NUM_MASK;
  133. uint32_t d_RX_MPDU_START_0_SEQ_NUM_LSB;
  134. uint32_t d_RX_MPDU_START_2_PN_47_32_LSB;
  135. uint32_t d_RX_MPDU_START_2_PN_47_32_MASK;
  136. uint32_t d_RX_MPDU_START_2_TID_LSB;
  137. uint32_t d_RX_MPDU_START_2_TID_MASK;
  138. uint32_t d_RX_MSDU_END_1_EXT_WAPI_PN_63_48_MASK;
  139. uint32_t d_RX_MSDU_END_1_EXT_WAPI_PN_63_48_LSB;
  140. uint32_t d_RX_MSDU_END_1_KEY_ID_OCT_MASK;
  141. uint32_t d_RX_MSDU_END_1_KEY_ID_OCT_LSB;
  142. uint32_t d_RX_MSDU_END_4_LAST_MSDU_MASK;
  143. uint32_t d_RX_MSDU_END_4_LAST_MSDU_LSB;
  144. uint32_t d_RX_ATTENTION_0_MCAST_BCAST_MASK;
  145. uint32_t d_RX_ATTENTION_0_MCAST_BCAST_LSB;
  146. uint32_t d_RX_ATTENTION_0_FRAGMENT_MASK;
  147. uint32_t d_RX_ATTENTION_0_FRAGMENT_LSB;
  148. uint32_t d_RX_ATTENTION_0_MPDU_LENGTH_ERR_MASK;
  149. uint32_t d_RX_FRAG_INFO_0_RING2_MORE_COUNT_MASK;
  150. uint32_t d_RX_FRAG_INFO_0_RING2_MORE_COUNT_LSB;
  151. uint32_t d_RX_MSDU_START_0_MSDU_LENGTH_MASK;
  152. uint32_t d_RX_MSDU_START_0_MSDU_LENGTH_LSB;
  153. uint32_t d_RX_MSDU_START_2_DECAP_FORMAT_OFFSET;
  154. uint32_t d_RX_MSDU_START_2_DECAP_FORMAT_MASK;
  155. uint32_t d_RX_MSDU_START_2_DECAP_FORMAT_LSB;
  156. uint32_t d_RX_MPDU_START_0_ENCRYPTED_MASK;
  157. uint32_t d_RX_MPDU_START_0_ENCRYPTED_LSB;
  158. uint32_t d_RX_ATTENTION_0_MORE_DATA_MASK;
  159. uint32_t d_RX_ATTENTION_0_MSDU_DONE_MASK;
  160. uint32_t d_RX_ATTENTION_0_TCP_UDP_CHKSUM_FAIL_MASK;
  161. /* end */
  162. /* PLL start */
  163. uint32_t d_EFUSE_OFFSET;
  164. uint32_t d_EFUSE_XTAL_SEL_MSB;
  165. uint32_t d_EFUSE_XTAL_SEL_LSB;
  166. uint32_t d_EFUSE_XTAL_SEL_MASK;
  167. uint32_t d_BB_PLL_CONFIG_OFFSET;
  168. uint32_t d_BB_PLL_CONFIG_OUTDIV_MSB;
  169. uint32_t d_BB_PLL_CONFIG_OUTDIV_LSB;
  170. uint32_t d_BB_PLL_CONFIG_OUTDIV_MASK;
  171. uint32_t d_BB_PLL_CONFIG_FRAC_MSB;
  172. uint32_t d_BB_PLL_CONFIG_FRAC_LSB;
  173. uint32_t d_BB_PLL_CONFIG_FRAC_MASK;
  174. uint32_t d_WLAN_PLL_SETTLE_TIME_MSB;
  175. uint32_t d_WLAN_PLL_SETTLE_TIME_LSB;
  176. uint32_t d_WLAN_PLL_SETTLE_TIME_MASK;
  177. uint32_t d_WLAN_PLL_SETTLE_OFFSET;
  178. uint32_t d_WLAN_PLL_SETTLE_SW_MASK;
  179. uint32_t d_WLAN_PLL_SETTLE_RSTMASK;
  180. uint32_t d_WLAN_PLL_SETTLE_RESET;
  181. uint32_t d_WLAN_PLL_CONTROL_NOPWD_MSB;
  182. uint32_t d_WLAN_PLL_CONTROL_NOPWD_LSB;
  183. uint32_t d_WLAN_PLL_CONTROL_NOPWD_MASK;
  184. uint32_t d_WLAN_PLL_CONTROL_BYPASS_MSB;
  185. uint32_t d_WLAN_PLL_CONTROL_BYPASS_LSB;
  186. uint32_t d_WLAN_PLL_CONTROL_BYPASS_MASK;
  187. uint32_t d_WLAN_PLL_CONTROL_BYPASS_RESET;
  188. uint32_t d_WLAN_PLL_CONTROL_CLK_SEL_MSB;
  189. uint32_t d_WLAN_PLL_CONTROL_CLK_SEL_LSB;
  190. uint32_t d_WLAN_PLL_CONTROL_CLK_SEL_MASK;
  191. uint32_t d_WLAN_PLL_CONTROL_CLK_SEL_RESET;
  192. uint32_t d_WLAN_PLL_CONTROL_REFDIV_MSB;
  193. uint32_t d_WLAN_PLL_CONTROL_REFDIV_LSB;
  194. uint32_t d_WLAN_PLL_CONTROL_REFDIV_MASK;
  195. uint32_t d_WLAN_PLL_CONTROL_REFDIV_RESET;
  196. uint32_t d_WLAN_PLL_CONTROL_DIV_MSB;
  197. uint32_t d_WLAN_PLL_CONTROL_DIV_LSB;
  198. uint32_t d_WLAN_PLL_CONTROL_DIV_MASK;
  199. uint32_t d_WLAN_PLL_CONTROL_DIV_RESET;
  200. uint32_t d_WLAN_PLL_CONTROL_OFFSET;
  201. uint32_t d_WLAN_PLL_CONTROL_SW_MASK;
  202. uint32_t d_WLAN_PLL_CONTROL_RSTMASK;
  203. uint32_t d_WLAN_PLL_CONTROL_RESET;
  204. uint32_t d_SOC_CORE_CLK_CTRL_OFFSET;
  205. uint32_t d_SOC_CORE_CLK_CTRL_DIV_MSB;
  206. uint32_t d_SOC_CORE_CLK_CTRL_DIV_LSB;
  207. uint32_t d_SOC_CORE_CLK_CTRL_DIV_MASK;
  208. uint32_t d_RTC_SYNC_STATUS_PLL_CHANGING_MSB;
  209. uint32_t d_RTC_SYNC_STATUS_PLL_CHANGING_LSB;
  210. uint32_t d_RTC_SYNC_STATUS_PLL_CHANGING_MASK;
  211. uint32_t d_RTC_SYNC_STATUS_PLL_CHANGING_RESET;
  212. uint32_t d_RTC_SYNC_STATUS_OFFSET;
  213. uint32_t d_SOC_CPU_CLOCK_OFFSET;
  214. uint32_t d_SOC_CPU_CLOCK_STANDARD_MSB;
  215. uint32_t d_SOC_CPU_CLOCK_STANDARD_LSB;
  216. uint32_t d_SOC_CPU_CLOCK_STANDARD_MASK;
  217. /* PLL end */
  218. uint32_t d_SOC_POWER_REG_OFFSET;
  219. uint32_t d_PCIE_INTR_CAUSE_ADDRESS;
  220. uint32_t d_SOC_RESET_CONTROL_ADDRESS;
  221. uint32_t d_SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_MASK;
  222. uint32_t d_SOC_RESET_CONTROL_PCIE_RST_SHORT_OVRD_LSB;
  223. uint32_t d_SOC_RESET_CONTROL_CE_RST_MASK;
  224. uint32_t d_SOC_RESET_CONTROL_CPU_WARM_RST_MASK;
  225. uint32_t d_CPU_INTR_ADDRESS;
  226. uint32_t d_SOC_LF_TIMER_CONTROL0_ADDRESS;
  227. uint32_t d_SOC_LF_TIMER_CONTROL0_ENABLE_MASK;
  228. uint32_t d_SOC_LF_TIMER_STATUS0_ADDRESS;
  229. /* chip id start */
  230. uint32_t d_SI_CONFIG_ERR_INT_MASK;
  231. uint32_t d_SI_CONFIG_ERR_INT_LSB;
  232. uint32_t d_GPIO_ENABLE_W1TS_LOW_ADDRESS;
  233. uint32_t d_GPIO_PIN0_CONFIG_LSB;
  234. uint32_t d_GPIO_PIN0_PAD_PULL_LSB;
  235. uint32_t d_GPIO_PIN0_PAD_PULL_MASK;
  236. uint32_t d_SOC_CHIP_ID_ADDRESS;
  237. uint32_t d_SOC_CHIP_ID_VERSION_MASK;
  238. uint32_t d_SOC_CHIP_ID_VERSION_LSB;
  239. uint32_t d_SOC_CHIP_ID_REVISION_MASK;
  240. uint32_t d_SOC_CHIP_ID_REVISION_LSB;
  241. uint32_t d_SOC_CHIP_ID_REVISION_MSB;
  242. uint32_t d_FW_AXI_MSI_ADDR;
  243. uint32_t d_FW_AXI_MSI_DATA;
  244. uint32_t d_WLAN_SUBSYSTEM_CORE_ID_ADDRESS;
  245. /* chip id end */
  246. uint32_t d_A_SOC_CORE_SCRATCH_0_ADDRESS;
  247. uint32_t d_A_SOC_CORE_SCRATCH_1_ADDRESS;
  248. uint32_t d_A_SOC_CORE_SCRATCH_2_ADDRESS;
  249. uint32_t d_A_SOC_CORE_SCRATCH_3_ADDRESS;
  250. uint32_t d_A_SOC_CORE_SCRATCH_4_ADDRESS;
  251. uint32_t d_A_SOC_CORE_SCRATCH_5_ADDRESS;
  252. uint32_t d_A_SOC_CORE_SCRATCH_6_ADDRESS;
  253. uint32_t d_A_SOC_CORE_SCRATCH_7_ADDRESS;
  254. uint32_t d_A_SOC_CORE_SPARE_0_REGISTER;
  255. uint32_t d_PCIE_INTR_FIRMWARE_ROUTE_MASK;
  256. uint32_t d_A_SOC_CORE_PCIE_INTR_CAUSE_GRP1;
  257. uint32_t d_A_SOC_CORE_SPARE_1_REGISTER;
  258. uint32_t d_A_SOC_CORE_PCIE_INTR_CLR_GRP1;
  259. uint32_t d_A_SOC_CORE_PCIE_INTR_ENABLE_GRP1;
  260. uint32_t d_A_SOC_PCIE_PCIE_SCRATCH_0;
  261. uint32_t d_A_SOC_PCIE_PCIE_SCRATCH_1;
  262. uint32_t d_A_WIFI_APB_1_A_WFSS_CE_TARGET_HOST_DELTA;
  263. uint32_t d_A_SOC_PCIE_PCIE_SCRATCH_2;
  264. uint32_t d_A_SOC_CORE_PCIE_INTR_ENABLE_GRP0_Q6_MASK;
  265. uint32_t d_WLAN_DEBUG_INPUT_SEL_OFFSET;
  266. uint32_t d_WLAN_DEBUG_INPUT_SEL_SRC_MSB;
  267. uint32_t d_WLAN_DEBUG_INPUT_SEL_SRC_LSB;
  268. uint32_t d_WLAN_DEBUG_INPUT_SEL_SRC_MASK;
  269. uint32_t d_WLAN_DEBUG_CONTROL_OFFSET;
  270. uint32_t d_WLAN_DEBUG_CONTROL_ENABLE_MSB;
  271. uint32_t d_WLAN_DEBUG_CONTROL_ENABLE_LSB;
  272. uint32_t d_WLAN_DEBUG_CONTROL_ENABLE_MASK;
  273. uint32_t d_WLAN_DEBUG_OUT_OFFSET;
  274. uint32_t d_WLAN_DEBUG_OUT_DATA_MSB;
  275. uint32_t d_WLAN_DEBUG_OUT_DATA_LSB;
  276. uint32_t d_WLAN_DEBUG_OUT_DATA_MASK;
  277. uint32_t d_AMBA_DEBUG_BUS_OFFSET;
  278. uint32_t d_AMBA_DEBUG_BUS_PCIE_DEBUG_SEL_MSB;
  279. uint32_t d_AMBA_DEBUG_BUS_PCIE_DEBUG_SEL_LSB;
  280. uint32_t d_AMBA_DEBUG_BUS_PCIE_DEBUG_SEL_MASK;
  281. uint32_t d_AMBA_DEBUG_BUS_SEL_MSB;
  282. uint32_t d_AMBA_DEBUG_BUS_SEL_LSB;
  283. uint32_t d_AMBA_DEBUG_BUS_SEL_MASK;
  284. #ifdef QCA_WIFI_3_0_ADRASTEA
  285. uint32_t d_Q6_ENABLE_REGISTER_0;
  286. uint32_t d_Q6_ENABLE_REGISTER_1;
  287. uint32_t d_Q6_CAUSE_REGISTER_0;
  288. uint32_t d_Q6_CAUSE_REGISTER_1;
  289. uint32_t d_Q6_CLEAR_REGISTER_0;
  290. uint32_t d_Q6_CLEAR_REGISTER_1;
  291. #endif
  292. #ifdef CONFIG_BYPASS_QMI
  293. uint32_t d_BYPASS_QMI_TEMP_REGISTER;
  294. #endif
  295. uint32_t d_WIFICMN_INT_STATUS_ADDRESS;
  296. };
  297. struct hostdef_s {
  298. uint32_t d_INT_STATUS_ENABLE_ERROR_LSB;
  299. uint32_t d_INT_STATUS_ENABLE_ERROR_MASK;
  300. uint32_t d_INT_STATUS_ENABLE_CPU_LSB;
  301. uint32_t d_INT_STATUS_ENABLE_CPU_MASK;
  302. uint32_t d_INT_STATUS_ENABLE_COUNTER_LSB;
  303. uint32_t d_INT_STATUS_ENABLE_COUNTER_MASK;
  304. uint32_t d_INT_STATUS_ENABLE_MBOX_DATA_LSB;
  305. uint32_t d_INT_STATUS_ENABLE_MBOX_DATA_MASK;
  306. uint32_t d_ERROR_STATUS_ENABLE_RX_UNDERFLOW_LSB;
  307. uint32_t d_ERROR_STATUS_ENABLE_RX_UNDERFLOW_MASK;
  308. uint32_t d_ERROR_STATUS_ENABLE_TX_OVERFLOW_LSB;
  309. uint32_t d_ERROR_STATUS_ENABLE_TX_OVERFLOW_MASK;
  310. uint32_t d_COUNTER_INT_STATUS_ENABLE_BIT_LSB;
  311. uint32_t d_COUNTER_INT_STATUS_ENABLE_BIT_MASK;
  312. uint32_t d_INT_STATUS_ENABLE_ADDRESS;
  313. uint32_t d_CPU_INT_STATUS_ENABLE_BIT_LSB;
  314. uint32_t d_CPU_INT_STATUS_ENABLE_BIT_MASK;
  315. uint32_t d_HOST_INT_STATUS_ADDRESS;
  316. uint32_t d_CPU_INT_STATUS_ADDRESS;
  317. uint32_t d_ERROR_INT_STATUS_ADDRESS;
  318. uint32_t d_ERROR_INT_STATUS_WAKEUP_MASK;
  319. uint32_t d_ERROR_INT_STATUS_WAKEUP_LSB;
  320. uint32_t d_ERROR_INT_STATUS_RX_UNDERFLOW_MASK;
  321. uint32_t d_ERROR_INT_STATUS_RX_UNDERFLOW_LSB;
  322. uint32_t d_ERROR_INT_STATUS_TX_OVERFLOW_MASK;
  323. uint32_t d_ERROR_INT_STATUS_TX_OVERFLOW_LSB;
  324. uint32_t d_COUNT_DEC_ADDRESS;
  325. uint32_t d_HOST_INT_STATUS_CPU_MASK;
  326. uint32_t d_HOST_INT_STATUS_CPU_LSB;
  327. uint32_t d_HOST_INT_STATUS_ERROR_MASK;
  328. uint32_t d_HOST_INT_STATUS_ERROR_LSB;
  329. uint32_t d_HOST_INT_STATUS_COUNTER_MASK;
  330. uint32_t d_HOST_INT_STATUS_COUNTER_LSB;
  331. uint32_t d_RX_LOOKAHEAD_VALID_ADDRESS;
  332. uint32_t d_WINDOW_DATA_ADDRESS;
  333. uint32_t d_WINDOW_READ_ADDR_ADDRESS;
  334. uint32_t d_WINDOW_WRITE_ADDR_ADDRESS;
  335. uint32_t d_SOC_GLOBAL_RESET_ADDRESS;
  336. uint32_t d_RTC_STATE_ADDRESS;
  337. uint32_t d_RTC_STATE_COLD_RESET_MASK;
  338. uint32_t d_PCIE_LOCAL_BASE_ADDRESS;
  339. uint32_t d_PCIE_SOC_WAKE_RESET;
  340. uint32_t d_PCIE_SOC_WAKE_ADDRESS;
  341. uint32_t d_PCIE_SOC_WAKE_V_MASK;
  342. uint32_t d_RTC_STATE_V_MASK;
  343. uint32_t d_RTC_STATE_V_LSB;
  344. uint32_t d_FW_IND_EVENT_PENDING;
  345. uint32_t d_FW_IND_INITIALIZED;
  346. uint32_t d_FW_IND_HELPER;
  347. uint32_t d_RTC_STATE_V_ON;
  348. #if defined(SDIO_3_0)
  349. uint32_t d_HOST_INT_STATUS_MBOX_DATA_MASK;
  350. uint32_t d_HOST_INT_STATUS_MBOX_DATA_LSB;
  351. #endif
  352. uint32_t d_PCIE_SOC_RDY_STATUS_ADDRESS;
  353. uint32_t d_PCIE_SOC_RDY_STATUS_BAR_MASK;
  354. uint32_t d_SOC_PCIE_BASE_ADDRESS;
  355. uint32_t d_MSI_MAGIC_ADR_ADDRESS;
  356. uint32_t d_MSI_MAGIC_ADDRESS;
  357. uint32_t d_HOST_CE_COUNT;
  358. uint32_t d_ENABLE_MSI;
  359. uint32_t d_MUX_ID_MASK;
  360. uint32_t d_TRANSACTION_ID_MASK;
  361. uint32_t d_DESC_DATA_FLAG_MASK;
  362. uint32_t d_A_SOC_PCIE_PCIE_BAR0_START;
  363. uint32_t d_FW_IND_HOST_READY;
  364. };
  365. struct host_shadow_regs_s {
  366. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_0;
  367. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_1;
  368. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_2;
  369. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_3;
  370. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_4;
  371. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_5;
  372. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_6;
  373. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_7;
  374. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_8;
  375. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_9;
  376. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_10;
  377. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_11;
  378. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_12;
  379. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_13;
  380. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_14;
  381. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_15;
  382. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_16;
  383. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_17;
  384. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_18;
  385. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_19;
  386. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_20;
  387. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_21;
  388. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_22;
  389. uint32_t d_A_LOCAL_SHADOW_REG_VALUE_23;
  390. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_0;
  391. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_1;
  392. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_2;
  393. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_3;
  394. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_4;
  395. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_5;
  396. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_6;
  397. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_7;
  398. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_8;
  399. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_9;
  400. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_10;
  401. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_11;
  402. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_12;
  403. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_13;
  404. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_14;
  405. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_15;
  406. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_16;
  407. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_17;
  408. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_18;
  409. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_19;
  410. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_20;
  411. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_21;
  412. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_22;
  413. uint32_t d_A_LOCAL_SHADOW_REG_ADDRESS_23;
  414. };
  415. /*
  416. * @d_DST_WR_INDEX_ADDRESS: Destination ring write index
  417. *
  418. * @d_SRC_WATERMARK_ADDRESS: Source ring watermark
  419. *
  420. * @d_SRC_WATERMARK_LOW_MASK: Bits indicating low watermark from Source ring
  421. * watermark
  422. *
  423. * @d_SRC_WATERMARK_HIGH_MASK: Bits indicating high watermark from Source ring
  424. * watermark
  425. *
  426. * @d_DST_WATERMARK_LOW_MASK: Bits indicating low watermark from Destination
  427. * ring watermark
  428. *
  429. * @d_DST_WATERMARK_HIGH_MASK: Bits indicating high watermark from Destination
  430. * ring watermark
  431. *
  432. * @d_CURRENT_SRRI_ADDRESS: Current source ring read index.The Start Offset
  433. * will be reflected after a CE transfer is completed.
  434. *
  435. * @d_CURRENT_DRRI_ADDRESS: Current Destination ring read index. The Start
  436. * Offset will be reflected after a CE transfer
  437. * is completed.
  438. *
  439. * @d_HOST_IS_SRC_RING_HIGH_WATERMARK_MASK: Source ring high watermark
  440. * Interrupt Status
  441. *
  442. * @d_HOST_IS_SRC_RING_LOW_WATERMARK_MASK: Source ring low watermark
  443. * Interrupt Status
  444. *
  445. * @d_HOST_IS_DST_RING_HIGH_WATERMARK_MASK: Destination ring high watermark
  446. * Interrupt Status
  447. *
  448. * @d_HOST_IS_DST_RING_LOW_WATERMARK_MASK: Source ring low watermark
  449. * Interrupt Status
  450. *
  451. * @d_HOST_IS_ADDRESS: Host Interrupt Status Register
  452. *
  453. * @d_MISC_IS_ADDRESS: Miscellaneous Interrupt Status Register
  454. *
  455. * @d_HOST_IS_COPY_COMPLETE_MASK: Bits indicating Copy complete interrupt
  456. * status from the Host Interrupt Status
  457. * register
  458. *
  459. * @d_CE_WRAPPER_BASE_ADDRESS: Copy Engine Wrapper Base Address
  460. *
  461. * @d_CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS: CE Wrapper summary for interrupts
  462. * to host
  463. *
  464. * @d_CE_WRAPPER_INDEX_BASE_LOW: The LSB Base address to which source and
  465. * destination read indices are written
  466. *
  467. * @d_CE_WRAPPER_INDEX_BASE_HIGH: The MSB Base address to which source and
  468. * destination read indices are written
  469. *
  470. * @d_HOST_IE_ADDRESS: Host Line Interrupt Enable Register
  471. *
  472. * @d_HOST_IE_COPY_COMPLETE_MASK: Bits indicating Copy complete interrupt
  473. * enable from the IE register
  474. *
  475. * @d_SR_BA_ADDRESS: LSB of Source Ring Base Address
  476. *
  477. * @d_SR_BA_ADDRESS_HIGH: MSB of Source Ring Base Address
  478. *
  479. * @d_SR_SIZE_ADDRESS: Source Ring size - number of entries and Start Offset
  480. *
  481. * @d_CE_CTRL1_ADDRESS: CE Control register
  482. *
  483. * @d_CE_CTRL1_DMAX_LENGTH_MASK: Destination buffer Max Length used for error
  484. * check
  485. *
  486. * @d_DR_BA_ADDRESS: Destination Ring Base Address Low
  487. *
  488. * @d_DR_BA_ADDRESS_HIGH: Destination Ring Base Address High
  489. *
  490. * @d_DR_SIZE_ADDRESS: Destination Ring size - number of entries Start Offset
  491. *
  492. * @d_CE_CMD_REGISTER: Implements commands to all CE Halt Flush
  493. *
  494. * @d_CE_MSI_ADDRESS: CE MSI LOW Address register
  495. *
  496. * @d_CE_MSI_ADDRESS_HIGH: CE MSI High Address register
  497. *
  498. * @d_CE_MSI_DATA: CE MSI Data Register
  499. *
  500. * @d_CE_MSI_ENABLE_BIT: Bit in CTRL1 register indication the MSI enable
  501. *
  502. * @d_MISC_IE_ADDRESS: Miscellaneous Interrupt Enable Register
  503. *
  504. * @d_MISC_IS_AXI_ERR_MASK:
  505. * Bit in Misc IS indicating AXI Timeout Interrupt status
  506. *
  507. * @d_MISC_IS_DST_ADDR_ERR_MASK:
  508. * Bit in Misc IS indicating Destination Address Error
  509. *
  510. * @d_MISC_IS_SRC_LEN_ERR_MASK: Bit in Misc IS indicating Source Zero Length
  511. * Error Interrupt status
  512. *
  513. * @d_MISC_IS_DST_MAX_LEN_VIO_MASK: Bit in Misc IS indicating Destination Max
  514. * Length Violated Interrupt status
  515. *
  516. * @d_MISC_IS_DST_RING_OVERFLOW_MASK: Bit in Misc IS indicating Destination
  517. * Ring Overflow Interrupt status
  518. *
  519. * @d_MISC_IS_SRC_RING_OVERFLOW_MASK: Bit in Misc IS indicating Source Ring
  520. * Overflow Interrupt status
  521. *
  522. * @d_SRC_WATERMARK_LOW_LSB: Source Ring Low Watermark LSB
  523. *
  524. * @d_SRC_WATERMARK_HIGH_LSB: Source Ring Low Watermark MSB
  525. *
  526. * @d_DST_WATERMARK_LOW_LSB: Destination Ring Low Watermark LSB
  527. *
  528. * @d_DST_WATERMARK_HIGH_LSB: Destination Ring High Watermark LSB
  529. *
  530. * @d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK:
  531. * Bits in d_CE_WRAPPER_INTERRUPT_SUMMARY_ADDR
  532. * indicating Copy engine miscellaneous interrupt summary
  533. *
  534. * @d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB:
  535. * Bits in d_CE_WRAPPER_INTERRUPT_SUMMARY_ADDR
  536. * indicating Host interrupts summary
  537. *
  538. * @d_CE_CTRL1_DMAX_LENGTH_LSB:
  539. * LSB of Destination buffer Max Length used for error check
  540. *
  541. * @d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK:
  542. * Bits indicating Source ring Byte Swap enable.
  543. * Treats source ring memory organisation as big-endian.
  544. *
  545. * @d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK:
  546. * Bits indicating Destination ring byte swap enable.
  547. * Treats destination ring memory organisation as big-endian
  548. *
  549. * @d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB:
  550. * LSB of Source ring Byte Swap enable
  551. *
  552. * @d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB:
  553. * LSB of Destination ring Byte Swap enable
  554. *
  555. * @d_CE_WRAPPER_DEBUG_OFFSET: Offset of CE OBS BUS Select register
  556. *
  557. * @d_CE_WRAPPER_DEBUG_SEL_MSB:
  558. * MSB of Control register selecting inputs for trace/debug
  559. *
  560. * @d_CE_WRAPPER_DEBUG_SEL_LSB:
  561. * LSB of Control register selecting inputs for trace/debug
  562. *
  563. * @d_CE_WRAPPER_DEBUG_SEL_MASK:
  564. * Bit mask for trace/debug Control register
  565. *
  566. * @d_CE_DEBUG_OFFSET: Offset of Copy Engine FSM Debug Status
  567. *
  568. * @d_CE_DEBUG_SEL_MSB: MSB of Copy Engine FSM Debug Status
  569. *
  570. * @d_CE_DEBUG_SEL_LSB: LSB of Copy Engine FSM Debug Status
  571. *
  572. * @d_CE_DEBUG_SEL_MASK: Bits indicating Copy Engine FSM Debug Status
  573. *
  574. */
  575. struct ce_reg_def {
  576. /* copy_engine.c */
  577. uint32_t d_DST_WR_INDEX_ADDRESS;
  578. uint32_t d_SRC_WATERMARK_ADDRESS;
  579. uint32_t d_SRC_WATERMARK_LOW_MASK;
  580. uint32_t d_SRC_WATERMARK_HIGH_MASK;
  581. uint32_t d_DST_WATERMARK_LOW_MASK;
  582. uint32_t d_DST_WATERMARK_HIGH_MASK;
  583. uint32_t d_CURRENT_SRRI_ADDRESS;
  584. uint32_t d_CURRENT_DRRI_ADDRESS;
  585. uint32_t d_HOST_IS_SRC_RING_HIGH_WATERMARK_MASK;
  586. uint32_t d_HOST_IS_SRC_RING_LOW_WATERMARK_MASK;
  587. uint32_t d_HOST_IS_DST_RING_HIGH_WATERMARK_MASK;
  588. uint32_t d_HOST_IS_DST_RING_LOW_WATERMARK_MASK;
  589. uint32_t d_HOST_IS_ADDRESS;
  590. uint32_t d_MISC_IS_ADDRESS;
  591. uint32_t d_HOST_IS_COPY_COMPLETE_MASK;
  592. uint32_t d_CE_WRAPPER_BASE_ADDRESS;
  593. uint32_t d_CE_WRAPPER_INTERRUPT_SUMMARY_ADDRESS;
  594. uint32_t d_CE_DDR_ADDRESS_FOR_RRI_LOW;
  595. uint32_t d_CE_DDR_ADDRESS_FOR_RRI_HIGH;
  596. uint32_t d_HOST_IE_ADDRESS;
  597. uint32_t d_HOST_IE_ADDRESS_2;
  598. uint32_t d_HOST_IE_COPY_COMPLETE_MASK;
  599. uint32_t d_SR_BA_ADDRESS;
  600. uint32_t d_SR_BA_ADDRESS_HIGH;
  601. uint32_t d_SR_SIZE_ADDRESS;
  602. uint32_t d_CE_CTRL1_ADDRESS;
  603. uint32_t d_CE_CTRL1_DMAX_LENGTH_MASK;
  604. uint32_t d_DR_BA_ADDRESS;
  605. uint32_t d_DR_BA_ADDRESS_HIGH;
  606. uint32_t d_DR_SIZE_ADDRESS;
  607. uint32_t d_CE_CMD_REGISTER;
  608. uint32_t d_CE_MSI_ADDRESS;
  609. uint32_t d_CE_MSI_ADDRESS_HIGH;
  610. uint32_t d_CE_MSI_DATA;
  611. uint32_t d_CE_MSI_ENABLE_BIT;
  612. uint32_t d_MISC_IE_ADDRESS;
  613. uint32_t d_MISC_IS_AXI_ERR_MASK;
  614. uint32_t d_MISC_IS_DST_ADDR_ERR_MASK;
  615. uint32_t d_MISC_IS_SRC_LEN_ERR_MASK;
  616. uint32_t d_MISC_IS_DST_MAX_LEN_VIO_MASK;
  617. uint32_t d_MISC_IS_DST_RING_OVERFLOW_MASK;
  618. uint32_t d_MISC_IS_SRC_RING_OVERFLOW_MASK;
  619. uint32_t d_SRC_WATERMARK_LOW_LSB;
  620. uint32_t d_SRC_WATERMARK_HIGH_LSB;
  621. uint32_t d_DST_WATERMARK_LOW_LSB;
  622. uint32_t d_DST_WATERMARK_HIGH_LSB;
  623. uint32_t d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_MASK;
  624. uint32_t d_CE_WRAPPER_INTERRUPT_SUMMARY_HOST_MSI_LSB;
  625. uint32_t d_CE_CTRL1_DMAX_LENGTH_LSB;
  626. uint32_t d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_MASK;
  627. uint32_t d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_MASK;
  628. uint32_t d_CE_CTRL1_SRC_RING_BYTE_SWAP_EN_LSB;
  629. uint32_t d_CE_CTRL1_DST_RING_BYTE_SWAP_EN_LSB;
  630. uint32_t d_CE_CTRL1_IDX_UPD_EN_MASK;
  631. uint32_t d_CE_WRAPPER_DEBUG_OFFSET;
  632. uint32_t d_CE_WRAPPER_DEBUG_SEL_MSB;
  633. uint32_t d_CE_WRAPPER_DEBUG_SEL_LSB;
  634. uint32_t d_CE_WRAPPER_DEBUG_SEL_MASK;
  635. uint32_t d_CE_DEBUG_OFFSET;
  636. uint32_t d_CE_DEBUG_SEL_MSB;
  637. uint32_t d_CE_DEBUG_SEL_LSB;
  638. uint32_t d_CE_DEBUG_SEL_MASK;
  639. uint32_t d_CE0_BASE_ADDRESS;
  640. uint32_t d_CE1_BASE_ADDRESS;
  641. uint32_t d_A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_ENABLES;
  642. uint32_t d_A_WIFI_APB_3_A_WCMN_APPS_CE_INTR_STATUS;
  643. uint32_t d_HOST_IE_ADDRESS_3;
  644. uint32_t d_HOST_IE_REG1_CE_LSB;
  645. uint32_t d_HOST_IE_REG2_CE_LSB;
  646. uint32_t d_HOST_IE_REG3_CE_LSB;
  647. };
  648. #endif