rxcapt.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725
  1. /* Copyright (C) 2018 RDA Technologies Limited and/or its affiliates("RDA").
  2. * All rights reserved.
  3. *
  4. * This software is supplied "AS IS" without any warranties.
  5. * RDA assumes no responsibility or liability for the use of the software,
  6. * conveys no license or title under any patent, copyright, or mask work
  7. * right to the product. RDA reserves the right to make changes in the
  8. * software without notification. RDA also make no representation or
  9. * warranty that such application will be suitable for the specified use
  10. * without further testing or modification.
  11. */
  12. #ifndef _RXCAPT_H_
  13. #define _RXCAPT_H_
  14. // Auto generated by dtools(see dtools.txt for its version).
  15. // Don't edit it manually!
  16. #define REG_RXCAPT_BASE (0x1a000000)
  17. typedef volatile struct
  18. {
  19. uint32_t rxcapt_en; // 0x00000000
  20. uint32_t capt_cfg; // 0x00000004
  21. uint32_t fill_cfg1; // 0x00000008
  22. uint32_t fill_cfg2; // 0x0000000c
  23. uint32_t dma_req_en; // 0x00000010
  24. uint32_t irq_inten; // 0x00000014
  25. uint32_t irq_inten_set; // 0x00000018
  26. uint32_t irq_inten_clr; // 0x0000001c
  27. uint32_t irq_state; // 0x00000020
  28. uint32_t capt_end_addr12; // 0x00000024
  29. uint32_t capt_end_addr34; // 0x00000028
  30. uint32_t fill_end_addr12; // 0x0000002c
  31. uint32_t fill_end_addr56; // 0x00000030
  32. uint32_t norm_ctrl; // 0x00000034
  33. uint32_t state_mem12; // 0x00000038
  34. uint32_t state_mem34; // 0x0000003c
  35. uint32_t state_mem56; // 0x00000040
  36. uint32_t state_err12; // 0x00000044
  37. uint32_t state_err34; // 0x00000048
  38. uint32_t capt_sta; // 0x0000004c
  39. uint32_t fill1_sta1; // 0x00000050
  40. uint32_t fill1_sta2; // 0x00000054
  41. uint32_t fill2_sta1; // 0x00000058
  42. uint32_t fill2_sta2; // 0x0000005c
  43. uint32_t dma_sta; // 0x00000060
  44. uint32_t capt12_len; // 0x00000064
  45. uint32_t capt34_len; // 0x00000068
  46. uint32_t err_inten; // 0x0000006c
  47. uint32_t err_inten_set; // 0x00000070
  48. uint32_t err_inten_clr; // 0x00000074
  49. uint32_t err_int_sta; // 0x00000078
  50. uint32_t __124[16353]; // 0x0000007c
  51. uint32_t mem12_ping; // 0x00010000
  52. uint32_t __65540[2047]; // 0x00010004
  53. uint32_t mem12_pang; // 0x00012000
  54. uint32_t __73732[2047]; // 0x00012004
  55. uint32_t mem34_ping; // 0x00014000
  56. uint32_t __81924[511]; // 0x00014004
  57. uint32_t mem34_pang; // 0x00014800
  58. uint32_t __83972[511]; // 0x00014804
  59. uint32_t mem56_ping; // 0x00015000
  60. uint32_t __86020[1023]; // 0x00015004
  61. uint32_t mem56_pang; // 0x00016000
  62. } HWP_RXCAPT_T;
  63. #define hwp_rxcapt ((HWP_RXCAPT_T *)REG_ACCESS_ADDRESS(REG_RXCAPT_BASE))
  64. // rxcapt_en
  65. typedef union {
  66. uint32_t v;
  67. struct
  68. {
  69. uint32_t rxcapt_en : 1; // [0]
  70. uint32_t __31_1 : 31; // [31:1]
  71. } b;
  72. } REG_RXCAPT_RXCAPT_EN_T;
  73. // capt_cfg
  74. typedef union {
  75. uint32_t v;
  76. struct
  77. {
  78. uint32_t capt_rx : 1; // [0]
  79. uint32_t capt_odtoa : 1; // [1]
  80. uint32_t capt_iddet_offline : 1; // [2]
  81. uint32_t capt_tx : 1; // [3]
  82. uint32_t capt_dump : 1; // [4]
  83. uint32_t __31_5 : 27; // [31:5]
  84. } b;
  85. } REG_RXCAPT_CAPT_CFG_T;
  86. // fill_cfg1
  87. typedef union {
  88. uint32_t v;
  89. struct
  90. {
  91. uint32_t fill_div : 3; // [2:0]
  92. uint32_t fill_dl_offline : 1; // [3]
  93. uint32_t fill_len : 28; // [31:4]
  94. } b;
  95. } REG_RXCAPT_FILL_CFG1_T;
  96. // fill_cfg2
  97. typedef union {
  98. uint32_t v;
  99. struct
  100. {
  101. uint32_t fill_div : 3; // [2:0]
  102. uint32_t fill_iddet_offline : 1; // [3]
  103. uint32_t fill_len : 28; // [31:4]
  104. } b;
  105. } REG_RXCAPT_FILL_CFG2_T;
  106. // dma_req_en
  107. typedef union {
  108. uint32_t v;
  109. struct
  110. {
  111. uint32_t dma_req0_en : 1; // [0]
  112. uint32_t dma_req1_en : 1; // [1]
  113. uint32_t dma_req2_en : 1; // [2]
  114. uint32_t dma_req3_en : 1; // [3]
  115. uint32_t dma_req4_en : 1; // [4]
  116. uint32_t dma_req5_en : 1; // [5]
  117. uint32_t dma_req6_en : 1; // [6]
  118. uint32_t dma_req7_en : 1; // [7]
  119. uint32_t __31_8 : 24; // [31:8]
  120. } b;
  121. } REG_RXCAPT_DMA_REQ_EN_T;
  122. // irq_inten
  123. typedef union {
  124. uint32_t v;
  125. struct
  126. {
  127. uint32_t mem12_ping_irq : 1; // [0]
  128. uint32_t mem12_pang_irq : 1; // [1]
  129. uint32_t mem12_finish_irq : 1; // [2]
  130. uint32_t __3_3 : 1; // [3]
  131. uint32_t mem34_ping_irq : 1; // [4]
  132. uint32_t mem34_pang_irq : 1; // [5]
  133. uint32_t mem34_finish_irq : 1; // [6]
  134. uint32_t __7_7 : 1; // [7]
  135. uint32_t mem56_ping_irq : 1; // [8]
  136. uint32_t mem56_pang_irq : 1; // [9]
  137. uint32_t mem56_finish_irq : 1; // [10]
  138. uint32_t __11_11 : 1; // [11]
  139. uint32_t capt_err12 : 1; // [12]
  140. uint32_t capt_err34 : 1; // [13]
  141. uint32_t __31_14 : 18; // [31:14]
  142. } b;
  143. } REG_RXCAPT_IRQ_INTEN_T;
  144. // irq_inten_set
  145. typedef union {
  146. uint32_t v;
  147. struct
  148. {
  149. uint32_t mem12_ping_irq : 1; // [0], write set
  150. uint32_t mem12_pang_irq : 1; // [1], write set
  151. uint32_t mem12_finish_irq : 1; // [2], write set
  152. uint32_t __3_3 : 1; // [3]
  153. uint32_t mem34_ping_irq : 1; // [4], write set
  154. uint32_t mem34_pang_irq : 1; // [5], write set
  155. uint32_t mem34_finish_irq : 1; // [6], write set
  156. uint32_t __7_7 : 1; // [7]
  157. uint32_t mem56_ping_irq : 1; // [8], write set
  158. uint32_t mem56_pang_irq : 1; // [9], write set
  159. uint32_t mem56_finish_irq : 1; // [10], write set
  160. uint32_t __11_11 : 1; // [11]
  161. uint32_t capt_err12 : 1; // [12], write set
  162. uint32_t capt_err34 : 1; // [13], write set
  163. uint32_t __31_14 : 18; // [31:14]
  164. } b;
  165. } REG_RXCAPT_IRQ_INTEN_SET_T;
  166. // irq_inten_clr
  167. typedef union {
  168. uint32_t v;
  169. struct
  170. {
  171. uint32_t mem12_ping_irq : 1; // [0], write clear
  172. uint32_t mem12_pang_irq : 1; // [1], write clear
  173. uint32_t mem12_finish_irq : 1; // [2], write clear
  174. uint32_t __3_3 : 1; // [3]
  175. uint32_t mem34_ping_irq : 1; // [4], write clear
  176. uint32_t mem34_pang_irq : 1; // [5], write clear
  177. uint32_t mem34_finish_irq : 1; // [6], write clear
  178. uint32_t __7_7 : 1; // [7]
  179. uint32_t mem56_ping_irq : 1; // [8], write clear
  180. uint32_t mem56_pang_irq : 1; // [9], write clear
  181. uint32_t mem56_finish_irq : 1; // [10], write clear
  182. uint32_t __11_11 : 1; // [11]
  183. uint32_t capt_err12 : 1; // [12], write clear
  184. uint32_t capt_err34 : 1; // [13], write clear
  185. uint32_t __31_14 : 18; // [31:14]
  186. } b;
  187. } REG_RXCAPT_IRQ_INTEN_CLR_T;
  188. // irq_state
  189. typedef union {
  190. uint32_t v;
  191. struct
  192. {
  193. uint32_t mem12_ping_irq : 1; // [0], write clear
  194. uint32_t mem12_pang_irq : 1; // [1], write clear
  195. uint32_t mem12_finish_irq : 1; // [2], write clear
  196. uint32_t __3_3 : 1; // [3]
  197. uint32_t mem34_ping_irq : 1; // [4], write clear
  198. uint32_t mem34_pang_irq : 1; // [5], write clear
  199. uint32_t mem34_finish_irq : 1; // [6], write clear
  200. uint32_t __7_7 : 1; // [7]
  201. uint32_t mem56_ping_irq : 1; // [8], write clear
  202. uint32_t mem56_pang_irq : 1; // [9], write clear
  203. uint32_t mem56_finish_irq : 1; // [10], write clear
  204. uint32_t __11_11 : 1; // [11]
  205. uint32_t capt_err12_irq : 1; // [12], write clear
  206. uint32_t capt_err34_irq : 1; // [13], write clear
  207. uint32_t __31_14 : 18; // [31:14]
  208. } b;
  209. } REG_RXCAPT_IRQ_STATE_T;
  210. // capt_end_addr12
  211. typedef union {
  212. uint32_t v;
  213. struct
  214. {
  215. uint32_t end_addr12 : 11; // [10:0]
  216. uint32_t __31_11 : 21; // [31:11]
  217. } b;
  218. } REG_RXCAPT_CAPT_END_ADDR12_T;
  219. // capt_end_addr34
  220. typedef union {
  221. uint32_t v;
  222. struct
  223. {
  224. uint32_t end_addr34 : 9; // [8:0]
  225. uint32_t __31_9 : 23; // [31:9]
  226. } b;
  227. } REG_RXCAPT_CAPT_END_ADDR34_T;
  228. // fill_end_addr12
  229. typedef union {
  230. uint32_t v;
  231. struct
  232. {
  233. uint32_t end_addr12 : 11; // [10:0]
  234. uint32_t __31_11 : 21; // [31:11]
  235. } b;
  236. } REG_RXCAPT_FILL_END_ADDR12_T;
  237. // fill_end_addr56
  238. typedef union {
  239. uint32_t v;
  240. struct
  241. {
  242. uint32_t end_addr56 : 10; // [9:0]
  243. uint32_t __31_10 : 22; // [31:10]
  244. } b;
  245. } REG_RXCAPT_FILL_END_ADDR56_T;
  246. // state_mem12
  247. typedef union {
  248. uint32_t v;
  249. struct
  250. {
  251. uint32_t ping_addr : 11; // [10:0], read only
  252. uint32_t __11_11 : 1; // [11]
  253. uint32_t ping_sta : 3; // [14:12], read only
  254. uint32_t __15_15 : 1; // [15]
  255. uint32_t pang_addr : 11; // [26:16], read only
  256. uint32_t __27_27 : 1; // [27]
  257. uint32_t pang_sta : 3; // [30:28], read only
  258. uint32_t __31_31 : 1; // [31]
  259. } b;
  260. } REG_RXCAPT_STATE_MEM12_T;
  261. // state_mem34
  262. typedef union {
  263. uint32_t v;
  264. struct
  265. {
  266. uint32_t ping_addr : 9; // [8:0], read only
  267. uint32_t __11_9 : 3; // [11:9]
  268. uint32_t ping_sta : 3; // [14:12], read only
  269. uint32_t __15_15 : 1; // [15]
  270. uint32_t pang_addr : 9; // [24:16], read only
  271. uint32_t __27_25 : 3; // [27:25]
  272. uint32_t pang_sta : 3; // [30:28], read only
  273. uint32_t __31_31 : 1; // [31]
  274. } b;
  275. } REG_RXCAPT_STATE_MEM34_T;
  276. // state_mem56
  277. typedef union {
  278. uint32_t v;
  279. struct
  280. {
  281. uint32_t ping_addr : 10; // [9:0], read only
  282. uint32_t __11_10 : 2; // [11:10]
  283. uint32_t ping_sta : 3; // [14:12], read only
  284. uint32_t __15_15 : 1; // [15]
  285. uint32_t pang_addr : 10; // [25:16], read only
  286. uint32_t __27_26 : 2; // [27:26]
  287. uint32_t pang_sta : 3; // [30:28], read only
  288. uint32_t __31_31 : 1; // [31]
  289. } b;
  290. } REG_RXCAPT_STATE_MEM56_T;
  291. // state_err12
  292. typedef union {
  293. uint32_t v;
  294. struct
  295. {
  296. uint32_t err_fn : 24; // [23:0], read only
  297. uint32_t which_mem : 1; // [24], read only
  298. uint32_t __31_25 : 7; // [31:25]
  299. } b;
  300. } REG_RXCAPT_STATE_ERR12_T;
  301. // state_err34
  302. typedef union {
  303. uint32_t v;
  304. struct
  305. {
  306. uint32_t err_fn : 24; // [23:0], read only
  307. uint32_t which_mem : 1; // [24], read only
  308. uint32_t __31_25 : 7; // [31:25]
  309. } b;
  310. } REG_RXCAPT_STATE_ERR34_T;
  311. // capt_sta
  312. typedef union {
  313. uint32_t v;
  314. struct
  315. {
  316. uint32_t rx_sta : 2; // [1:0], read only
  317. uint32_t __3_2 : 2; // [3:2]
  318. uint32_t dump_sta : 2; // [5:4], read only
  319. uint32_t __7_6 : 2; // [7:6]
  320. uint32_t tx_sta : 2; // [9:8], read only
  321. uint32_t __11_10 : 2; // [11:10]
  322. uint32_t iddet_sta : 2; // [13:12], read only
  323. uint32_t __15_14 : 2; // [15:14]
  324. uint32_t otdoa_sta : 2; // [17:16], read only
  325. uint32_t __31_18 : 14; // [31:18]
  326. } b;
  327. } REG_RXCAPT_CAPT_STA_T;
  328. // fill1_sta1
  329. typedef union {
  330. uint32_t v;
  331. struct
  332. {
  333. uint32_t out_len : 28; // [27:0], read only
  334. uint32_t fill_running_sta : 2; // [29:28], read only
  335. uint32_t __31_30 : 2; // [31:30]
  336. } b;
  337. } REG_RXCAPT_FILL1_STA1_T;
  338. // fill1_sta2
  339. typedef union {
  340. uint32_t v;
  341. struct
  342. {
  343. uint32_t in_len : 28; // [27:0], read only
  344. uint32_t __31_28 : 4; // [31:28]
  345. } b;
  346. } REG_RXCAPT_FILL1_STA2_T;
  347. // fill2_sta1
  348. typedef union {
  349. uint32_t v;
  350. struct
  351. {
  352. uint32_t out_len : 28; // [27:0], read only
  353. uint32_t fill_running_sta : 2; // [29:28], read only
  354. uint32_t __31_30 : 2; // [31:30]
  355. } b;
  356. } REG_RXCAPT_FILL2_STA1_T;
  357. // fill2_sta2
  358. typedef union {
  359. uint32_t v;
  360. struct
  361. {
  362. uint32_t in_len : 28; // [27:0], read only
  363. uint32_t __31_28 : 4; // [31:28]
  364. } b;
  365. } REG_RXCAPT_FILL2_STA2_T;
  366. // dma_sta
  367. typedef union {
  368. uint32_t v;
  369. struct
  370. {
  371. uint32_t req_sta : 8; // [7:0], read only
  372. uint32_t ack_sta : 8; // [15:8], read only
  373. uint32_t __31_16 : 16; // [31:16]
  374. } b;
  375. } REG_RXCAPT_DMA_STA_T;
  376. // capt12_len
  377. typedef union {
  378. uint32_t v;
  379. struct
  380. {
  381. uint32_t current_len12 : 24; // [23:0], read only
  382. uint32_t __31_24 : 8; // [31:24]
  383. } b;
  384. } REG_RXCAPT_CAPT12_LEN_T;
  385. // capt34_len
  386. typedef union {
  387. uint32_t v;
  388. struct
  389. {
  390. uint32_t current_len34 : 24; // [23:0], read only
  391. uint32_t __31_24 : 8; // [31:24]
  392. } b;
  393. } REG_RXCAPT_CAPT34_LEN_T;
  394. // err_inten
  395. typedef union {
  396. uint32_t v;
  397. struct
  398. {
  399. uint32_t err_inten_sr : 4; // [3:0]
  400. uint32_t __31_4 : 28; // [31:4]
  401. } b;
  402. } REG_RXCAPT_ERR_INTEN_T;
  403. // err_inten_set
  404. typedef union {
  405. uint32_t v;
  406. struct
  407. {
  408. uint32_t err_inten_set_sr : 4; // [3:0], write clear
  409. uint32_t __31_4 : 28; // [31:4]
  410. } b;
  411. } REG_RXCAPT_ERR_INTEN_SET_T;
  412. // err_inten_clr
  413. typedef union {
  414. uint32_t v;
  415. struct
  416. {
  417. uint32_t err_inten_clr_sr : 4; // [3:0], write clear
  418. uint32_t __31_4 : 28; // [31:4]
  419. } b;
  420. } REG_RXCAPT_ERR_INTEN_CLR_T;
  421. // err_int_sta
  422. typedef union {
  423. uint32_t v;
  424. struct
  425. {
  426. uint32_t err_int_sta : 4; // [3:0], write clear
  427. uint32_t __31_4 : 28; // [31:4]
  428. } b;
  429. } REG_RXCAPT_ERR_INT_STA_T;
  430. // mem12_ping
  431. typedef union {
  432. uint32_t v;
  433. struct
  434. {
  435. uint32_t __3_0 : 4; // [3:0]
  436. uint32_t mem12_ping_0 : 12; // [15:4]
  437. uint32_t __19_16 : 4; // [19:16]
  438. uint32_t mem12_ping_1 : 12; // [31:20]
  439. } b;
  440. } REG_RXCAPT_MEM12_PING_T;
  441. // mem12_pang
  442. typedef union {
  443. uint32_t v;
  444. struct
  445. {
  446. uint32_t __3_0 : 4; // [3:0]
  447. uint32_t mem12_pang_0 : 12; // [15:4]
  448. uint32_t __19_16 : 4; // [19:16]
  449. uint32_t mem12_pang_1 : 12; // [31:20]
  450. } b;
  451. } REG_RXCAPT_MEM12_PANG_T;
  452. // mem34_ping
  453. typedef union {
  454. uint32_t v;
  455. struct
  456. {
  457. uint32_t __3_0 : 4; // [3:0]
  458. uint32_t mem34_ping_0 : 12; // [15:4]
  459. uint32_t __19_16 : 4; // [19:16]
  460. uint32_t mem34_ping_1 : 12; // [31:20]
  461. } b;
  462. } REG_RXCAPT_MEM34_PING_T;
  463. // mem34_pang
  464. typedef union {
  465. uint32_t v;
  466. struct
  467. {
  468. uint32_t __3_0 : 4; // [3:0]
  469. uint32_t mem34_pang_0 : 12; // [15:4]
  470. uint32_t __19_16 : 4; // [19:16]
  471. uint32_t mem34_pang_1 : 12; // [31:20]
  472. } b;
  473. } REG_RXCAPT_MEM34_PANG_T;
  474. // mem56_ping
  475. typedef union {
  476. uint32_t v;
  477. struct
  478. {
  479. uint32_t __3_0 : 4; // [3:0]
  480. uint32_t mem56_ping_0 : 12; // [15:4]
  481. uint32_t __19_16 : 4; // [19:16]
  482. uint32_t mem56_ping_1 : 12; // [31:20]
  483. } b;
  484. } REG_RXCAPT_MEM56_PING_T;
  485. // mem56_pang
  486. typedef union {
  487. uint32_t v;
  488. struct
  489. {
  490. uint32_t __3_0 : 4; // [3:0]
  491. uint32_t mem56_pang_0 : 12; // [15:4]
  492. uint32_t __19_16 : 4; // [19:16]
  493. uint32_t mem56_pang_1 : 12; // [31:20]
  494. } b;
  495. } REG_RXCAPT_MEM56_PANG_T;
  496. // rxcapt_en
  497. #define RXCAPT_RXCAPT_EN (1 << 0)
  498. // capt_cfg
  499. #define RXCAPT_CAPT_RX (1 << 0)
  500. #define RXCAPT_CAPT_ODTOA (1 << 1)
  501. #define RXCAPT_CAPT_IDDET_OFFLINE (1 << 2)
  502. #define RXCAPT_CAPT_TX (1 << 3)
  503. #define RXCAPT_CAPT_DUMP (1 << 4)
  504. // fill_cfg1
  505. #define RXCAPT_FILL_DIV(n) (((n)&0x7) << 0)
  506. #define RXCAPT_FILL_DL_OFFLINE (1 << 3)
  507. #define RXCAPT_FILL_LEN(n) (((n)&0xfffffff) << 4)
  508. // fill_cfg2
  509. #define RXCAPT_FILL_DIV(n) (((n)&0x7) << 0)
  510. #define RXCAPT_FILL_IDDET_OFFLINE (1 << 3)
  511. #define RXCAPT_FILL_LEN(n) (((n)&0xfffffff) << 4)
  512. // dma_req_en
  513. #define RXCAPT_DMA_REQ0_EN (1 << 0)
  514. #define RXCAPT_DMA_REQ1_EN (1 << 1)
  515. #define RXCAPT_DMA_REQ2_EN (1 << 2)
  516. #define RXCAPT_DMA_REQ3_EN (1 << 3)
  517. #define RXCAPT_DMA_REQ4_EN (1 << 4)
  518. #define RXCAPT_DMA_REQ5_EN (1 << 5)
  519. #define RXCAPT_DMA_REQ6_EN (1 << 6)
  520. #define RXCAPT_DMA_REQ7_EN (1 << 7)
  521. // irq_inten
  522. #define RXCAPT_MEM12_PING_IRQ (1 << 0)
  523. #define RXCAPT_MEM12_PANG_IRQ (1 << 1)
  524. #define RXCAPT_MEM12_FINISH_IRQ (1 << 2)
  525. #define RXCAPT_MEM34_PING_IRQ (1 << 4)
  526. #define RXCAPT_MEM34_PANG_IRQ (1 << 5)
  527. #define RXCAPT_MEM34_FINISH_IRQ (1 << 6)
  528. #define RXCAPT_MEM56_PING_IRQ (1 << 8)
  529. #define RXCAPT_MEM56_PANG_IRQ (1 << 9)
  530. #define RXCAPT_MEM56_FINISH_IRQ (1 << 10)
  531. #define RXCAPT_CAPT_ERR12 (1 << 12)
  532. #define RXCAPT_CAPT_ERR34 (1 << 13)
  533. // irq_inten_set
  534. #define RXCAPT_MEM12_PING_IRQ (1 << 0)
  535. #define RXCAPT_MEM12_PANG_IRQ (1 << 1)
  536. #define RXCAPT_MEM12_FINISH_IRQ (1 << 2)
  537. #define RXCAPT_MEM34_PING_IRQ (1 << 4)
  538. #define RXCAPT_MEM34_PANG_IRQ (1 << 5)
  539. #define RXCAPT_MEM34_FINISH_IRQ (1 << 6)
  540. #define RXCAPT_MEM56_PING_IRQ (1 << 8)
  541. #define RXCAPT_MEM56_PANG_IRQ (1 << 9)
  542. #define RXCAPT_MEM56_FINISH_IRQ (1 << 10)
  543. #define RXCAPT_CAPT_ERR12 (1 << 12)
  544. #define RXCAPT_CAPT_ERR34 (1 << 13)
  545. // irq_inten_clr
  546. #define RXCAPT_MEM12_PING_IRQ (1 << 0)
  547. #define RXCAPT_MEM12_PANG_IRQ (1 << 1)
  548. #define RXCAPT_MEM12_FINISH_IRQ (1 << 2)
  549. #define RXCAPT_MEM34_PING_IRQ (1 << 4)
  550. #define RXCAPT_MEM34_PANG_IRQ (1 << 5)
  551. #define RXCAPT_MEM34_FINISH_IRQ (1 << 6)
  552. #define RXCAPT_MEM56_PING_IRQ (1 << 8)
  553. #define RXCAPT_MEM56_PANG_IRQ (1 << 9)
  554. #define RXCAPT_MEM56_FINISH_IRQ (1 << 10)
  555. #define RXCAPT_CAPT_ERR12 (1 << 12)
  556. #define RXCAPT_CAPT_ERR34 (1 << 13)
  557. // irq_state
  558. #define RXCAPT_MEM12_PING_IRQ (1 << 0)
  559. #define RXCAPT_MEM12_PANG_IRQ (1 << 1)
  560. #define RXCAPT_MEM12_FINISH_IRQ (1 << 2)
  561. #define RXCAPT_MEM34_PING_IRQ (1 << 4)
  562. #define RXCAPT_MEM34_PANG_IRQ (1 << 5)
  563. #define RXCAPT_MEM34_FINISH_IRQ (1 << 6)
  564. #define RXCAPT_MEM56_PING_IRQ (1 << 8)
  565. #define RXCAPT_MEM56_PANG_IRQ (1 << 9)
  566. #define RXCAPT_MEM56_FINISH_IRQ (1 << 10)
  567. #define RXCAPT_CAPT_ERR12_IRQ (1 << 12)
  568. #define RXCAPT_CAPT_ERR34_IRQ (1 << 13)
  569. // capt_end_addr12
  570. #define RXCAPT_END_ADDR12(n) (((n)&0x7ff) << 0)
  571. // capt_end_addr34
  572. #define RXCAPT_END_ADDR34(n) (((n)&0x1ff) << 0)
  573. // fill_end_addr12
  574. #define RXCAPT_END_ADDR12(n) (((n)&0x7ff) << 0)
  575. // fill_end_addr56
  576. #define RXCAPT_END_ADDR56(n) (((n)&0x3ff) << 0)
  577. // state_mem12
  578. #define RXCAPT_STATE_MEM12_PING_ADDR(n) (((n)&0x7ff) << 0)
  579. #define RXCAPT_PING_STA(n) (((n)&0x7) << 12)
  580. #define RXCAPT_STATE_MEM12_PANG_ADDR(n) (((n)&0x7ff) << 16)
  581. #define RXCAPT_PANG_STA(n) (((n)&0x7) << 28)
  582. // state_mem34
  583. #define RXCAPT_STATE_MEM34_PING_ADDR(n) (((n)&0x1ff) << 0)
  584. #define RXCAPT_PING_STA(n) (((n)&0x7) << 12)
  585. #define RXCAPT_STATE_MEM34_PANG_ADDR(n) (((n)&0x1ff) << 16)
  586. #define RXCAPT_PANG_STA(n) (((n)&0x7) << 28)
  587. // state_mem56
  588. #define RXCAPT_STATE_MEM56_PING_ADDR(n) (((n)&0x3ff) << 0)
  589. #define RXCAPT_PING_STA(n) (((n)&0x7) << 12)
  590. #define RXCAPT_STATE_MEM56_PANG_ADDR(n) (((n)&0x3ff) << 16)
  591. #define RXCAPT_PANG_STA(n) (((n)&0x7) << 28)
  592. // state_err12
  593. #define RXCAPT_ERR_FN(n) (((n)&0xffffff) << 0)
  594. #define RXCAPT_WHICH_MEM (1 << 24)
  595. // state_err34
  596. #define RXCAPT_ERR_FN(n) (((n)&0xffffff) << 0)
  597. #define RXCAPT_WHICH_MEM (1 << 24)
  598. // capt_sta
  599. #define RXCAPT_RX_STA(n) (((n)&0x3) << 0)
  600. #define RXCAPT_DUMP_STA(n) (((n)&0x3) << 4)
  601. #define RXCAPT_TX_STA(n) (((n)&0x3) << 8)
  602. #define RXCAPT_IDDET_STA(n) (((n)&0x3) << 12)
  603. #define RXCAPT_OTDOA_STA(n) (((n)&0x3) << 16)
  604. // fill1_sta1
  605. #define RXCAPT_OUT_LEN(n) (((n)&0xfffffff) << 0)
  606. #define RXCAPT_FILL_RUNNING_STA(n) (((n)&0x3) << 28)
  607. // fill1_sta2
  608. #define RXCAPT_IN_LEN(n) (((n)&0xfffffff) << 0)
  609. // fill2_sta1
  610. #define RXCAPT_OUT_LEN(n) (((n)&0xfffffff) << 0)
  611. #define RXCAPT_FILL_RUNNING_STA(n) (((n)&0x3) << 28)
  612. // fill2_sta2
  613. #define RXCAPT_IN_LEN(n) (((n)&0xfffffff) << 0)
  614. // dma_sta
  615. #define RXCAPT_REQ_STA(n) (((n)&0xff) << 0)
  616. #define RXCAPT_ACK_STA(n) (((n)&0xff) << 8)
  617. // capt12_len
  618. #define RXCAPT_CURRENT_LEN12(n) (((n)&0xffffff) << 0)
  619. // capt34_len
  620. #define RXCAPT_CURRENT_LEN34(n) (((n)&0xffffff) << 0)
  621. // err_inten
  622. #define RXCAPT_ERR_INTEN_SR(n) (((n)&0xf) << 0)
  623. // err_inten_set
  624. #define RXCAPT_ERR_INTEN_SET_SR(n) (((n)&0xf) << 0)
  625. // err_inten_clr
  626. #define RXCAPT_ERR_INTEN_CLR_SR(n) (((n)&0xf) << 0)
  627. // err_int_sta
  628. #define RXCAPT_ERR_INT_STA(n) (((n)&0xf) << 0)
  629. // mem12_ping
  630. #define RXCAPT_MEM12_PING_0(n) (((n)&0xfff) << 4)
  631. #define RXCAPT_MEM12_PING_1(n) (((n)&0xfff) << 20)
  632. // mem12_pang
  633. #define RXCAPT_MEM12_PANG_0(n) (((n)&0xfff) << 4)
  634. #define RXCAPT_MEM12_PANG_1(n) (((n)&0xfff) << 20)
  635. // mem34_ping
  636. #define RXCAPT_MEM34_PING_0(n) (((n)&0xfff) << 4)
  637. #define RXCAPT_MEM34_PING_1(n) (((n)&0xfff) << 20)
  638. // mem34_pang
  639. #define RXCAPT_MEM34_PANG_0(n) (((n)&0xfff) << 4)
  640. #define RXCAPT_MEM34_PANG_1(n) (((n)&0xfff) << 20)
  641. // mem56_ping
  642. #define RXCAPT_MEM56_PING_0(n) (((n)&0xfff) << 4)
  643. #define RXCAPT_MEM56_PING_1(n) (((n)&0xfff) << 20)
  644. // mem56_pang
  645. #define RXCAPT_MEM56_PANG_0(n) (((n)&0xfff) << 4)
  646. #define RXCAPT_MEM56_PANG_1(n) (((n)&0xfff) << 20)
  647. #endif // _RXCAPT_H_