blob: bdbb4086421846fb1f5e9ba9138441dec72e8517 [file] [log] [blame]
Nobuhiro Iwamatsu940103d2012-08-19 04:40:05 +00001#ifndef __ASM_ARCH_RMOBILE_SH73A0_H
2#define __ASM_ARCH_RMOBILE_SH73A0_H
3
4/* Global Timer */
5#define GLOBAL_TIMER_BASE_ADDR (0xF0000200)
6#define MERAM_BASE (0xE5580000)
7
8/* GIC */
9#define GIC_BASE (0xF0000100)
10#define ICCICR GIC_BASE
11
12/* Secure control register */
13#define LIFEC_SEC_SRC (0xE6110008)
14
15/* RWDT */
16#define RWDT_BASE (0xE6020000)
17
18/* HPB Semaphore Control Registers */
19#define HPB_BASE (0xE6001010)
20
21/* Bus Semaphore Control Registers */
22#define HPBSCR_BASE (0xE6001600)
23
24/* SBSC1 */
25#define SBSC1_BASE (0xFE400000)
26#define SDMRA1A (SBSC1_BASE + 0x100000)
27#define SDMRA2A (SBSC1_BASE + 0x1C0000)
28#define SDMRA3A (SBSC1_BASE + 0x104000)
29
30/* SBSC2 */
31#define SBSC2_BASE (0xFB400000)
32#define SDMRA1B (SBSC2_BASE + 0x100000)
33#define SDMRA2B (SBSC2_BASE + 0x1C0000)
34#define SDMRA3B (SBSC2_BASE + 0x104000)
35
36/* CPG */
37#define CPG_BASE (0xE6150000)
38#define CPG_SRCR_BASE (CPG_BASE + 0x80A0)
39#define WUPCR (CPG_BASE + 0x1010)
40#define SRESCR (CPG_BASE + 0x1018)
41#define PCLKCR (CPG_BASE + 0x1020)
42
Tetsuyuki Kobayashi8182c272012-07-16 19:13:12 +000043/* SYSC */
44#define SYSC_BASE (0xE6180000)
45#define RESCNT2 (SYSC_BASE + 0x8020)
46
Nobuhiro Iwamatsu940103d2012-08-19 04:40:05 +000047/* BSC */
48#define BSC_BASE (0xFEC10000)
49
50/* SCIF */
51#define SCIF0_BASE (0xE6C40000)
52#define SCIF1_BASE (0xE6C50000)
53#define SCIF2_BASE (0xE6C60000)
54#define SCIF3_BASE (0xE6C70000)
55#define SCIF4_BASE (0xE6C80000)
56#define SCIF5_BASE (0xE6CB0000)
57#define SCIF6_BASE (0xE6CC0000)
58#define SCIF7_BASE (0xE6CD0000)
59
60#ifndef __ASSEMBLY__
61#include <asm/types.h>
62
63/* RWDT */
64struct sh73a0_rwdt {
65 u16 rwtcnt0; /* 0x00 */
Tetsuyuki Kobayashia9aef3b2012-07-19 23:27:56 +000066 u16 dummy0; /* 0x02 */
Nobuhiro Iwamatsu940103d2012-08-19 04:40:05 +000067 u16 rwtcsra0; /* 0x04 */
Tetsuyuki Kobayashia9aef3b2012-07-19 23:27:56 +000068 u16 dummy1; /* 0x06 */
Nobuhiro Iwamatsu940103d2012-08-19 04:40:05 +000069 u16 rwtcsrb0; /* 0x08 */
70};
71
72/* HPB Semaphore Control Registers */
73struct sh73a0_hpb {
74 u32 hpbctrl0;
75 u32 hpbctrl1;
76 u32 hpbctrl2;
77 u32 cccr;
78 u32 dummy0; /* 0x20 */
79 u32 hpbctrl4;
80 u32 hpbctrl5;
81 u32 dummy1; /* 0x2C */
82 u32 hpbctrl6;
83};
84
85/* Bus Semaphore Control Registers */
86struct sh73a0_hpb_bscr {
87 u32 mpsrc; /* 0x00 */
88 u32 mpacctl; /* 0x04 */
89 u32 dummy0[6];
90 u32 smgpiosrc; /* 0x20 */
91 u32 smgpioerr;
92 u32 smgpiotime;
93 u32 smgpiocnt;
94 u32 dummy1[4]; /* 0x30 .. 0x3C */
95 u32 smcmt2src;
96 u32 smcmt2err;
97 u32 smcmt2time;
98 u32 smcmt2cnt;
99 u32 smcpgsrc;
100 u32 smcpgerr;
101 u32 smcpgtime;
102 u32 smcpgcnt;
103 u32 dummy2[4]; /* 0x60 - 0x6C */
104 u32 smsyscsrc;
105 u32 smsyscerr;
106 u32 smsysctime;
107 u32 smsysccnt;
108};
109
110/* SBSC */
111struct sh73a0_sbsc {
112 u32 dummy0[2]; /* 0x00, 0x04 */
113 u32 sdcr0;
114 u32 sdcr1;
115 u32 sdpcr;
116 u32 dummy1; /* 0x14 */
117 u32 sdcr0s;
118 u32 sdcr1s;
119 u32 rtcsr;
120 u32 dummy2; /* 0x24 */
121 u32 rtcor;
122 u32 rtcorh;
123 u32 rtcors;
124 u32 rtcorsh;
125 u32 dummy3[2]; /* 0x38, 0x3C */
126 u32 sdwcrc0;
127 u32 sdwcrc1;
128 u32 sdwcr00;
129 u32 sdwcr01;
130 u32 sdwcr10;
131 u32 sdwcr11;
132 u32 sdpdcr0;
133 u32 dummy4; /* 0x5C */
134 u32 sdwcr2;
135 u32 sdwcrc2;
136 u32 zqccr;
137 u32 dummy5[6]; /* 0x6C .. 0x80 */
138 u32 sdmracr0;
139 u32 dummy6; /* 0x88 */
140 u32 sdmrtmpcr;
141 u32 dummy7; /* 0x90 */
142 u32 sdmrtmpmsk;
143 u32 dummy8; /* 0x98 */
144 u32 sdgencnt;
145 u32 dphycnt0;
146 u32 dphycnt1;
147 u32 dphycnt2;
148 u32 dummy9[2]; /* 0xAC .. 0xB0 */
149 u32 sddrvcr0;
150 u32 dummy10[14]; /* 0xB8 .. 0xEC */
151 u32 dptdivcr0;
152 u32 dptdivcr1;
153 u32 dptdivcr2;
154 u32 dummy11; /* 0xFC */
155 u32 sdptcr0;
156 u32 sdptcr1;
157 u32 sdptcr2;
158 u32 sdptcr3; /* 0x10C */
159 u32 dummy12[145]; /* 0x110 .. 0x350 */
160 u32 dllcnt0; /* 0x354 */
161 u32 sbscmon0;
162};
163
164/* CPG */
165struct sh73a0_sbsc_cpg {
166 u32 frqcra; /* 0x00 */
167 u32 frqcrb;
168 u32 vclkcr1;
169 u32 vclkcr2;
170 u32 zbckcr;
171 u32 flckcr;
172 u32 fsiackcr;
173 u32 vclkcr3;
174 u32 rtstbcr;
175 u32 systbcr;
176 u32 pll1cr;
177 u32 pll2cr;
178 u32 mstpsr0;
179 u32 dummy0; /* 0x34 */
180 u32 mstpsr1;
181 u32 mstpsr5;
182 u32 mstpsr2;
183 u32 dummy1; /* 0x44 */
184 u32 mstpsr3;
185 u32 mstpsr4;
186 u32 dummy2; /* 0x50 */
187 u32 astat;
188 u32 dvfscr0;
189 u32 dvfscr1;
190 u32 dsitckcr;
191 u32 dsi0pckcr;
192 u32 dsi1pckcr;
193 u32 dsi0phycr;
194 u32 dsi1phycr;
195 u32 sd0ckcr;
196 u32 sd1ckcr;
197 u32 sd2ckcr;
198 u32 subckcr;
199 u32 spuackcr;
200 u32 msuckcr;
201 u32 hsickcr;
202 u32 fsibckcr;
203 u32 spuvckcr;
204 u32 mfck1cr;
205 u32 mfck2cr;
206 u32 dummy3[8]; /* 0xA0 .. 0xBC */
207 u32 ckscr;
208 u32 dummy4; /* 0xC4 */
209 u32 pll1stpcr;
210 u32 mpmode;
211 u32 pllecr;
212 u32 dummy5; /* 0xD4 */
213 u32 pll0cr;
214 u32 pll3cr;
215 u32 dummy6; /* 0xE0 */
216 u32 frqcrd;
217 u32 dummyi7; /* 0xE8 */
218 u32 vrefcr;
219 u32 pll0stpcr;
220 u32 dummy8; /* 0xF4 */
221 u32 pll2stpcr;
222 u32 pll3stpcr;
223 u32 dummy9[4]; /* 0x100 .. 0x10c */
224 u32 rmstpcr0;
225 u32 rmstpcr1;
226 u32 rmstpcr2;
227 u32 rmstpcr3;
228 u32 rmstpcr4;
229 u32 rmstpcr5;
230 u32 dummy10[2]; /* 0x128 .. 0x12c */
231 u32 smstpcr0;
232 u32 smstpcr1;
233 u32 smstpcr2;
234 u32 smstpcr3;
235 u32 smstpcr4;
236 u32 smstpcr5;
Tetsuyuki Kobayashid83e19d2012-07-05 01:43:48 +0000237 u32 dummy11[2]; /* 0x148 .. 0x14c */
238 u32 cpgxxcs4;
239 u32 dummy12[7]; /* 0x154 .. 0x16c */
Nobuhiro Iwamatsu940103d2012-08-19 04:40:05 +0000240 u32 dvfscr2;
241 u32 dvfscr3;
242 u32 dvfscr4;
243 u32 dvfscr5; /* 0x17C */
244};
245
246/* CPG SRCR part OK */
247struct sh73a0_sbsc_cpg_srcr {
248 u32 srcr0;
249 u32 dummy0; /* 0xA4 */
250 u32 srcr1;
251 u32 dummy1; /* 0xAC */
252 u32 srcr2;
253 u32 dummy2; /* 0xB4 */
254 u32 srcr3;
255 u32 srcr4;
256 u32 dummy3; /* 0xC0 */
257 u32 srcr5;
258};
259
260/* BSC */
261struct sh73a0_bsc {
262 u32 cmncr;
263 u32 cs0bcr;
264 u32 cs2bcr;
265 u32 dummy0; /* 0x0C */
266 u32 cs4bcr;
267 u32 cs5abcr;
268 u32 cs5bbcr;
269 u32 cs6abcr;
270 u32 cs6bbcr;
271 u32 cs0wcr;
272 u32 cs2wcr;
273 u32 dummy1; /* 0x2C */
274 u32 cs4wcr;
275 u32 cs5awcr;
276 u32 cs5bwcr;
277 u32 cs6awcr;
278 u32 cs6bwcr;
279 u32 rbwtcnt;
280 u32 busycr;
281 u32 dummy2; /* 0x5c */
282 u32 cs7abcr;
283 u32 cs7awcr;
284 u32 dummy3[2]; /* 0x68, 0x6C */
285 u32 bromtimcr;
286};
287#endif /* __ASSEMBLY__ */
288
289#endif /* __ASM_ARCH_RMOBILE_SH73A0_H */