tizen 2.4 release
[kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8800g / lcm_reg_v3.h
1 /******************************************************************************
2  ** File Name:    lcm_v3_reg.h                                           *
3  ** Author:       Jianping.Wang                                               *
4  ** DATE:         01/21/2006                                                  *
5  ** Copyright:    2006 Spreatrum, Incoporated. All Rights Reserved.           *
6  ** Description:                                                              *
7  ******************************************************************************/
8 /******************************************************************************
9  **                   Edit    History                                         *
10  **---------------------------------------------------------------------------*
11  ** DATE          NAME            DESCRIPTION                                 *
12  ** 01/21/2006    Jianping.Wang   Create.                                     *
13  ******************************************************************************/
14 #ifndef _LCM_V3_REG_H_
15 #define _LCM_V3_REG_H_
16 /*----------------------------------------------------------------------------*
17  **                          Dependencies                                     *
18  **---------------------------------------------------------------------------*/
19
20 /**---------------------------------------------------------------------------*
21  **                          Compiler Flag                                    *
22  **---------------------------------------------------------------------------*/
23 #ifdef   __cplusplus
24 extern   "C"
25 {
26 #endif
27 /**---------------------------------------------------------------------------*
28 **                               Macro Define                                **
29 **----------------------------------------------------------------------------*/
30
31 #define LCM_CTRL                 (LCM_REG_BASE)
32 #define LCM_PARAMETER0           (LCM_REG_BASE + 0x04)
33 #define LCM_PARAMETER1           (LCM_REG_BASE + 0x08)
34 #define LCM_IFMODE               (LCM_REG_BASE + 0x0c)
35 #define LCM_RGBMODE              (LCM_REG_BASE + 0x10)
36 #define LCM_RDDATA               (LCM_REG_BASE + 0x14)
37 #define LCM_STATUS               (LCM_REG_BASE + 0x18)
38 #define LCM_RSTN                 (LCM_REG_BASE + 0x1c)
39 #define LCM_CD0                  (LCM_REG_BASE + 0x40)
40 #define LCM_DATA0                (LCM_REG_BASE + 0x44)
41 #define LCM_CD1                  (LCM_REG_BASE + 0x50)
42 #define LCM_DATA1                (LCM_REG_BASE + 0x54)
43
44
45
46 /**---------------------------------------------------------------------------*
47 **                               Data Prototypt                              **
48 **----------------------------------------------------------------------------*/
49 typedef union _lcm_ctrl_tag
50 {
51     struct _lcm_ctrl_map
52     {
53 #if defined(CHIP_ENDIAN_LITTLE) && !defined (_BIG_ENDIAN)
54         volatile  uint   trans_num      :20;//[19:0]
55         volatile  uint   cd_sel         :6;//[25:20]
56         volatile  uint   dev_id         :3;//[28:26]
57         volatile  uint   reserved       :3;//Reserved
58 #else
59         volatile  uint   reserved       :3;//Reserved
60         volatile  uint   dev_id         :3;//[28:26]
61         volatile  uint   cd_sel         :6;//[25:20]
62         volatile  uint   trans_num      :20;//[19:0]
63 #endif
64     } mBits;
65     volatile  uint   dwValue;
66 } LCM_CTRL_U;
67
68 typedef union _lcm_parameter0_tag
69 {
70     struct _lcm_paramter0_map
71     {
72 #if defined(CHIP_ENDIAN_LITTLE) && !defined (_BIG_ENDIAN)
73         volatile  uint   whpw           :4;
74         volatile  uint   wlpw           :4;
75         volatile  uint   wcss           :2;
76         volatile  uint   rhpw           :4;
77         volatile  uint   rlpw           :4;
78         volatile  uint   rcss           :2;
79         volatile  uint   reserved       :12;//Reserved
80 #else
81         volatile  uint   reserved       :12;//Reserved
82         volatile  uint   rcss           :2;
83         volatile  uint   rlpw           :4;
84         volatile  uint   rhpw           :4;
85         volatile  uint   wcss           :2;
86         volatile  uint   wlpw           :4;
87         volatile  uint   whpw           :4;
88 #endif
89     } mBits;
90     volatile  uint   dwValue;
91 } LCM_PARAMTER0_U;
92
93 typedef union _lcm_parameter1_tag
94 {
95     struct _lcm_paramter1_map
96     {
97 #if defined(CHIP_ENDIAN_LITTLE) && !defined (_BIG_ENDIAN)
98         volatile  uint   whpw           :4;
99         volatile  uint   wlpw           :4;
100         volatile  uint   wcss           :2;
101         volatile  uint   rhpw           :4;
102         volatile  uint   rlpw           :4;
103         volatile  uint   rcss           :2;
104         volatile  uint   reserved       :12;//Reserved
105 #else
106         volatile  uint   reserved       :12;//Reserved
107         volatile  uint   rcss           :2;
108         volatile  uint   rlpw           :4;
109         volatile  uint   rhpw           :4;
110         volatile  uint   wcss           :2;
111         volatile  uint   wlpw           :4;
112         volatile  uint   whpw           :4;
113 #endif
114     } mBits;
115     volatile  uint   dwValue;
116 } LCM_PARAMTER1_U;
117
118 typedef union _lcm_rstn_tag
119 {
120     struct _lcm_rstn_map
121     {
122 #if defined(CHIP_ENDIAN_LITTLE) && !defined (_BIG_ENDIAN)
123         volatile  uint   rstn           :1;
124         volatile  uint   reserved       :31;//Reserved
125 #else
126         volatile  uint   reserved       :31;//Reserved
127         volatile  uint   rstn           :1;
128 #endif
129     } mBits;
130     volatile  uint   dwValue;
131 } LCM_RSTN_U;
132
133
134
135 typedef union _lcm_rddata_tag
136 {
137     struct _lcm_rddata_map
138     {
139         volatile  uint   rd_data        :32;
140     } mBits;
141     volatile  uint   dValue;
142 } LCM_RDDATA_U;
143
144 typedef union _lcm_status_tag
145 {
146     struct _lcm_status_map
147     {
148 #if defined(CHIP_ENDIAN_LITTLE) && !defined (_BIG_ENDIAN)
149         volatile  uint   busy           :1;
150         volatile  uint   fifo_full      :1;
151         volatile  uint   fifo_empty     :1;
152         volatile  uint   reserved2      :5;//Reserved
153         volatile  uint   remain         :20;//Reserved
154         volatile  uint   reserved1      :4;//Reserved
155 #else
156         volatile  uint   reserved1      :4;//Reserved
157         volatile  uint   remain         :20;//Reserved
158         volatile  uint   reserved2      :5;//Reserved
159         volatile  uint   fifo_empty     :1;
160         volatile  uint   fifo_full      :1;
161         volatile  uint   busy           :1;
162 #endif
163     } mBits;
164     volatile  uint   dValue;
165 } LCM_STATUS_U;
166
167 typedef union _lcm_rgbmode_tag
168 {
169     struct _lcm_rgbmode_map
170     {
171 #if defined(CHIP_ENDIAN_LITTLE) && !defined (_BIG_ENDIAN)
172         volatile  uint   lcm_bits0      :2;
173         volatile  uint   lcm_bits1      :2;
174         volatile  uint   reserved       :28;//Reserved
175 #else
176         volatile  uint   reserved       :28;//Reserved
177         volatile  uint   lcm_bits1      :2;
178         volatile  uint   lcm_bits0      :2;
179 #endif
180     } mBits;
181     volatile  uint   dwValue;
182 } LCM_RGBMODE_U;
183
184
185 /**----------------------------------------------------------------------------*
186 **                         Compiler Flag                                      **
187 **----------------------------------------------------------------------------*/
188 #ifdef   __cplusplus
189 }
190 #endif
191 /**---------------------------------------------------------------------------*/
192 #endif
193 // End
194
195
196
197