1 /******************************************************************************
2 ** File Name: rotation_reg_v0.h *
5 ** Copyright: 2009 Spreatrum, Incoporated. All Rights Reserved. *
7 ******************************************************************************/
8 /******************************************************************************
10 **---------------------------------------------------------------------------*
11 ** DATE NAME DESCRIPTION *
12 ** 07/09/2009 Tim.zhu Create. *
13 ******************************************************************************/
14 #ifndef _ROTATION_REG_V0_H_
15 #define _ROTATION_REG_V0_H_
16 /*----------------------------------------------------------------------------*
18 **---------------------------------------------------------------------------*/
20 /**---------------------------------------------------------------------------*
22 **---------------------------------------------------------------------------*/
27 #define ROT_SRC_STAR_ADDR (ROT_REG_BASE + 0x00)
28 #define ROT_DST_STAR_ADDR (ROT_REG_BASE + 0x04)
29 #define ROT_IMAGE_SIZE (ROT_REG_BASE + 0x08)
30 #define ROT_CONTROL (ROT_REG_BASE + 0x0c)
31 #define ROT_DMA_CFG0 (ROT_REG_BASE + 0x10)
32 #define ROT_DMA_CFG1 (ROT_REG_BASE + 0x14)
33 #define ROT_DMA_SRC_ADD (ROT_REG_BASE + 0x18)
34 #define ROT_DMA_DST_ADD (ROT_REG_BASE + 0x1c)
35 #define ROT_DMA_LLPTR (ROT_REG_BASE + 0x20)
36 #define ROT_DMA_SDI (ROT_REG_BASE + 0x24)
37 #define ROT_DMA_SBI (ROT_REG_BASE + 0x28)
38 #define ROT_DMA_DBI (ROT_REG_BASE + 0x2c)
39 /**---------------------------------------------------------------------------*
41 **----------------------------------------------------------------------------*/
42 #define REG_ROTATION_REG_BASE 0x20800000
43 #define REG_ROTATION_SRC_ADDR (REG_ROTATION_REG_BASE + 0x0200)
44 #define REG_ROTATION_DST_ADDR (REG_ROTATION_REG_BASE + 0x0204)
45 #define REG_ROTATION_IMG_SIZE (REG_ROTATION_REG_BASE + 0x0208)
46 #define REG_ROTATION_CTRL (REG_ROTATION_REG_BASE + 0x020c)
47 #define REG_ROTATION_DMA_CHN_CFG0 (REG_ROTATION_REG_BASE + 0x0210)
48 #define REG_ROTATION_DMA_CHN_CFG1 (REG_ROTATION_REG_BASE + 0x0214)
49 #define REG_ROTATION_DMA_CHN_SRC_ADDR (REG_ROTATION_REG_BASE + 0x0218)
50 #define REG_ROTATION_DMA_CHN_DST_ADDR (REG_ROTATION_REG_BASE + 0x021c)
51 #define REG_ROTATION_DMA_CHN_LLPTR (REG_ROTATION_REG_BASE + 0x0220)
52 #define REG_ROTATION_DMA_CHN_SDI (REG_ROTATION_REG_BASE + 0x0224)
53 #define REG_ROTATION_DMA_CHN_SBI (REG_ROTATION_REG_BASE + 0x0228)
54 #define REG_ROTATION_DMA_CHN_DBI (REG_ROTATION_REG_BASE + 0x022c)
56 /**---------------------------------------------------------------------------*
58 **----------------------------------------------------------------------------*/
59 typedef union _rotation_src_addr_tag
61 struct _rotation_src_addr_map
63 volatile unsigned int src_addr :32; // rotation src addr
65 volatile unsigned int dwValue ;
66 } ROTATION_SRC_ADDR_U;
68 typedef union _rotation_dst_addr_tag
70 struct _rotation_dst_addr_map
72 volatile unsigned int dst_addr :32; // rotation src addr
74 volatile unsigned int dwValue ;
75 } ROTATION_DST_ADDR_U;
78 typedef union _rotation_img_size_tag
80 struct _rotation_img_size_map
82 volatile unsigned int reserved_0 :6; //[31:26] Reserved
83 volatile unsigned int pixel_format :2; //[25:24] pixel format 1 bytes 2bytes 4bytes
84 volatile unsigned int width :12; //[23: 12] image width
85 volatile unsigned int height :12; //[11:0] image heighy
87 volatile unsigned int dwValue;
88 } ROTATION_IMG_SIZE_U;
90 typedef union _rotation_ctrl_tag
92 struct _rotation_ctrl_map
94 volatile unsigned int reserved_1 :28; //[31:4] Reserved
95 volatile unsigned int rotation_eb :1; //[3] rotaton eb
96 volatile unsigned int rotation_mode :2; //[2:1] rotation mode
97 volatile unsigned int rot_mode :1; //[0] 0:normal mode 1:uv 422 mode
99 volatile unsigned int dValue;
102 typedef union _rotation_dma_chn_cfg0_tag
104 struct _rotation_dma_chn_cfg0_map
106 volatile unsigned int dma_chn_cfg0 :32;
108 volatile unsigned int dwValue;
109 } ROTATION_DMA_CHN_CFG0_U;
111 typedef union _rotation_dma_chn_cfg1_tag
113 struct _rotation_dma_chn_cfg1_map
115 volatile unsigned int dma_chn_cfg1 :32;
117 volatile unsigned int dwValue;
118 } ROTATION_DMA_CHN_CFG1_U;
120 typedef union _rotation_dma_src_addr_tag
122 struct _rotation_dma_src_addr_map
124 volatile unsigned int dma_src_addr :32;
126 volatile unsigned int dwValue;
127 } ROTATION_DMA_SRC_ADDR_U;
129 typedef union _rotation_dma_dst_addr_tag
131 struct _rotation_dma_dst_addr_map
133 volatile unsigned int dma_dst_addr :32;
135 volatile unsigned int dwValue;
136 } ROTATION_DMA_DST_ADDR_U;
138 typedef union _rotation_dma_chn_llptr_tag
140 struct _rotation_dma_chn_llptr_map
142 volatile unsigned int dma_chn_llptr :32;
144 volatile unsigned int dwValue;
145 } ROTATION_DMA_CHN_LLPTR_U;
147 typedef union _rotation_dma_chn_sdi_tag
149 struct _rotation_dma_chn_sdi_map
151 volatile unsigned int dma_chn_sdi :32;
153 volatile unsigned int dwValue;
154 } ROTATION_DMA_CHN_SDI_U;
156 typedef union _rotation_dma_chn_sbi_tag
158 struct _rotation_dma_chn_sbi_map
160 volatile unsigned int dma_chn_sbi :32;
162 volatile unsigned int dwValue;
163 } ROTATION_DMA_CHN_SBI_U;
165 typedef union _rotation_dma_chn_dbi_tag
167 struct _rotation_dma_chn_dbi_map
169 volatile unsigned int dma_chn_dbi :32;
171 volatile unsigned int dwValue;
172 } ROTATION_DMA_CHN_DBI_U;
174 /**----------------------------------------------------------------------------*
176 **----------------------------------------------------------------------------*/
180 /**---------------------------------------------------------------------------*/