tizen 2.4 release
[kernel/u-boot-tm1.git] / arch / arm / include / asm / arch-sc8830 / chip_x15 / __regs_pub_apb.h
1 /*
2  * Copyright (C) 2014-2015 Spreadtrum Communications Inc.
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  */
10
11 //#ifndef __SCI_GLB_REGS_H__
12 //#error  "Don't include this file directly, Pls include sci_glb_regs.h"
13 //#endif
14
15
16 #ifndef __H_REGS_PUB_APB_HEADFILE_H__
17 #define __H_REGS_PUB_APB_HEADFILE_H__ __FILE__
18
19 #define REGS_PUB_APB
20
21 /* registers definitions for PUB_APB */
22 #define REG_PUB_APB_DMC_PORT_REMAP_EN                     SCI_ADDR(REGS_PUB_APB_BASE, 0x0000)
23 #define REG_PUB_APB_DMC_PORTS_MPU_EN                      SCI_ADDR(REGS_PUB_APB_BASE, 0x0004)
24 #define REG_PUB_APB_DMC_PORT0_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0008)
25 #define REG_PUB_APB_DMC_PORT1_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x000C)
26 #define REG_PUB_APB_DMC_PORT2_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0010)
27 #define REG_PUB_APB_DMC_PORT3_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0014)
28 #define REG_PUB_APB_DMC_PORT4_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0018)
29 #define REG_PUB_APB_DMC_PORT5_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x001C)
30 #define REG_PUB_APB_DMC_PORT6_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0020)
31 #define REG_PUB_APB_DMC_PORT7_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0024)
32 #define REG_PUB_APB_DMC_PORT8_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x0028)
33 #define REG_PUB_APB_DMC_PORT9_ADDR_REMAP                  SCI_ADDR(REGS_PUB_APB_BASE, 0x002C)
34 #define REG_PUB_APB_DMC_PORT0_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0030)
35 #define REG_PUB_APB_DMC_PORT1_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0034)
36 #define REG_PUB_APB_DMC_PORT2_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0038)
37 #define REG_PUB_APB_DMC_PORT3_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x003C)
38 #define REG_PUB_APB_DMC_PORT4_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0040)
39 #define REG_PUB_APB_DMC_PORT5_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0044)
40 #define REG_PUB_APB_DMC_PORT6_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0048)
41 #define REG_PUB_APB_DMC_PORT7_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0050)
42 #define REG_PUB_APB_DMC_PORT8_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0054)
43 #define REG_PUB_APB_DMC_PORT9_MPU_RANGE                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0058)
44 #define REG_PUB_APB_DMC_PORT0_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x005C)
45 #define REG_PUB_APB_DMC_PORT1_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0060)
46 #define REG_PUB_APB_DMC_PORT2_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0064)
47 #define REG_PUB_APB_DMC_PORT3_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0068)
48 #define REG_PUB_APB_DMC_PORT4_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x006C)
49 #define REG_PUB_APB_DMC_PORT5_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0070)
50 #define REG_PUB_APB_DMC_PORT6_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0074)
51 #define REG_PUB_APB_DMC_PORT7_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0078)
52 #define REG_PUB_APB_DMC_PORT8_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x007C)
53 #define REG_PUB_APB_DMC_PORT9_DUMP_ADDR                   SCI_ADDR(REGS_PUB_APB_BASE, 0x0080)
54 #define REG_PUB_APB_BUSMON_CNT_START                      SCI_ADDR(REGS_PUB_APB_BASE, 0x008C)
55 #define REG_PUB_APB_BUSMON_CFG                            SCI_ADDR(REGS_PUB_APB_BASE, 0x0090)
56 #define REG_PUB_APB_DDR_EB                                SCI_ADDR(REGS_PUB_APB_BASE, 0x0094)
57 #define REG_PUB_APB_DDR_SOFT_RST                          SCI_ADDR(REGS_PUB_APB_BASE, 0x0098)
58 #define REG_PUB_APB_DDR_QOS_CFG1                          SCI_ADDR(REGS_PUB_APB_BASE, 0x009C)
59 #define REG_PUB_APB_DDR_QOS_CFG2                          SCI_ADDR(REGS_PUB_APB_BASE, 0x00A0)
60 #define REG_PUB_APB_DDR_QOS_CFG3                          SCI_ADDR(REGS_PUB_APB_BASE, 0x00A4)
61 #define REG_PUB_APB_DDR_MRR_STATUS                        SCI_ADDR(REGS_PUB_APB_BASE, 0x00A8)
62
63
64
65 /* bits definitions for register REG_PUB_APB_DMC_PORT_REMAP_EN */
66 #define BITS_DMC_PORTS_REMAP_EN(_X_)                      ( (_X_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)|BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
67
68 /* bits definitions for register REG_PUB_APB_DMC_PORTS_MPU_EN */
69 #define BITS_DMC_PORTS_MPU_EN(_X_)                        ( (_X_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)|BIT(8)|BIT(9)|BIT(10)|BIT(11)|BIT(12)|BIT(13)|BIT(14)|BIT(15)|BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
70
71 /* bits definitions for register REG_PUB_APB_DMC_PORT0_ADDR_REMAP */
72 #define BITS_DMC_PORT0_ADDR_REMAP(_X_)                    (_X_)
73
74 /* bits definitions for register REG_PUB_APB_DMC_PORT1_ADDR_REMAP */
75 #define BITS_DMC_PORT1_ADDR_REMAP(_X_)                    (_X_)
76
77 /* bits definitions for register REG_PUB_APB_DMC_PORT2_ADDR_REMAP */
78 #define BITS_DMC_PORT2_ADDR_REMAP(_X_)                    (_X_)
79
80 /* bits definitions for register REG_PUB_APB_DMC_PORT3_ADDR_REMAP */
81 #define BITS_DMC_PORT3_ADDR_REMAP(_X_)                    (_X_)
82
83 /* bits definitions for register REG_PUB_APB_DMC_PORT4_ADDR_REMAP */
84 #define BITS_DMC_PORT4_ADDR_REMAP(_X_)                    (_X_)
85
86 /* bits definitions for register REG_PUB_APB_DMC_PORT5_ADDR_REMAP */
87 #define BITS_DMC_PORT5_ADDR_REMAP(_X_)                    (_X_)
88
89 /* bits definitions for register REG_PUB_APB_DMC_PORT6_ADDR_REMAP */
90 #define BITS_DMC_PORT6_ADDR_REMAP(_X_)                    (_X_)
91
92 /* bits definitions for register REG_PUB_APB_DMC_PORT7_ADDR_REMAP */
93 #define BITS_DMC_PORT7_ADDR_REMAP(_X_)                    (_X_)
94
95 /* bits definitions for register REG_PUB_APB_DMC_PORT8_ADDR_REMAP */
96 #define BITS_DMC_PORT8_ADDR_REMAP(_X_)                    (_X_)
97
98 /* bits definitions for register REG_PUB_APB_DMC_PORT9_ADDR_REMAP */
99 #define BITS_DMC_PORT9_ADDR_REMAP(_X_)                    (_X_)
100
101 /* bits definitions for register REG_PUB_APB_DMC_PORT0_MPU_RANGE */
102 #define BITS_DMC_PORT0_MPU_RANGE(_X_)                     (_X_)
103
104 /* bits definitions for register REG_PUB_APB_DMC_PORT1_MPU_RANGE */
105 #define BITS_DMC_PORT1_MPU_RANGE(_X_)                     (_X_)
106
107 /* bits definitions for register REG_PUB_APB_DMC_PORT2_MPU_RANGE */
108 #define BITS_DMC_PORT2_MPU_RANGE(_X_)                     (_X_)
109
110 /* bits definitions for register REG_PUB_APB_DMC_PORT3_MPU_RANGE */
111 #define BITS_DMC_PORT3_MPU_RANGE(_X_)                     (_X_)
112
113 /* bits definitions for register REG_PUB_APB_DMC_PORT4_MPU_RANGE */
114 #define BITS_DMC_PORT4_MPU_RANGE(_X_)                     (_X_)
115
116 /* bits definitions for register REG_PUB_APB_DMC_PORT5_MPU_RANGE */
117 #define BITS_DMC_PORT5_MPU_RANGE(_X_)                     (_X_)
118
119 /* bits definitions for register REG_PUB_APB_DMC_PORT6_MPU_RANGE */
120 #define BITS_DMC_PORT6_MPU_RANGE(_X_)                     (_X_)
121
122 /* bits definitions for register REG_PUB_APB_DMC_PORT7_MPU_RANGE */
123 #define BITS_DMC_PORT7_MPU_RANGE(_X_)                     (_X_)
124
125 /* bits definitions for register REG_PUB_APB_DMC_PORT8_MPU_RANGE */
126 #define BITS_DMC_PORT8_MPU_RANGE(_X_)                     (_X_)
127
128 /* bits definitions for register REG_PUB_APB_DMC_PORT9_MPU_RANGE */
129 #define BITS_DMC_PORT9_MPU_RANGE(_X_)                     (_X_)
130
131 /* bits definitions for register REG_PUB_APB_DMC_PORT0_DUMP_ADDR */
132 #define BITS_DMC_PORT0_DUMP_ADDR(_X_)                     (_X_)
133
134 /* bits definitions for register REG_PUB_APB_DMC_PORT1_DUMP_ADDR */
135 #define BITS_DMC_PORT1_DUMP_ADDR(_X_)                     (_X_)
136
137 /* bits definitions for register REG_PUB_APB_DMC_PORT2_DUMP_ADDR */
138 #define BITS_DMC_PORT2_DUMP_ADDR(_X_)                     (_X_)
139
140 /* bits definitions for register REG_PUB_APB_DMC_PORT3_DUMP_ADDR */
141 #define BITS_DMC_PORT3_DUMP_ADDR(_X_)                     (_X_)
142
143 /* bits definitions for register REG_PUB_APB_DMC_PORT4_DUMP_ADDR */
144 #define BITS_DMC_PORT4_DUMP_ADDR(_X_)                     (_X_)
145
146 /* bits definitions for register REG_PUB_APB_DMC_PORT5_DUMP_ADDR */
147 #define BITS_DMC_PORT5_DUMP_ADDR(_X_)                     (_X_)
148
149 /* bits definitions for register REG_PUB_APB_DMC_PORT6_DUMP_ADDR */
150 #define BITS_DMC_PORT6_DUMP_ADDR(_X_)                     (_X_)
151
152 /* bits definitions for register REG_PUB_APB_DMC_PORT7_DUMP_ADDR */
153 #define BITS_DMC_PORT7_DUMP_ADDR(_X_)                     (_X_)
154
155 /* bits definitions for register REG_PUB_APB_DMC_PORT8_DUMP_ADDR */
156 #define BITS_DMC_PORT8_DUMP_ADDR(_X_)                     (_X_)
157
158 /* bits definitions for register REG_PUB_APB_DMC_PORT9_DUMP_ADDR */
159 #define BITS_DMC_PORT9_DUMP_ADDR(_X_)                     (_X_)
160
161 /* bits definitions for register REG_PUB_APB_BUSMON_CNT_START */
162 #define BIT_PUB_BUSMON_CNT_START                          ( BIT(0) )
163
164 /* bits definitions for register REG_PUB_APB_BUSMON_CFG */
165 #define BIT_PUB_BUSMON9_EB                                ( BIT(25) )
166 #define BIT_PUB_BUSMON8_EB                                ( BIT(24) )
167 #define BIT_PUB_BUSMON7_EB                                ( BIT(23) )
168 #define BIT_PUB_BUSMON6_EB                                ( BIT(22) )
169 #define BIT_PUB_BUSMON5_EB                                ( BIT(21) )
170 #define BIT_PUB_BUSMON4_EB                                ( BIT(20) )
171 #define BIT_PUB_BUSMON3_EB                                ( BIT(19) )
172 #define BIT_PUB_BUSMON2_EB                                ( BIT(18) )
173 #define BIT_PUB_BUSMON1_EB                                ( BIT(17) )
174 #define BIT_PUB_BUSMON0_EB                                ( BIT(16) )
175 #define BIT_PUB_BUSMON9_SOFT_RST                          ( BIT(9) )
176 #define BIT_PUB_BUSMON8_SOFT_RST                          ( BIT(8) )
177 #define BIT_PUB_BUSMON7_SOFT_RST                          ( BIT(7) )
178 #define BIT_PUB_BUSMON6_SOFT_RST                          ( BIT(6) )
179 #define BIT_PUB_BUSMON5_SOFT_RST                          ( BIT(5) )
180 #define BIT_PUB_BUSMON4_SOFT_RST                          ( BIT(4) )
181 #define BIT_PUB_BUSMON3_SOFT_RST                          ( BIT(3) )
182 #define BIT_PUB_BUSMON2_SOFT_RST                          ( BIT(2) )
183 #define BIT_PUB_BUSMON1_SOFT_RST                          ( BIT(1) )
184 #define BIT_PUB_BUSMON0_SOFT_RST                          ( BIT(0) )
185
186 /* bits definitions for register REG_PUB_APB_DDR_EB */
187
188 /* bits definitions for register REG_PUB_APB_DDR_SOFT_RST */
189
190 /* bits definitions for register REG_PUB_APB_DDR_QOS_CFG1 */
191 #define BITS_DMC_ARQOS_3(_X_)                             ( (_X_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
192 #define BITS_DMC_AWQOS_3(_X_)                             ( (_X_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
193 #define BITS_DMC_ARQOS_2(_X_)                             ( (_X_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
194 #define BITS_DMC_AWQOS_2(_X_)                             ( (_X_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
195 #define BITS_DMC_ARQOS_1(_X_)                             ( (_X_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
196 #define BITS_DMC_AWQOS_1(_X_)                             ( (_X_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
197 #define BITS_DMC_ARQOS_0(_X_)                             ( (_X_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
198 #define BITS_DMC_AWQOS_0(_X_)                             ( (_X_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
199
200 /* bits definitions for register REG_PUB_APB_DDR_QOS_CFG2 */
201 #define BITS_DMC_ARQOS_7(_X_)                             ( (_X_) << 28 & (BIT(28)|BIT(29)|BIT(30)|BIT(31)) )
202 #define BITS_DMC_AWQOS_7(_X_)                             ( (_X_) << 24 & (BIT(24)|BIT(25)|BIT(26)|BIT(27)) )
203 #define BITS_DMC_ARQOS_6(_X_)                             ( (_X_) << 20 & (BIT(20)|BIT(21)|BIT(22)|BIT(23)) )
204 #define BITS_DMC_AWQOS_6(_X_)                             ( (_X_) << 16 & (BIT(16)|BIT(17)|BIT(18)|BIT(19)) )
205 #define BITS_DMC_ARQOS_5(_X_)                             ( (_X_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
206 #define BITS_DMC_AWQOS_5(_X_)                             ( (_X_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
207 #define BITS_DMC_ARQOS_4(_X_)                             ( (_X_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
208 #define BITS_DMC_AWQOS_4(_X_)                             ( (_X_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
209
210 /* bits definitions for register REG_PUB_APB_DDR_QOS_CFG3 */
211 #define BITS_DMC_ARQOS_9(_X_)                             ( (_X_) << 12 & (BIT(12)|BIT(13)|BIT(14)|BIT(15)) )
212 #define BITS_DMC_AWQOS_9(_X_)                             ( (_X_) << 8 & (BIT(8)|BIT(9)|BIT(10)|BIT(11)) )
213 #define BITS_DMC_ARQOS_8(_X_)                             ( (_X_) << 4 & (BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
214 #define BITS_DMC_AWQOS_8(_X_)                             ( (_X_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)) )
215
216 /* bits definitions for register REG_PUB_APB_DDR_MRR_STATUS */
217 #define BIT_DDRC_CO_RD_MRR_DATA_VALID                     ( BIT(8) )
218 #define BITS_DDRC_CO_RD_MRR_DATA(_X_)                     ( (_X_) & (BIT(0)|BIT(1)|BIT(2)|BIT(3)|BIT(4)|BIT(5)|BIT(6)|BIT(7)) )
219
220 #endif