tizen 2.4 release
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8825 / rotation_reg_v0.h
1 /******************************************************************************
2  ** File Name:    rotation_reg_v0.h                                          *
3  ** Author:       Tim.zhu                                                     *
4  ** DATE:         07/09/2009                                                  *
5  ** Copyright:    2009 Spreatrum, Incoporated. All Rights Reserved.           *
6  ** Description:                                                              *
7  ******************************************************************************/
8 /******************************************************************************
9  **                   Edit    History                                         *
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 /*----------------------------------------------------------------------------*
17  **                          Dependencies                                     *
18  **---------------------------------------------------------------------------*/
19
20 /**---------------------------------------------------------------------------*
21  **                          Compiler Flag                                    *
22  **---------------------------------------------------------------------------*/
23 #ifdef   __cplusplus
24 extern   "C"
25 {
26 #endif
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 /**---------------------------------------------------------------------------*
40 **                               Micro Define                                **
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)
55
56 /**---------------------------------------------------------------------------*
57 **                               Data Prototype                              **
58 **----------------------------------------------------------------------------*/
59 typedef union _rotation_src_addr_tag
60 {
61     struct _rotation_src_addr_map
62     {
63         volatile unsigned int src_addr      :32;    // rotation src addr
64     } mBits ;
65     volatile unsigned int dwValue ;
66 } ROTATION_SRC_ADDR_U;
67
68 typedef union _rotation_dst_addr_tag
69 {
70     struct _rotation_dst_addr_map
71     {
72         volatile unsigned int dst_addr      :32;    // rotation src addr
73     } mBits ;
74     volatile unsigned int dwValue ;
75 } ROTATION_DST_ADDR_U;
76
77
78 typedef union _rotation_img_size_tag
79 {
80     struct _rotation_img_size_map
81     {
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
86     } mBits;
87     volatile unsigned int dwValue;
88 } ROTATION_IMG_SIZE_U;
89
90 typedef union _rotation_ctrl_tag
91 {
92     struct _rotation_ctrl_map
93     {
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
98     } mBits;
99     volatile unsigned int dValue;
100 } ROTATION_CTRL_U;
101
102 typedef union _rotation_dma_chn_cfg0_tag
103 {
104     struct _rotation_dma_chn_cfg0_map
105     {
106         volatile unsigned int dma_chn_cfg0          :32;
107     } mBits;
108     volatile unsigned int dwValue;
109 } ROTATION_DMA_CHN_CFG0_U;
110
111 typedef union _rotation_dma_chn_cfg1_tag
112 {
113     struct _rotation_dma_chn_cfg1_map
114     {
115         volatile unsigned int dma_chn_cfg1          :32;
116     } mBits;
117     volatile unsigned int dwValue;
118 } ROTATION_DMA_CHN_CFG1_U;
119
120 typedef union _rotation_dma_src_addr_tag
121 {
122     struct _rotation_dma_src_addr_map
123     {
124         volatile unsigned int dma_src_addr          :32;
125     } mBits;
126     volatile unsigned int dwValue;
127 } ROTATION_DMA_SRC_ADDR_U;
128
129 typedef union _rotation_dma_dst_addr_tag
130 {
131     struct _rotation_dma_dst_addr_map
132     {
133         volatile unsigned int dma_dst_addr          :32;
134     } mBits;
135     volatile unsigned int dwValue;
136 } ROTATION_DMA_DST_ADDR_U;
137
138 typedef union _rotation_dma_chn_llptr_tag
139 {
140     struct _rotation_dma_chn_llptr_map
141     {
142         volatile unsigned int dma_chn_llptr         :32;
143     } mBits;
144     volatile unsigned int dwValue;
145 } ROTATION_DMA_CHN_LLPTR_U;
146
147 typedef union _rotation_dma_chn_sdi_tag
148 {
149     struct _rotation_dma_chn_sdi_map
150     {
151         volatile unsigned int dma_chn_sdi           :32;
152     } mBits;
153     volatile unsigned int dwValue;
154 } ROTATION_DMA_CHN_SDI_U;
155
156 typedef union _rotation_dma_chn_sbi_tag
157 {
158     struct _rotation_dma_chn_sbi_map
159     {
160         volatile unsigned int dma_chn_sbi           :32;
161     } mBits;
162     volatile unsigned int dwValue;
163 } ROTATION_DMA_CHN_SBI_U;
164
165 typedef union _rotation_dma_chn_dbi_tag
166 {
167     struct _rotation_dma_chn_dbi_map
168     {
169         volatile unsigned int dma_chn_dbi           :32;
170     } mBits;
171     volatile unsigned int dwValue;
172 } ROTATION_DMA_CHN_DBI_U;
173
174 /**----------------------------------------------------------------------------*
175 **                         Compiler Flag                                      **
176 **----------------------------------------------------------------------------*/
177 #ifdef   __cplusplus
178 }
179 #endif
180 /**---------------------------------------------------------------------------*/
181 #endif
182 // End
183