jpeg_drv_reg.h 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. #ifndef __JPEG_DRV_6589_REG_H__
  2. #define __JPEG_DRV_6589_REG_H__
  3. /* #include <mach/mt_reg_base.h> */
  4. /* #include <mach/sync_write.h> */
  5. #include <mt-plat/sync_write.h>
  6. #include "jpeg_drv.h"
  7. #define JPEG_ENC_BASE jpeg_dev_get_encoder_base_VA()
  8. #define JPEG_DEC_BASE jpeg_dev_get_decoder_base_VA()
  9. #define IMG_REG_WRITE(v, a) mt_reg_sync_writel(v, a)
  10. #define IMG_REG_READ(v, a) ((v) = ioread32((void __iomem *)a))
  11. /* #define IMG_REG_READ(v,a) mt65xx_reg_sync_writew(v,a) */
  12. /********************************************************************/
  13. /* The following registers are for JPEG Encoder Registers on MT6589 */
  14. /********************************************************************/
  15. #define REG_JPEG_ENC_RSTB (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x100))
  16. #define REG_JPEG_ENC_CTRL (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x104))
  17. #define REG_JPEG_ENC_QUALITY (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x108))
  18. #define REG_JPEG_ENC_BLK_NUM (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x10C))
  19. #define REG_JPEG_ENC_BLK_CNT (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x110))
  20. #define REG_JPEG_ENC_INTERRUPT_STATUS (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x11C))
  21. #define REG_JPEG_ENC_DST_ADDR0 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x120))
  22. #define REG_JPEG_ENC_DMA_ADDR0 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x124))
  23. #define REG_JPEG_ENC_STALL_ADDR0 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x128))
  24. #define REG_JPEG_ENC_OFFSET_ADDR (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x138))
  25. #define REG_JPEG_ENC_CURR_DMA_ADDR (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x13C))
  26. #define REG_JPEG_ENC_RST_MCU_NUM (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x150))
  27. #define REG_JPEG_ENC_IMG_SIZE (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x154))
  28. #define REG_JPEG_ENC_GULTRA_TRESH (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x158))
  29. #define REG_JPEG_ENC_DEBUG_INFO0 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x160))
  30. #define REG_JPEG_ENC_DEBUG_INFO1 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x164))
  31. #define REG_JPEG_ENC_TOTAL_CYCLE (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x168))
  32. #define REG_JPEG_ENC_BYTE_OFFSET_MASK (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x16C))
  33. #define REG_JPEG_ENC_SRC_LUMA_ADDR (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x170))
  34. #define REG_JPEG_ENC_SRC_CHROMA_ADDR (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x174))
  35. #define REG_JPEG_ENC_STRIDE (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x178))
  36. #define REG_JPEG_ENC_IMG_STRIDE (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x17C))
  37. #define REG_JPEG_ENC_MEM_CYCLE (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x208))
  38. #define REG_JPEG_ENC_SMI_DEBUG0 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x304))
  39. #define REG_JPEG_ENC_SMI_DEBUG1 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x308))
  40. #define REG_JPEG_ENC_SMI_DEBUG2 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x30C))
  41. #define REG_JPEG_ENC_SMI_DEBUG3 (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x310))
  42. #define REG_JPEG_ENC_CODEC_SEL (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x314))
  43. #define REG_JPEG_ENC_ULTRA_THRES (*(volatile kal_uint32*)(JPEG_ENC_BASE + 0x318))
  44. #define JPEG_ENC_REG_COUNT 0x314
  45. /********************************************************************/
  46. /* define JPEG Encoder Registers register field*/
  47. /********************************************************************/
  48. /* #define REG_JPEG_ENC_RSTB *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x100) */
  49. /* #define REG_JPEG_ENC_CTRL *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x104) */
  50. /* #define REG_JPEG_ENC_QUALITY *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x108) */
  51. /* #define REG_JPEG_ENC_BLK_NUM *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x10C) */
  52. /* #define REG_JPEG_ENC_BLK_CNT *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x110) */
  53. /* #define REG_JPEG_ENC_INTERRUPT_STATUS *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x11C) */
  54. #define JPEG_DRV_ENC_INT_STATUS_DONE 0x01
  55. #define JPEG_DRV_ENC_INT_STATUS_STALL 0x02
  56. #define JPEG_DRV_ENC_INT_STATUS_VCODEC_IRQ 0x10
  57. #define JPEG_DRV_ENC_INT_STATUS_MASK_ALLIRQ 0x13
  58. #define JPEG_DRV_DEC_INT_STATUS_DEC_ERR 0x04
  59. /* #define REG_JPEG_ENC_DST_ADDR0 *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x120) */
  60. /* #define REG_JPEG_ENC_DMA_ADDR0 *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x124) */
  61. /* #define REG_JPEG_ENC_STALL_ADDR0 *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x128) */
  62. /* */
  63. /* #define REG_JPEG_ENC_OFFSET_ADDR *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x138) */
  64. /* #define REG_JPEG_ENC_CURR_DMA_ADDR *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x13C) */
  65. /* */
  66. /* #define REG_JPEG_ENC_RST_MCU_NUM *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x150) */
  67. /* #define REG_JPEG_ENC_IMG_SIZE *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x154) */
  68. /* #define REG_JPEG_ENC_GULTRA_TRESH *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x158) */
  69. /* */
  70. /* */
  71. /* #define REG_JPEG_ENC_DEBUG_INFO0 *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x160) */
  72. /* #define REG_JPEG_ENC_DEBUG_INFO1 *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x164) */
  73. /* #define REG_JPEG_ENC_TOTAL_CYCLE *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x168) */
  74. /* #define REG_JPEG_ENC_BYTE_OFFSET_MASK *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x16C) */
  75. /* */
  76. /* */
  77. /* #define REG_JPEG_ENC_SRC_LUMA_ADDR *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x170) */
  78. /* #define REG_JPEG_ENC_SRC_CHROMA_ADDR *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x174) */
  79. /* #define REG_JPEG_ENC_STRIDE *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x178) */
  80. /* #define REG_JPEG_ENC_IMG_STRIDE *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x17C) */
  81. /* #define REG_JPEG_ENC_MEM_CYCLE *(volatile kal_uint32 *)(JPEG_ENC_BASE + 0x208) */
  82. /********************************************************************/
  83. /* The following registers are for JPEG Encoder Registers on MT6589 */
  84. /********************************************************************/
  85. #define REG_ADDR_JPEG_ENC_RSTB (JPEG_ENC_BASE + 0x100)
  86. #define REG_ADDR_JPEG_ENC_CTRL (JPEG_ENC_BASE + 0x104)
  87. #define REG_ADDR_JPEG_ENC_QUALITY (JPEG_ENC_BASE + 0x108)
  88. #define REG_ADDR_JPEG_ENC_BLK_NUM (JPEG_ENC_BASE + 0x10C)
  89. #define REG_ADDR_JPEG_ENC_BLK_CNT (JPEG_ENC_BASE + 0x110)
  90. #define REG_ADDR_JPEG_ENC_INTERRUPT_STATUS (JPEG_ENC_BASE + 0x11C)
  91. #define REG_ADDR_JPEG_ENC_DST_ADDR0 (JPEG_ENC_BASE + 0x120)
  92. #define REG_ADDR_JPEG_ENC_DMA_ADDR0 (JPEG_ENC_BASE + 0x124)
  93. #define REG_ADDR_JPEG_ENC_STALL_ADDR0 (JPEG_ENC_BASE + 0x128)
  94. #define REG_ADDR_JPEG_ENC_OFFSET_ADDR (JPEG_ENC_BASE + 0x138)
  95. #define REG_ADDR_JPEG_ENC_CURR_DMA_ADDR (JPEG_ENC_BASE + 0x13C)
  96. #define REG_ADDR_JPEG_ENC_RST_MCU_NUM (JPEG_ENC_BASE + 0x150)
  97. #define REG_ADDR_JPEG_ENC_IMG_SIZE (JPEG_ENC_BASE + 0x154)
  98. #define REG_ADDR_JPEG_ENC_GULTRA_TRESH (JPEG_ENC_BASE + 0x158)
  99. #define REG_ADDR_JPEG_ENC_DEBUG_INFO0 (JPEG_ENC_BASE + 0x160)
  100. #define REG_ADDR_JPEG_ENC_DEBUG_INFO1 (JPEG_ENC_BASE + 0x164)
  101. #define REG_ADDR_JPEG_ENC_TOTAL_CYCLE (JPEG_ENC_BASE + 0x168)
  102. #define REG_ADDR_JPEG_ENC_BYTE_OFFSET_MASK (JPEG_ENC_BASE + 0x16C)
  103. #define REG_ADDR_JPEG_ENC_SRC_LUMA_ADDR (JPEG_ENC_BASE + 0x170)
  104. #define REG_ADDR_JPEG_ENC_SRC_CHROMA_ADDR (JPEG_ENC_BASE + 0x174)
  105. #define REG_ADDR_JPEG_ENC_STRIDE (JPEG_ENC_BASE + 0x178)
  106. #define REG_ADDR_JPEG_ENC_IMG_STRIDE (JPEG_ENC_BASE + 0x17C)
  107. #define REG_ADDR_JPEG_ENC_MEM_CYCLE (JPEG_ENC_BASE + 0x208)
  108. #define REG_ADDR_JPEG_ENC_SMI_DEBUG0 (JPEG_ENC_BASE + 0x304)
  109. #define REG_ADDR_JPEG_ENC_SMI_DEBUG1 (JPEG_ENC_BASE + 0x308)
  110. #define REG_ADDR_JPEG_ENC_SMI_DEBUG2 (JPEG_ENC_BASE + 0x30C)
  111. #define REG_ADDR_JPEG_ENC_SMI_DEBUG3 (JPEG_ENC_BASE + 0x310)
  112. #define REG_ADDR_JPEG_ENC_CODEC_SEL (JPEG_ENC_BASE + 0x314)
  113. #define REG_ADDR_JPEG_ENC_ULTRA_THRES (JPEG_ENC_BASE + 0x318)
  114. #define REG_ADDR_JPEG_ENC_PASS2_RSTB (JPEG_ENC_BASE + 0x800)
  115. /********************************************************************/
  116. /* The following registers are for JPEG Decoder Registers on MT6589 */
  117. /********************************************************************/
  118. #define REG_JPGDEC_RESET (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0090))
  119. #define REG_JPGDEC_BRZ_FACTOR (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x00F8))
  120. #define REG_JPGDEC_DU_SAMPLE (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x00FC))
  121. #define REG_JPGDEC_DEST_ADDR0_Y (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0140))
  122. #define REG_JPGDEC_DEST_ADDR0_U (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0144))
  123. #define REG_JPGDEC_DEST_ADDR0_V (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0148))
  124. #define REG_JPGDEC_DEST_ADDR1_Y (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x014C))
  125. #define REG_JPGDEC_DEST_ADDR1_U (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0150))
  126. #define REG_JPGDEC_DEST_ADDR1_V (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0154))
  127. #define REG_JPGDEC_STRIDE_Y (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0158))
  128. #define REG_JPGDEC_STRIDE_UV (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x015C))
  129. #define REG_JPGDEC_IMG_STRIDE_Y (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0160))
  130. #define REG_JPGDEC_IMG_STRIDE_UV (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0164))
  131. /* #define REG_JPGDEC_TOTAL_MCU_NUM (*(volatile kal_uint32*) ( JPEG_DEC_BASE + 0x0168)) */
  132. #define REG_JPGDEC_WDMA_CTRL (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x016C))
  133. #define REG_JPGDEC_PAUSE_MCU_NUM (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0170))
  134. #define REG_JPGDEC_OPERATION_MODE (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x017C))
  135. #define REG_JPGDEC_DEBUG0 (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0180))
  136. #define REG_JPGDEC_DEBUG1 (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0184))
  137. #define REG_JPGDEC_FILE_ADDR (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0200))
  138. #define REG_JPGDEC_COMP_ID (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x020C))
  139. #define REG_JPGDEC_TOTAL_MCU_NUM (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0210))
  140. #define REG_JPGDEC_COMP0_DATA_UNIT_NUM (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0224))
  141. #define REG_JPGDEC_DU_CTRL (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x023C))
  142. #define REG_JPGDEC_TRIG (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0240))
  143. #define REG_JPGDEC_FILE_BRP (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0248))
  144. #define REG_JPGDEC_FILE_TOTAL_SIZE (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x024C))
  145. #define REG_JPGDEC_QT_ID (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0270))
  146. #define REG_JPGDEC_INTERRUPT_STATUS (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0274))
  147. #define REG_JPGDEC_STATUS (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0278))
  148. #define REG_JPGDEC_MCU_CNT (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0294))
  149. #define REG_JPGDEC_DCM_CTL (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0300))
  150. #define REG_JPGDEC_SMI_DEBUG0 (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0304))
  151. #define REG_JPGDEC_SMI_DEBUG1 (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0308))
  152. #define REG_JPGDEC_SMI_DEBUG2 (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x030C))
  153. #define REG_JPGDEC_SMI_DEBUG3 (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0310))
  154. #define REG_JPGDEC_ULTRA_THRES (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x0318))
  155. #define REG_JPGDEC_IRQ_EN (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x031C))
  156. #define REG_JPGDEC_DEBUG_MODE (*(volatile kal_uint32*) (JPEG_DEC_BASE + 0x00C8))
  157. /********************************************************************/
  158. /* define JPEG Decoder Registers register field*/
  159. /********************************************************************/
  160. /* REG_JPGDEC_RESET ( JPEG_DEC_BASE + 0x0090 ) */
  161. #define BIT_SOFT_RST_SHIFT 0
  162. #define BIT_HARD_RST_SHIFT 4
  163. /* REG_JPGDEC_BRZ_FACTOR ( JPEG_DEC_BASE + 0x00F8 ) */
  164. #define BIT_BRZ_YH_SHIFT 0
  165. #define BIT_BRZ_YV_SHIFT 4
  166. #define BIT_BRZ_CH_SHIFT 8
  167. #define BIT_BRZ_CV_SHIFT 12
  168. /* REG_JPGDEC_DU_SAMPLE ( JPEG_DEC_BASE + 0x00FC ) */
  169. /* REG_JPGDEC_DEST_ADDR0_Y ( JPEG_DEC_BASE + 0x0140 ) */
  170. /* REG_JPGDEC_DEST_ADDR0_U ( JPEG_DEC_BASE + 0x0144 ) */
  171. /* REG_JPGDEC_DEST_ADDR0_V ( JPEG_DEC_BASE + 0x0148 ) */
  172. /* REG_JPGDEC_DEST_ADDR1_Y ( JPEG_DEC_BASE + 0x014C ) */
  173. /* REG_JPGDEC_DEST_ADDR1_U ( JPEG_DEC_BASE + 0x0150 ) */
  174. /* REG_JPGDEC_DEST_ADDR1_V ( JPEG_DEC_BASE + 0x0154 ) */
  175. /* REG_JPGDEC_STRIDE_Y ( JPEG_DEC_BASE + 0x0158 ) */
  176. /* REG_JPGDEC_STRIDE_UV ( JPEG_DEC_BASE + 0x015C ) */
  177. /* REG_JPGDEC_IMG_STRIDE_Y ( JPEG_DEC_BASE + 0x0160 ) */
  178. /* REG_JPGDEC_IMG_STRIDE_UV ( JPEG_DEC_BASE + 0x0164 ) */
  179. /* REG_JPGDEC_WDMA_CTRL ( JPEG_DEC_BASE + 0x016C ) */
  180. /* REG_JPGDEC_PAUSE_MCU_NUM ( JPEG_DEC_BASE + 0x0170 ) */
  181. /* REG_JPGDEC_OPERATION_MODE ( JPEG_DEC_BASE + 0x017C ) */
  182. /* REG_JPGDEC_DEBUG0 ( JPEG_DEC_BASE + 0x0180 ) */
  183. /* REG_JPGDEC_FILE_ADDR ( JPEG_DEC_BASE + 0x0200 ) */
  184. /* REG_JPGDEC_COMP_ID ( JPEG_DEC_BASE + 0x020C ) */
  185. /* REG_JPGDEC_TOTAL_MCU_NUM ( JPEG_DEC_BASE + 0x0210 ) */
  186. /* REG_JPGDEC_COMP0_DATA_UNIT_NUM ( JPEG_DEC_BASE + 0x0224 ) */
  187. /* REG_JPGDEC_DU_CTRL ( JPEG_DEC_BASE + 0x023C ) */
  188. #define BIT_DU_CTRL_COMP_Y 4
  189. #define BIT_DU_CTRL_COMP_U 5
  190. #define BIT_DU_CTRL_COMP_V 6
  191. #define BIT_DU_CTRL_NOUSE 7
  192. /* REG_JPGDEC_TRIG ( JPEG_DEC_BASE + 0x0240 ) */
  193. /* REG_JPGDEC_FILE_BRP ( JPEG_DEC_BASE + 0x0248 ) */
  194. /* REG_JPGDEC_FILE_TOTAL_SIZE ( JPEG_DEC_BASE + 0x024C ) */
  195. /* REG_JPGDEC_QT_ID ( JPEG_DEC_BASE + 0x0270 ) */
  196. /* REG_JPGDEC_INTERRUPT_STATUS ( JPEG_DEC_BASE + 0x0274 ) */
  197. #define BIT_INQST_MASK_TYPE 0x80000000
  198. #define BIT_INQST_MASK_ERROR_BS 0x20
  199. #define BIT_INQST_MASK_PAUSE 0x10
  200. #define BIT_INQST_MASK_OVERFLOW 0x04
  201. #define BIT_INQST_MASK_UNDERFLOW 0x02
  202. #define BIT_INQST_MASK_EOF 0x01
  203. #define BIT_INQST_MASK_END 0x27
  204. #define BIT_INQST_MASK_ALLIRQ 0x37
  205. #define BIT_DEC_IRQ_EN_DEBUG_BRP_FLAG 0x80
  206. /* REG_JPGDEC_STATUS ( JPEG_DEC_BASE + 0x0278 ) */
  207. #define BIT_DEC_ST_STATE_MASK 0x07000000
  208. #define BIT_DEC_ST_STATE_IDLE 0x00000000
  209. #define BIT_DEC_ST_STATE_DMA 0x01000000
  210. #define BIT_DEC_ST_STATE_HEADER 0x02000000
  211. #define BIT_DEC_ST_STATE_VLD 0x03000000
  212. #define BIT_DEC_ST_STATE_RST 0x04000000
  213. #define BIT_DEC_ST_STATE_PROG 0x05000000
  214. #define BIT_DEC_ST_STATE_IDCT 0x06000000
  215. /* REG_JPGDEC_MCU_CNT ( JPEG_DEC_BASE + 0x0294 ) */
  216. #define REG_ADDR_JPGDEC_RESET (JPEG_DEC_BASE + 0x0090)
  217. #define REG_ADDR_JPGDEC_BRZ_FACTOR (JPEG_DEC_BASE + 0x00F8)
  218. #define REG_ADDR_JPGDEC_DU_SAMPLE (JPEG_DEC_BASE + 0x00FC)
  219. #define REG_ADDR_JPGDEC_DEST_ADDR0_Y (JPEG_DEC_BASE + 0x0140)
  220. #define REG_ADDR_JPGDEC_DEST_ADDR0_U (JPEG_DEC_BASE + 0x0144)
  221. #define REG_ADDR_JPGDEC_DEST_ADDR0_V (JPEG_DEC_BASE + 0x0148)
  222. #define REG_ADDR_JPGDEC_DEST_ADDR1_Y (JPEG_DEC_BASE + 0x014C)
  223. #define REG_ADDR_JPGDEC_DEST_ADDR1_U (JPEG_DEC_BASE + 0x0150)
  224. #define REG_ADDR_JPGDEC_DEST_ADDR1_V (JPEG_DEC_BASE + 0x0154)
  225. #define REG_ADDR_JPGDEC_STRIDE_Y (JPEG_DEC_BASE + 0x0158)
  226. #define REG_ADDR_JPGDEC_STRIDE_UV (JPEG_DEC_BASE + 0x015C)
  227. #define REG_ADDR_JPGDEC_IMG_STRIDE_Y (JPEG_DEC_BASE + 0x0160)
  228. #define REG_ADDR_JPGDEC_IMG_STRIDE_UV (JPEG_DEC_BASE + 0x0164)
  229. #define REG_ADDR_JPGDEC_WDMA_CTRL (JPEG_DEC_BASE + 0x016C)
  230. #define REG_ADDR_JPGDEC_PAUSE_MCU_NUM (JPEG_DEC_BASE + 0x0170)
  231. #define REG_ADDR_JPGDEC_OPERATION_MODE (JPEG_DEC_BASE + 0x017C)
  232. #define REG_ADDR_JPGDEC_DEBUG0 (JPEG_DEC_BASE + 0x0180)
  233. #define REG_ADDR_JPGDEC_FILE_ADDR (JPEG_DEC_BASE + 0x0200)
  234. #define REG_ADDR_JPGDEC_COMP_ID (JPEG_DEC_BASE + 0x020C)
  235. #define REG_ADDR_JPGDEC_TOTAL_MCU_NUM (JPEG_DEC_BASE + 0x0210)
  236. #define REG_ADDR_JPGDEC_COMP0_DATA_UNIT_NUM (JPEG_DEC_BASE + 0x0224)
  237. #define REG_ADDR_JPGDEC_DU_CTRL (JPEG_DEC_BASE + 0x023C)
  238. #define REG_ADDR_JPGDEC_TRIG (JPEG_DEC_BASE + 0x0240)
  239. #define REG_ADDR_JPGDEC_FILE_BRP (JPEG_DEC_BASE + 0x0248)
  240. #define REG_ADDR_JPGDEC_FILE_TOTAL_SIZE (JPEG_DEC_BASE + 0x024C)
  241. #define REG_ADDR_JPGDEC_QT_ID (JPEG_DEC_BASE + 0x0270)
  242. #define REG_ADDR_JPGDEC_INTERRUPT_STATUS (JPEG_DEC_BASE + 0x0274)
  243. #define REG_ADDR_JPGDEC_STATUS (JPEG_DEC_BASE + 0x0278)
  244. #define REG_ADDR_JPGDEC_MCU_CNT (JPEG_DEC_BASE + 0x0294)
  245. #define REG_ADDR_JPGDEC_DCM_CTL (JPEG_DEC_BASE + 0x0300)
  246. #define REG_ADDR_JPGDEC_SMI_DEBUG0 (JPEG_DEC_BASE + 0x0304)
  247. #define REG_ADDR_JPGDEC_SMI_DEBUG1 (JPEG_DEC_BASE + 0x0308)
  248. #define REG_ADDR_JPGDEC_SMI_DEBUG2 (JPEG_DEC_BASE + 0x030C)
  249. #define REG_ADDR_JPGDEC_SMI_DEBUG3 (JPEG_DEC_BASE + 0x0310)
  250. #define REG_ADDR_JPGDEC_ULTRA_THRES (JPEG_DEC_BASE + 0x0318)
  251. #define REG_ADDR_JPGDEC_IRQ_EN (JPEG_DEC_BASE + 0x031C)
  252. #define REG_ADDR_JPGDEC_DEBUG_MODE (JPEG_DEC_BASE + 0x00C8)
  253. #endif /* / __MT6589_JPEG_REG_H__ */