tizen 2.4 release
[kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8800g / emc_reg_v3.h
1 /******************************************************************************
2  ** File Name:    emc_reg_v3.h                                           *
3  ** Author:       haiyang.hu                                                  *
4  ** DATE:         05/31/2009                                                  *
5  ** Copyright:    2009 Spreatrum, Incoporated. All Rights Reserved.           *
6  ** Description:                                                              *
7  ******************************************************************************/
8 /******************************************************************************
9  **                   Edit    History                                         *
10  **---------------------------------------------------------------------------*
11  ** DATE          NAME            DESCRIPTION                                 *
12  ** 06/15/2007    Daniel.Ding     Create.                                     *
13  ** 05/07/2010    Mingwei.zhang   Modify it for SC8800G.                      *
14  ******************************************************************************/
15 #ifndef _EMC_REG_V3_H_
16 #define _EMC_REG_V3_H_
17 /*----------------------------------------------------------------------------*
18  **                         Dependencies                                      *
19  **-------------------------------------------------------------------------- */
20
21 /**---------------------------------------------------------------------------*
22  **                             Compiler Flag                                 *
23  **---------------------------------------------------------------------------*/
24 #ifdef   __cplusplus
25 extern   "C"
26 {
27 #endif
28 /**----------------------------------------------------------------------------*
29 **                               Micro Define                                 **
30 **----------------------------------------------------------------------------*/
31 #define BIT_RANGE(_bit_h,_bit_l)        ((_bit_h)-(_bit_l)+1)
32
33 /*----------external memory cotnrol registers----------*/
34
35 #define EXT_MEM_CFG0                    (EXT_MEM_CTL_BASE + 0x0000)
36 #define EXT_MEM_CFG1                    (EXT_MEM_CTL_BASE + 0x0004)
37 //temp for nor_fdl and driver_export and asm_cvt
38 #define EXT_MEM_CTL0                    (EXT_MEM_CTL_BASE + 0x0000)
39 #define EXT_MEM_CTL1                    (EXT_MEM_CTL_BASE + 0x0004)
40
41 #define EMC_REG_STS0_ADDR           (EXT_MEM_CTL_BASE + 0x0008)
42
43 #define EXT_MEM_CFG0_CS0               (EXT_MEM_CTL_BASE + 0x0010)
44 #define EXT_MEM_CFG0_CS1               (EXT_MEM_CTL_BASE + 0x0014)
45 #define EXT_MEM_CFG0_CS2               (EXT_MEM_CTL_BASE + 0x0018)
46 #define EXT_MEM_CFG0_CS3               (EXT_MEM_CTL_BASE + 0x001c)
47
48 #define EXT_MEM_INI                     (EXT_MEM_CTL_BASE + 0x0020)
49
50 #define EXT_MEM_CFG0_CH0               (EXT_MEM_CTL_BASE + 0x0030)
51 #define EXT_MEM_CFG0_CH1               (EXT_MEM_CTL_BASE + 0x0034)
52 #define EXT_MEM_CFG0_CH2               (EXT_MEM_CTL_BASE + 0x0038)
53 #define EXT_MEM_CFG0_CH3               (EXT_MEM_CTL_BASE + 0x003c)
54 #define EXT_MEM_CFG0_CH4               (EXT_MEM_CTL_BASE + 0x0040)
55 #define EXT_MEM_CFG0_CH5               (EXT_MEM_CTL_BASE + 0x0044)
56 #define EXT_MEM_CFG0_CH6               (EXT_MEM_CTL_BASE + 0x0048)
57 #define EXT_MEM_CFG0_CH7               (EXT_MEM_CTL_BASE + 0x004c)
58 #define EXT_MEM_CFG0_CH8               (EXT_MEM_CTL_BASE + 0x0050)
59 #define EXT_MEM_CFG0_CH9               (EXT_MEM_CTL_BASE + 0x0054)
60 #define EXT_MEM_CFG0_CH10              (EXT_MEM_CTL_BASE + 0x0058)
61 #define EXT_MEM_CFG0_CH11              (EXT_MEM_CTL_BASE + 0x005c)
62 #define EXT_MEM_CFG0_CH12              (EXT_MEM_CTL_BASE + 0x0060)
63 #define EXT_MEM_CFG0_CH13              (EXT_MEM_CTL_BASE + 0x0064)
64 #define EXT_MEM_CFG0_CH14              (EXT_MEM_CTL_BASE + 0x0068)
65 #define EXT_MEM_CFG0_CH15              (EXT_MEM_CTL_BASE + 0x006c)
66
67
68 #define EXT_MEM_STS2                    (EXT_MEM_CTL_BASE + 0x0078)
69 #define EXT_MEM_STS3                    (EXT_MEM_CTL_BASE + 0x007c)
70
71
72
73 #define EXT_MEM_DL0                     (EXT_MEM_CTL_BASE + 0x00c0)
74 #define EXT_MEM_DL1                     (EXT_MEM_CTL_BASE + 0x00c4)
75 #define EXT_MEM_DL2                     (EXT_MEM_CTL_BASE + 0x00c8)
76 #define EXT_MEM_DL3                     (EXT_MEM_CTL_BASE + 0x00cC)
77 #define EXT_MEM_DL4                     (EXT_MEM_CTL_BASE + 0x00d0)
78 #define EXT_MEM_DL5                     (EXT_MEM_CTL_BASE + 0x00d4)
79 #define EXT_MEM_DL6                     (EXT_MEM_CTL_BASE + 0x00d8)
80 #define EXT_MEM_DL7                     (EXT_MEM_CTL_BASE + 0x00dC)
81
82 #define EXT_MEM_DL16                    (EXT_MEM_CTL_BASE + 0x0100)
83 #define EXT_MEM_DL17                    (EXT_MEM_CTL_BASE + 0x0104)
84 #define EXT_MEM_DL18                    (EXT_MEM_CTL_BASE + 0x0108)
85 #define EXT_MEM_DL19                    (EXT_MEM_CTL_BASE + 0x010C)
86 #define EXT_MEM_DL20                    (EXT_MEM_CTL_BASE + 0x0110)
87 #define EXT_MEM_DL21                    (EXT_MEM_CTL_BASE + 0x0114)
88 #define EXT_MEM_DL22                    (EXT_MEM_CTL_BASE + 0x0118)
89 #define EXT_MEM_DL23                    (EXT_MEM_CTL_BASE + 0x011c)
90 #define EXT_MEM_DL24                    (EXT_MEM_CTL_BASE + 0x0120)
91 #define EXT_MEM_DL25                    (EXT_MEM_CTL_BASE + 0x0124)
92 #define EXT_MEM_DL26                    (EXT_MEM_CTL_BASE + 0x0128)
93 #define EXT_MEM_DL27                    (EXT_MEM_CTL_BASE + 0x012c)
94
95
96
97 #define EXT_MEM_DCFG0                   (EXT_MEM_CTL_BASE + 0x0140)
98 #define EXT_MEM_DCFG1                   (EXT_MEM_CTL_BASE + 0x0144)
99 #define EXT_MEM_DCFG2                   (EXT_MEM_CTL_BASE + 0x0148)
100 #define EXT_MEM_DCFG3                   (EXT_MEM_CTL_BASE + 0x014c)
101 #define EXT_MEM_DCFG4                   (EXT_MEM_CTL_BASE + 0x0150)
102 #define EXT_MEM_DCFG5                   (EXT_MEM_CTL_BASE + 0x0154)
103 #define EXT_MEM_DCFG6                   (EXT_MEM_CTL_BASE + 0x0158)
104 #define EXT_MEM_DCFG7                   (EXT_MEM_CTL_BASE + 0x015c)
105
106
107
108 #define EXT_MEM_SCFG0                   (EXT_MEM_CTL_BASE + 0x0170)
109 #define EXT_MEM_SCFG1                   (EXT_MEM_CTL_BASE + 0x0174)
110
111 #define EXT_MEM_SCFG0_CS0               (EXT_MEM_CTL_BASE + 0x0180)
112 #define EXT_MEM_SCFG0_CS1               (EXT_MEM_CTL_BASE + 0x0190)
113 #define EXT_MEM_SCFG0_CS2               (EXT_MEM_CTL_BASE + 0x01A0)
114 #define EXT_MEM_SCFG0_CS3               (EXT_MEM_CTL_BASE + 0x01B0)
115
116 #define EXT_MEM_SCFG1_CS0               (EXT_MEM_CTL_BASE + 0x0184)
117 #define EXT_MEM_SCFG1_CS1               (EXT_MEM_CTL_BASE + 0x0194)
118 #define EXT_MEM_SCFG1_CS2               (EXT_MEM_CTL_BASE + 0x01A4)
119 #define EXT_MEM_SCFG1_CS3               (EXT_MEM_CTL_BASE + 0x01B4)
120
121 #define EXT_MEM_SCFG2_CS0               (EXT_MEM_CTL_BASE + 0x0188)
122 #define EXT_MEM_SCFG2_CS1               (EXT_MEM_CTL_BASE + 0x0198)
123 #define EXT_MEM_SCFG2_CS2               (EXT_MEM_CTL_BASE + 0x01A8)
124 #define EXT_MEM_SCFG2_CS3               (EXT_MEM_CTL_BASE + 0x01B8)
125
126 #define EXT_MEM_SCFG3_CS0               (EXT_MEM_CTL_BASE + 0x018C)
127 #define EXT_MEM_SCFG3_CS1               (EXT_MEM_CTL_BASE + 0x019C)
128 #define EXT_MEM_SCFG3_CS2               (EXT_MEM_CTL_BASE + 0x01AC)
129 #define EXT_MEM_SCFG3_CS3               (EXT_MEM_CTL_BASE + 0x01BC)
130
131 #define EMC_REG_CFG0_BASE_VALUE     (0x00000141)
132 #define EMC_REG_CFG1_BASE_VALUE     (0x0000000C)
133 #define EMC_REG_SCFG0_BASE_VALUE    (0x00FF0000)
134 #define EMC_REG_SCFG1_BASE_VALUE    (0x00001111)
135 #define EMC_REG_CS_CFG_BASE_VALUE   (0x00000000)
136 #define EMC_REG_CS_SCFG0_BASE_VALUE (0x00100030)
137 #define EMC_REG_CS_SCFG1_BASE_VALUE (0x00007F7F)
138 #define EMC_REG_CS_SCFG2_BASE_VALUE (0x00A0744F)
139 #define EMC_REG_CS_SCFG3_BASE_VALUE (0x01224112)
140 #define EMC_CS_ADDR_SIZE                (0x4000000)
141 #define EMC_DELAY_IN_CHIP               (10)
142 #define EMC_CLK_MAX                 (192)    /*MHZ*/
143 #define EMC_CS_NUM_MAX_SUPPORT      (EMC_CS4)   /*3 is temp code for iram limit */
144
145
146 /**----------------------------------------------------------------------------*
147 **                             Data Prototype                                 **
148 **----------------------------------------------------------------------------*/
149 #if defined(CHIP_ENDIAN_LITTLE)
150 typedef union
151 {
152     struct
153     {
154 volatile  uint   mode_r             :
155         BIT_RANGE (1,0);
156 volatile  uint   mode_w             :
157         BIT_RANGE (3,2);
158 volatile  uint   single_split_r     :
159         BIT_RANGE (4,4);
160 volatile  uint   single_split_w     :
161         BIT_RANGE (5,5);
162 volatile  uint   clk_mode           :
163         BIT_RANGE (6,6);
164 volatile  uint   reserved1          :
165         BIT_RANGE (11,7);
166 volatile  uint   wait_en_r          :
167         BIT_RANGE (12,12);
168 volatile  uint   wait_en_w          :
169         BIT_RANGE (13,13);
170 volatile  uint   wait_pol           :
171         BIT_RANGE (14,14);
172 volatile  uint   cre_pol            :
173         BIT_RANGE (15,15);
174 volatile  uint   cre_mode           :
175         BIT_RANGE (16,16);
176 volatile  uint   cre_en             :
177         BIT_RANGE (17,17);
178 volatile  uint   row_detect_en_r    :
179         BIT_RANGE (18,18);
180 volatile  uint   row_detect_en_w    :
181         BIT_RANGE (19,19);
182 volatile  uint   row_length         :
183         BIT_RANGE (22,20);
184 volatile  uint   admux_en           :
185         BIT_RANGE (23,23);
186 volatile  uint   reserved2          :
187         BIT_RANGE (31,24);
188     } bits_map;
189     volatile  uint32   reg_value;
190 } EMC_REG_CS_SCFG0;
191
192 typedef union
193 {
194     struct
195     {
196 volatile  uint   t_first_r          :
197         BIT_RANGE (3,0);
198 volatile  uint   t_next_r           :
199         BIT_RANGE (6,4);
200 volatile  uint   reserved1          :
201         BIT_RANGE (7,7);
202 volatile  uint   t_first_w          :
203         BIT_RANGE (11,8);
204 volatile  uint   t_next_w           :
205         BIT_RANGE (14,12);
206 volatile  uint   reserved2          :
207         BIT_RANGE (31,15);
208     } bits_map;
209     volatile  uint32   reg_value;
210 } EMC_REG_CS_SCFG1;
211
212 typedef union
213 {
214     struct
215     {
216 volatile  uint   t_adswt_r          :
217         BIT_RANGE (1,0);
218 volatile  uint   t_adswt_w          :
219         BIT_RANGE (3,2);
220 volatile  uint   t_oe_stp_r         :
221         BIT_RANGE (6,4);
222 volatile  uint   reserved1          :
223         BIT_RANGE (7,7);
224 volatile  uint   t_we_stp_w         :
225         BIT_RANGE (10,8);
226 volatile  uint   reserved2          :
227         BIT_RANGE (11,11);
228 volatile  uint   t_we_wdt_w         :
229         BIT_RANGE (15,12);
230 volatile  uint   t_ce_stp_r         :
231         BIT_RANGE (16,16);
232 volatile  uint   t_ce_stp_w         :
233         BIT_RANGE (17,17);
234 volatile  uint   t_adv_stp_r        :
235         BIT_RANGE (18,18);
236 volatile  uint   t_adv_stp_w        :
237         BIT_RANGE (19,19);
238 volatile  uint   t_adv_wdt_r        :
239         BIT_RANGE (21,20);
240 volatile  uint   t_adv_wdt_w        :
241         BIT_RANGE (23,22);
242 volatile  uint   t_adv_mode_r       :
243         BIT_RANGE (24,24);
244 volatile  uint   t_adv_mode_w       :
245         BIT_RANGE (25,25);
246 volatile  uint   reserved3          :
247         BIT_RANGE (31,26);
248     } bits_map;
249     volatile  uint32   reg_value;
250 } EMC_REG_CS_SCFG2;
251
252 typedef union
253 {
254     struct
255     {
256 volatile  uint   t_sample_stp       :
257         BIT_RANGE (3,0);
258 volatile  uint   t_sample_dly_r     :
259         BIT_RANGE (6,4);
260 volatile  uint   t_sample_phase_r   :
261         BIT_RANGE (7,7);
262 volatile  uint   t_sample_dly_w     :
263         BIT_RANGE (10,8);
264 volatile  uint   t_sample_phase_w   :
265         BIT_RANGE (11,11);
266 volatile  uint   t_wait_ie_stp      :
267         BIT_RANGE (15,12);
268 volatile  uint   t_wait_mask_dly_r  :
269         BIT_RANGE (18,16);
270 volatile  uint   reserved1          :
271         BIT_RANGE (19,19);
272 volatile  uint   t_wait_mask_dly_w  :
273         BIT_RANGE (22,20);
274 volatile  uint   reserved2          :
275         BIT_RANGE (23,23);
276 volatile  uint   t_wait_dly_r       :
277         BIT_RANGE (25,24);
278 volatile  uint   t_wait_dly_w       :
279         BIT_RANGE (27,26);
280 volatile  uint   t_valid_phase_r    :
281         BIT_RANGE (29,28);
282 volatile  uint   t_valid_phase_w    :
283         BIT_RANGE (31,30);
284     } bits_map;
285     volatile  uint32   reg_value;
286 } EMC_REG_CS_SCFG3;
287
288 typedef union
289 {
290     struct
291     {
292 volatile  uint   hburst_ren         :
293         BIT_RANGE (0,0);
294 volatile  uint   hburst_wen         :
295         BIT_RANGE (1,1);
296 volatile  uint   dburst_rmode       :
297         BIT_RANGE (2,2);
298 volatile  uint   dburst_wmode       :
299         BIT_RANGE (3,3);
300 volatile  uint   dburst_rlength     :
301         BIT_RANGE (6,4);
302 volatile  uint   reserved1          :
303         BIT_RANGE (7,7);
304 volatile  uint   dburst_wlength     :
305         BIT_RANGE (10,8);
306 volatile  uint   reserved2          :
307         BIT_RANGE (11,11);
308 volatile  uint   mem_sel            :
309         BIT_RANGE (12,12);
310 volatile  uint   reserved3          :
311         BIT_RANGE (31,13);
312     } bits_map;
313     volatile  uint32   reg_value;
314 } EMC_REG_CS_CFG;
315
316 typedef union
317 {
318     struct
319     {
320 volatile  uint   clksmem0_out_en        :
321         BIT_RANGE (0,0);
322 volatile  uint   clksmem1_out_en        :
323         BIT_RANGE (1,1);
324 volatile  uint   clksmem0_out_mode      :
325         BIT_RANGE (2,2);
326 volatile  uint   clksmem1_out_mode      :
327         BIT_RANGE (3,3);
328 volatile  uint   clksmem0_out_sel       :
329         BIT_RANGE (5,4);
330 volatile  uint   clksmem1_out_sel       :
331         BIT_RANGE (7,6);
332 volatile  uint   clksmem0_out_pol       :
333         BIT_RANGE (8,8);
334 volatile  uint   clksmem1_out_pol       :
335         BIT_RANGE (9,9);
336 volatile  uint   clksmem0_out_gate_en   :
337         BIT_RANGE (10,10);
338 volatile  uint   clksmem1_out_gate_en   :
339         BIT_RANGE (11,11);
340 volatile  uint   clksmem0_out_gate_mode :
341         BIT_RANGE (12,12);
342 volatile  uint   clksmem1_out_gate_mode :
343         BIT_RANGE (13,13);
344 volatile  uint   sample_auto_rst_en     :
345         BIT_RANGE (14,14);
346 volatile  uint   sample_rst             :
347         BIT_RANGE (15,15);
348 volatile  uint   wait_timeout_thr       :
349         BIT_RANGE (23,16);
350 volatile  uint   wait_timeout_en        :
351         BIT_RANGE (24,24);
352 volatile  uint   smem_wait_timeout_reg  :
353         BIT_RANGE (25,25);
354 volatile  uint   reserved               :
355         BIT_RANGE (31,26);
356     } bits_map;
357     volatile  uint32   reg_value;
358 } EMC_REG_SCFG0;
359 #else   //big endian
360 typedef union
361 {
362     struct
363     {
364 volatile  uint   reserved2          :
365         BIT_RANGE (31,24);
366 volatile  uint   admux_en           :
367         BIT_RANGE (23,23);
368 volatile  uint   row_length         :
369         BIT_RANGE (22,20);
370 volatile  uint   row_detect_en_w    :
371         BIT_RANGE (19,19);
372 volatile  uint   row_detect_en_r    :
373         BIT_RANGE (18,18);
374 volatile  uint   cre_en             :
375         BIT_RANGE (17,17);
376 volatile  uint   cre_mode           :
377         BIT_RANGE (16,16);
378 volatile  uint   cre_pol            :
379         BIT_RANGE (15,15);
380 volatile  uint   wait_pol           :
381         BIT_RANGE (14,14);
382 volatile  uint   wait_en_w          :
383         BIT_RANGE (13,13);
384 volatile  uint   wait_en_r          :
385         BIT_RANGE (12,12);
386 volatile  uint   reserved1          :
387         BIT_RANGE (11,7);
388 volatile  uint   clk_mode           :
389         BIT_RANGE (6,6);
390 volatile  uint   single_split_w     :
391         BIT_RANGE (5,5);
392 volatile  uint   single_split_r     :
393         BIT_RANGE (4,4);
394 volatile  uint   mode_w             :
395         BIT_RANGE (3,2);
396 volatile  uint   mode_r             :
397         BIT_RANGE (1,0);
398     } bits_map;
399     volatile  uint32   reg_value;
400 } EMC_REG_CS_SCFG0;
401
402 typedef union
403 {
404     struct
405     {
406 volatile  uint   reserved2          :
407         BIT_RANGE (31,15);
408 volatile  uint   t_next_w           :
409         BIT_RANGE (14,12);
410 volatile  uint   t_first_w          :
411         BIT_RANGE (11,8);
412 volatile  uint   reserved1          :
413         BIT_RANGE (7,7);
414 volatile  uint   t_next_r           :
415         BIT_RANGE (6,4);
416 volatile  uint   t_first_r          :
417         BIT_RANGE (3,0);
418     } bits_map;
419     volatile  uint32   reg_value;
420 } EMC_REG_CS_SCFG1;
421
422 typedef union
423 {
424     struct
425     {
426 volatile  uint   reserved3          :
427         BIT_RANGE (31,26);
428 volatile  uint   t_adv_mode_w       :
429         BIT_RANGE (25,25);
430 volatile  uint   t_adv_mode_r       :
431         BIT_RANGE (24,24);
432 volatile  uint   t_adv_wdt_w        :
433         BIT_RANGE (23,22);
434 volatile  uint   t_adv_wdt_r        :
435         BIT_RANGE (21,20);
436 volatile  uint   t_adv_stp_w        :
437         BIT_RANGE (19,19);
438 volatile  uint   t_adv_stp_r        :
439         BIT_RANGE (18,18);
440 volatile  uint   t_ce_stp_w         :
441         BIT_RANGE (17,17);
442 volatile  uint   t_ce_stp_r         :
443         BIT_RANGE (16,16);
444 volatile  uint   t_we_wdt_w         :
445         BIT_RANGE (15,12);
446 volatile  uint   reserved2          :
447         BIT_RANGE (11,11);
448 volatile  uint   t_we_stp_w         :
449         BIT_RANGE (10,8);
450 volatile  uint   reserved1          :
451         BIT_RANGE (7,7);
452 volatile  uint   t_oe_stp_r         :
453         BIT_RANGE (6,4);
454 volatile  uint   t_adswt_w          :
455         BIT_RANGE (3,2);
456 volatile  uint   t_adswt_r          :
457         BIT_RANGE (1,0);
458     } bits_map;
459     volatile  uint32   reg_value;
460 } EMC_REG_CS_SCFG2;
461
462 typedef union
463 {
464     struct
465     {
466 volatile  uint   t_valid_phase_w    :
467         BIT_RANGE (31,30);
468 volatile  uint   t_valid_phase_r    :
469         BIT_RANGE (29,28);
470 volatile  uint   t_wait_dly_w       :
471         BIT_RANGE (27,26);
472 volatile  uint   t_wait_dly_r       :
473         BIT_RANGE (25,24);
474 volatile  uint   reserved2          :
475         BIT_RANGE (23,23);
476 volatile  uint   t_wait_mask_dly_w  :
477         BIT_RANGE (22,20);
478 volatile  uint   reserved1          :
479         BIT_RANGE (19,19);
480 volatile  uint   t_wait_mask_dly_r  :
481         BIT_RANGE (18,16);
482 volatile  uint   t_wait_ie_stp      :
483         BIT_RANGE (15,12);
484 volatile  uint   t_sample_phase_w   :
485         BIT_RANGE (11,11);
486 volatile  uint   t_sample_dly_w     :
487         BIT_RANGE (10,8);
488 volatile  uint   t_sample_phase_r   :
489         BIT_RANGE (7,7);
490 volatile  uint   t_sample_dly_r     :
491         BIT_RANGE (6,4);
492 volatile  uint   t_sample_stp       :
493         BIT_RANGE (3,0);
494     } bits_map;
495     volatile  uint32   reg_value;
496 } EMC_REG_CS_SCFG3;
497
498 typedef union
499 {
500     struct
501     {
502 volatile  uint   reserved3          :
503         BIT_RANGE (31,13);
504 volatile  uint   mem_sel            :
505         BIT_RANGE (12,12);
506 volatile  uint   reserved2          :
507         BIT_RANGE (11,11);
508 volatile  uint   dburst_wlength     :
509         BIT_RANGE (10,8);
510 volatile  uint   reserved1          :
511         BIT_RANGE (7,7);
512 volatile  uint   dburst_rlength     :
513         BIT_RANGE (6,4);
514 volatile  uint   dburst_wmode       :
515         BIT_RANGE (3,3);
516 volatile  uint   dburst_rmode       :
517         BIT_RANGE (2,2);
518 volatile  uint   hburst_wen         :
519         BIT_RANGE (1,1);
520 volatile  uint   hburst_ren         :
521         BIT_RANGE (0,0);
522     } bits_map;
523     volatile  uint32   reg_value;
524 } EMC_REG_CS_CFG;
525
526 typedef union
527 {
528     struct
529     {
530 volatile  uint   reserved           :
531         BIT_RANGE (31,26);
532 volatile  uint   smem_wait_timeout_reg      :
533         BIT_RANGE (25,25);
534 volatile  uint   wait_timeout_en            :
535         BIT_RANGE (24,24);
536 volatile  uint   wait_timeout_thr       :
537         BIT_RANGE (23,16);
538 volatile  uint   sample_rst     :
539         BIT_RANGE (15,15);
540 volatile  uint   sample_auto_rst_en     :
541         BIT_RANGE (14,14);
542 volatile  uint   clksmem1_out_gate_mode         :
543         BIT_RANGE (13,13);
544 volatile  uint   clksmem0_out_gate_mode         :
545         BIT_RANGE (12,12);
546 volatile  uint   clksmem1_out_gate_en           :
547         BIT_RANGE (11,11);
548 volatile  uint   clksmem0_out_gate_en           :
549         BIT_RANGE (10,10);
550 volatile  uint   clksmem1_out_pol           :
551         BIT_RANGE (9,9);
552 volatile  uint   clksmem0_out_pol       :
553         BIT_RANGE (8,8);
554 volatile  uint   clksmem1_out_sel           :
555         BIT_RANGE (7,6);
556 volatile  uint   clksmem0_out_sel       :
557         BIT_RANGE (5,4);
558 volatile  uint   clksmem1_out_mode      :
559         BIT_RANGE (3,3);
560 volatile  uint   clksmem0_out_mode      :
561         BIT_RANGE (2,2);
562 volatile  uint   clksmem1_out_en            :
563         BIT_RANGE (1,1);
564 volatile  uint   clksmem0_out_en            :
565         BIT_RANGE (0,0);
566     } bits_map;
567     volatile  uint32   reg_value;
568 } EMC_REG_SCFG0;
569 #endif
570
571 /**----------------------------------------------------------------------------*
572 **                         Local Function Prototype                           **
573 **----------------------------------------------------------------------------*/
574 #define EMC_WAIT_WRITEBUFFER_DONE   while(REG32(EMC_REG_STS0_ADDR) & BIT_0);
575 /**----------------------------------------------------------------------------*
576 **                           Function Prototype                               **
577 **----------------------------------------------------------------------------*/
578
579
580 /**----------------------------------------------------------------------------*
581 **                         Compiler Flag                                      **
582 **----------------------------------------------------------------------------*/
583 #ifdef   __cplusplus
584 }
585 #endif
586 /**---------------------------------------------------------------------------*/
587 #endif //_EMC_REG_V3_H_
588
589