c540e35448641e68e55f3e99d1f6769ac7374112
[profile/mobile/platform/kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-tiger / 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 EMC_T_REF_CLK           6500 //t_ref reference clk, freqency = 6.5mhz
32 #define EMC_DLL_ON_OFF          FALSE
33
34 #define EXT_MEM_CTL_BASE                        0x20000000
35
36
37 #define EXT_MEM_CFG0                    (EXT_MEM_CTL_BASE + 0x0000)
38 #define EXT_MEM_CFG1                    (EXT_MEM_CTL_BASE + 0x0004)
39
40
41 #define EXT_MEM_CFG0_CS0               (EXT_MEM_CTL_BASE + 0x0010)
42 #define EXT_MEM_CFG0_CS1               (EXT_MEM_CTL_BASE + 0x0014)
43 #define EXT_MEM_CFG0_CS2               (EXT_MEM_CTL_BASE + 0x0018)
44 #define EXT_MEM_CFG0_CS3               (EXT_MEM_CTL_BASE + 0x001c)
45
46
47 #define EXT_MEM_CFG0_ACH0               (EXT_MEM_CTL_BASE + 0x0020)
48 #define EXT_MEM_CFG1_ACH0               (EXT_MEM_CTL_BASE + 0x0024)
49 #define EXT_MEM_CFG0_ACH1               (EXT_MEM_CTL_BASE + 0x0028)
50 #define EXT_MEM_CFG1_ACH1               (EXT_MEM_CTL_BASE + 0x002C)
51 #define EXT_MEM_CFG0_HCH2               (EXT_MEM_CTL_BASE + 0x0030)
52 #define EXT_MEM_CFG1_HCH2               (EXT_MEM_CTL_BASE + 0x0034)
53 #define EXT_MEM_CFG0_HCH3               (EXT_MEM_CTL_BASE + 0x0038)
54 #define EXT_MEM_CFG1_HCH3               (EXT_MEM_CTL_BASE + 0x003C)
55 #define EXT_MEM_CFG0_HCH4               (EXT_MEM_CTL_BASE + 0x0040)
56 #define EXT_MEM_CFG1_HCH4               (EXT_MEM_CTL_BASE + 0x0044)
57 #define EXT_MEM_CFG0_HCH5               (EXT_MEM_CTL_BASE + 0x0048)
58 #define EXT_MEM_CFG1_HCH5               (EXT_MEM_CTL_BASE + 0x004C)
59 #define EXT_MEM_CFG0_HCH6               (EXT_MEM_CTL_BASE + 0x0050)
60 #define EXT_MEM_CFG1_HCH6               (EXT_MEM_CTL_BASE + 0x0054)
61 #define EXT_MEM_CFG0_HCH7               (EXT_MEM_CTL_BASE + 0x0058)
62 #define EXT_MEM_CFG1_HCH7               (EXT_MEM_CTL_BASE + 0x005C)
63 #define EXT_MEM_CFG0_HCH8               (EXT_MEM_CTL_BASE + 0x0060)
64 #define EXT_MEM_CFG1_HCH8               (EXT_MEM_CTL_BASE + 0x0064)
65
66 #define EXT_MEM_DL0                     (EXT_MEM_CTL_BASE + 0x0100)
67 #define EXT_MEM_DL1                     (EXT_MEM_CTL_BASE + 0x0104)
68 #define EXT_MEM_DL2                     (EXT_MEM_CTL_BASE + 0x0108)
69 #define EXT_MEM_DL3                     (EXT_MEM_CTL_BASE + 0x010C)
70 #define EXT_MEM_DL4                     (EXT_MEM_CTL_BASE + 0x0110)
71 #define EXT_MEM_DL5                     (EXT_MEM_CTL_BASE + 0x0114)
72 #define EXT_MEM_DL6                     (EXT_MEM_CTL_BASE + 0x0118)
73 #define EXT_MEM_DL7                     (EXT_MEM_CTL_BASE + 0x011C)
74 #define EXT_MEM_DL8                     (EXT_MEM_CTL_BASE + 0x0120)
75 #define EXT_MEM_DL9                     (EXT_MEM_CTL_BASE + 0x0124)
76 #define EXT_MEM_DL10                    (EXT_MEM_CTL_BASE + 0x0128)     
77 #define EXT_MEM_DL11                    (EXT_MEM_CTL_BASE + 0x012c)
78 #define EXT_MEM_DL12                    (EXT_MEM_CTL_BASE + 0x0130)
79 #define EXT_MEM_DL13                    (EXT_MEM_CTL_BASE + 0x0134)
80 #define EXT_MEM_DL14                    (EXT_MEM_CTL_BASE + 0x0138)
81 #define EXT_MEM_DL15                    (EXT_MEM_CTL_BASE + 0x013c)
82 #define EXT_MEM_DL16                    (EXT_MEM_CTL_BASE + 0x0140)
83 #define EXT_MEM_DL17                    (EXT_MEM_CTL_BASE + 0x0144)
84 #define EXT_MEM_DL18                    (EXT_MEM_CTL_BASE + 0x0148)
85 #define EXT_MEM_DL19                    (EXT_MEM_CTL_BASE + 0x014c)     
86
87 #define EXT_MEM_CFG0_DLL            (EXT_MEM_CTL_BASE + 0x0170)         
88
89 #define EXT_MEM_STS3                    (EXT_MEM_CTL_BASE + 0x00AC)
90
91 #define EXT_MEM_DCFG0                   (EXT_MEM_CTL_BASE + 0x0180)
92 #define EXT_MEM_DCFG1                   (EXT_MEM_CTL_BASE + 0x0184)
93 #define EXT_MEM_DCFG2                   (EXT_MEM_CTL_BASE + 0x0188)
94 #define EXT_MEM_DCFG3                   (EXT_MEM_CTL_BASE + 0x018c)
95 #define EXT_MEM_DCFG4                   (EXT_MEM_CTL_BASE + 0x0190)
96 #define EXT_MEM_DCFG5                   (EXT_MEM_CTL_BASE + 0x0194)
97 #define EXT_MEM_DCFG6                   (EXT_MEM_CTL_BASE + 0x0198)
98 #define EXT_MEM_DCFG7                   (EXT_MEM_CTL_BASE + 0x019c)
99 #define EXT_MEM_DCFG8                   (EXT_MEM_CTL_BASE + 0x01A0)
100
101
102
103
104
105
106
107
108 /**----------------------------------------------------------------------------*
109 **                             Data Prototype                                 **
110 **----------------------------------------------------------------------------*/
111 //External Memory Control.
112 typedef struct EMC_CFG_REG_TAG
113 {
114     VOLATILE uint32 cfg0;
115     VOLATILE uint32 cfg1;
116     VOLATILE uint32 cfg0_cs0;
117     VOLATILE uint32 cfg0_cs1;
118     VOLATILE uint32 cfg0_cs2;
119     VOLATILE uint32 cfg0_cs3;
120     VOLATILE uint32 cfg0_ch0;
121     VOLATILE uint32 cfg0_ch1;
122     VOLATILE uint32 cfg0_ch2;
123     VOLATILE uint32 cfg0_ch3;
124     VOLATILE uint32 cfg0_ch4;
125     VOLATILE uint32 cfg0_ch5;
126     VOLATILE uint32 cfg0_ch6;
127     VOLATILE uint32 cfg0_ch7;
128     VOLATILE uint32 cfg0_ch8;
129     VOLATILE uint32 cfg0_ch9;
130     VOLATILE uint32 cfg0_ch10;
131     VOLATILE uint32 cfg0_ch11;
132     VOLATILE uint32 cfg0_ch12;
133     VOLATILE uint32 cfg0_ch13;
134     VOLATILE uint32 cfg0_ch14;
135     VOLATILE uint32 cfg0_ch15;
136 }
137 EMC_CFG_REG_T, *EMC_CFG_REG_T_PTR;
138
139 typedef struct EMC_DCFG_REG_TAG
140 {
141     VOLATILE uint32 dcfg0;
142     VOLATILE uint32 dcfg1;
143     VOLATILE uint32 dcfg2;
144     VOLATILE uint32 dcfg3;
145     VOLATILE uint32 dcfg4;
146     VOLATILE uint32 dcfg5;
147     VOLATILE uint32 dcfg6;
148     VOLATILE uint32 dcfg7;
149 }
150 EMC_DCFG_REG_T, *EMC_DCFG_REG_T_PTR;
151 /**----------------------------------------------------------------------------*
152 **                           Function Prototype                               **
153 **----------------------------------------------------------------------------*/
154
155
156 /**----------------------------------------------------------------------------*
157 **                         Compiler Flag                                      **
158 **----------------------------------------------------------------------------*/
159 #ifdef   __cplusplus
160 }
161 #endif
162 /**---------------------------------------------------------------------------*/
163 #endif //_EMC_REG_V3_H_
164
165