2 * (C) Copyright 2010 Samsung Electronics
3 * Minkyu Kang <mk7.kang@samsung.com>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of
8 * the License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
22 #ifndef __ASM_ARM_ARCH_CLOCK_H_
23 #define __ASM_ARM_ARCH_CLOCK_H_
26 struct exynos4_clock {
27 unsigned char res1[0x4200];
28 unsigned int src_leftbus;
29 unsigned char res2[0x1fc];
30 unsigned int mux_stat_leftbus;
31 unsigned char res4[0xfc];
32 unsigned int div_leftbus;
33 unsigned char res5[0xfc];
34 unsigned int div_stat_leftbus;
35 unsigned char res6[0x1fc];
36 unsigned int gate_ip_leftbus;
37 unsigned char res7[0x1fc];
38 unsigned int clkout_leftbus;
39 unsigned int clkout_leftbus_div_stat;
40 unsigned char res8[0x37f8];
41 unsigned int src_rightbus;
42 unsigned char res9[0x1fc];
43 unsigned int mux_stat_rightbus;
44 unsigned char res10[0xfc];
45 unsigned int div_rightbus;
46 unsigned char res11[0xfc];
47 unsigned int div_stat_rightbus;
48 unsigned char res12[0x1fc];
49 unsigned int gate_ip_rightbus;
50 unsigned char res13[0x1fc];
51 unsigned int clkout_rightbus;
52 unsigned int clkout_rightbus_div_stat;
53 unsigned char res14[0x3608];
54 unsigned int epll_lock;
55 unsigned char res15[0xc];
56 unsigned int vpll_lock;
57 unsigned char res16[0xec];
58 unsigned int epll_con0;
59 unsigned int epll_con1;
60 unsigned char res17[0x8];
61 unsigned int vpll_con0;
62 unsigned int vpll_con1;
63 unsigned char res18[0xe8];
64 unsigned int src_top0;
65 unsigned int src_top1;
66 unsigned char res19[0x8];
71 unsigned int src_image;
72 unsigned int src_lcd0;
73 unsigned int src_lcd1;
74 unsigned int src_maudio;
75 unsigned int src_fsys;
76 unsigned char res20[0xc];
77 unsigned int src_peril0;
78 unsigned int src_peril1;
79 unsigned char res21[0xb8];
80 unsigned int src_mask_top;
81 unsigned char res22[0xc];
82 unsigned int src_mask_cam;
83 unsigned int src_mask_tv;
84 unsigned char res23[0xc];
85 unsigned int src_mask_lcd0;
86 unsigned int src_mask_lcd1;
87 unsigned int src_mask_maudio;
88 unsigned int src_mask_fsys;
89 unsigned char res24[0xc];
90 unsigned int src_mask_peril0;
91 unsigned int src_mask_peril1;
92 unsigned char res25[0xb8];
93 unsigned int mux_stat_top;
94 unsigned char res26[0x14];
95 unsigned int mux_stat_mfc;
96 unsigned int mux_stat_g3d;
97 unsigned int mux_stat_image;
98 unsigned char res27[0xdc];
100 unsigned char res28[0xc];
101 unsigned int div_cam;
103 unsigned int div_mfc;
104 unsigned int div_g3d;
105 unsigned int div_image;
106 unsigned int div_lcd0;
107 unsigned int div_lcd1;
108 unsigned int div_maudio;
109 unsigned int div_fsys0;
110 unsigned int div_fsys1;
111 unsigned int div_fsys2;
112 unsigned int div_fsys3;
113 unsigned int div_peril0;
114 unsigned int div_peril1;
115 unsigned int div_peril2;
116 unsigned int div_peril3;
117 unsigned int div_peril4;
118 unsigned int div_peril5;
119 unsigned char res29[0x18];
120 unsigned int div2_ratio;
121 unsigned char res30[0x8c];
122 unsigned int div_stat_top;
123 unsigned char res31[0xc];
124 unsigned int div_stat_cam;
125 unsigned int div_stat_tv;
126 unsigned int div_stat_mfc;
127 unsigned int div_stat_g3d;
128 unsigned int div_stat_image;
129 unsigned int div_stat_lcd0;
130 unsigned int div_stat_lcd1;
131 unsigned int div_stat_maudio;
132 unsigned int div_stat_fsys0;
133 unsigned int div_stat_fsys1;
134 unsigned int div_stat_fsys2;
135 unsigned int div_stat_fsys3;
136 unsigned int div_stat_peril0;
137 unsigned int div_stat_peril1;
138 unsigned int div_stat_peril2;
139 unsigned int div_stat_peril3;
140 unsigned int div_stat_peril4;
141 unsigned int div_stat_peril5;
142 unsigned char res32[0x18];
143 unsigned int div2_stat;
144 unsigned char res33[0x29c];
145 unsigned int gate_ip_cam;
146 unsigned int gate_ip_tv;
147 unsigned int gate_ip_mfc;
148 unsigned int gate_ip_g3d;
149 unsigned int gate_ip_image;
150 unsigned int gate_ip_lcd0;
151 unsigned int gate_ip_lcd1;
152 unsigned char res34[0x4];
153 unsigned int gate_ip_fsys;
154 unsigned char res35[0x8];
155 unsigned int gate_ip_gps;
156 unsigned int gate_ip_peril;
157 unsigned char res36[0xc];
158 unsigned int gate_ip_perir;
159 unsigned char res37[0xc];
160 unsigned int gate_block;
161 unsigned char res38[0x8c];
162 unsigned int clkout_cmu_top;
163 unsigned int clkout_cmu_top_div_stat;
164 unsigned char res39[0x37f8];
165 unsigned int src_dmc;
166 unsigned char res40[0xfc];
167 unsigned int src_mask_dmc;
168 unsigned char res41[0xfc];
169 unsigned int mux_stat_dmc;
170 unsigned char res42[0xfc];
171 unsigned int div_dmc0;
172 unsigned int div_dmc1;
173 unsigned char res43[0xf8];
174 unsigned int div_stat_dmc0;
175 unsigned int div_stat_dmc1;
176 unsigned char res44[0x2f8];
177 unsigned int gate_ip_dmc;
178 unsigned char res45[0xfc];
179 unsigned int clkout_cmu_dmc;
180 unsigned int clkout_cmu_dmc_div_stat;
181 unsigned char res46[0x5f8];
182 unsigned int dcgidx_map0;
183 unsigned int dcgidx_map1;
184 unsigned int dcgidx_map2;
185 unsigned char res47[0x14];
186 unsigned int dcgperf_map0;
187 unsigned int dcgperf_map1;
188 unsigned char res48[0x18];
189 unsigned int dvcidx_map;
190 unsigned char res49[0x1c];
191 unsigned int freq_cpu;
192 unsigned int freq_dpm;
193 unsigned char res50[0x18];
194 unsigned int dvsemclk_en;
195 unsigned int maxperf;
196 unsigned char res51[0x2f78];
197 unsigned int apll_lock;
198 unsigned char res52[0x4];
199 unsigned int mpll_lock;
200 unsigned char res53[0xf4];
201 unsigned int apll_con0;
202 unsigned int apll_con1;
203 unsigned int mpll_con0;
204 unsigned int mpll_con1;
205 unsigned char res54[0xf0];
206 unsigned int src_cpu;
207 unsigned char res55[0x1fc];
208 unsigned int mux_stat_cpu;
209 unsigned char res56[0xfc];
210 unsigned int div_cpu0;
211 unsigned int div_cpu1;
212 unsigned char res57[0xf8];
213 unsigned int div_stat_cpu0;
214 unsigned int div_stat_cpu1;
215 unsigned char res58[0x3f8];
216 unsigned int clkout_cmu_cpu;
217 unsigned int clkout_cmu_cpu_div_stat;
218 unsigned char res59[0x5f8];
219 unsigned int armclk_stopctrl;
220 unsigned int atclk_stopctrl;
221 unsigned char res60[0x8];
222 unsigned int parityfail_status;
223 unsigned int parityfail_clear;
224 unsigned char res61[0xe8];
225 unsigned int apll_con0_l8;
226 unsigned int apll_con0_l7;
227 unsigned int apll_con0_l6;
228 unsigned int apll_con0_l5;
229 unsigned int apll_con0_l4;
230 unsigned int apll_con0_l3;
231 unsigned int apll_con0_l2;
232 unsigned int apll_con0_l1;
233 unsigned int iem_control;
234 unsigned char res62[0xdc];
235 unsigned int apll_con1_l8;
236 unsigned int apll_con1_l7;
237 unsigned int apll_con1_l6;
238 unsigned int apll_con1_l5;
239 unsigned int apll_con1_l4;
240 unsigned int apll_con1_l3;
241 unsigned int apll_con1_l2;
242 unsigned int apll_con1_l1;
243 unsigned char res63[0xe0];
244 unsigned int div_iem_l8;
245 unsigned int div_iem_l7;
246 unsigned int div_iem_l6;
247 unsigned int div_iem_l5;
248 unsigned int div_iem_l4;
249 unsigned int div_iem_l3;
250 unsigned int div_iem_l2;
251 unsigned int div_iem_l1;
254 struct exynos5_clock {
255 unsigned int apll_lock;
256 unsigned char res1[0xfc];
257 unsigned int apll_con0;
258 unsigned int apll_con1;
259 unsigned char res2[0xf8];
260 unsigned int src_cpu;
261 unsigned char res3[0x1fc];
262 unsigned int mux_stat_cpu;
263 unsigned char res4[0xfc];
264 unsigned int div_cpu0;
265 unsigned int div_cpu1;
266 unsigned char res5[0xf8];
267 unsigned int div_stat_cpu0;
268 unsigned int div_stat_cpu1;
269 unsigned char res6[0x1f8];
270 unsigned int gate_sclk_cpu;
271 unsigned char res7[0x1fc];
272 unsigned int clkout_cmu_cpu;
273 unsigned int clkout_cmu_cpu_div_stat;
274 unsigned char res8[0x5f8];
275 unsigned int armclk_stopctrl;
276 unsigned char res9[0x0c];
277 unsigned int parityfail_status;
278 unsigned int parityfail_clear;
279 unsigned char res10[0x8];
280 unsigned int pwr_ctrl;
281 unsigned int pwr_ctr2;
282 unsigned char res11[0xd8];
283 unsigned int apll_con0_l8;
284 unsigned int apll_con0_l7;
285 unsigned int apll_con0_l6;
286 unsigned int apll_con0_l5;
287 unsigned int apll_con0_l4;
288 unsigned int apll_con0_l3;
289 unsigned int apll_con0_l2;
290 unsigned int apll_con0_l1;
291 unsigned int iem_control;
292 unsigned char res12[0xdc];
293 unsigned int apll_con1_l8;
294 unsigned int apll_con1_l7;
295 unsigned int apll_con1_l6;
296 unsigned int apll_con1_l5;
297 unsigned int apll_con1_l4;
298 unsigned int apll_con1_l3;
299 unsigned int apll_con1_l2;
300 unsigned int apll_con1_l1;
301 unsigned char res13[0xe0];
302 unsigned int div_iem_l8;
303 unsigned int div_iem_l7;
304 unsigned int div_iem_l6;
305 unsigned int div_iem_l5;
306 unsigned int div_iem_l4;
307 unsigned int div_iem_l3;
308 unsigned int div_iem_l2;
309 unsigned int div_iem_l1;
310 unsigned char res14[0x2ce0];
311 unsigned int mpll_lock;
312 unsigned char res15[0xfc];
313 unsigned int mpll_con0;
314 unsigned int mpll_con1;
315 unsigned char res16[0xf8];
316 unsigned int src_core0;
317 unsigned int src_core1;
318 unsigned char res17[0xf8];
319 unsigned int src_mask_core;
320 unsigned char res18[0x100];
321 unsigned int mux_stat_core1;
322 unsigned char res19[0xf8];
323 unsigned int div_core0;
324 unsigned int div_core1;
325 unsigned int div_sysrgt;
326 unsigned char res20[0xf4];
327 unsigned int div_stat_core0;
328 unsigned int div_stat_core1;
329 unsigned int div_stat_sysrgt;
330 unsigned char res21[0x2f4];
331 unsigned int gate_ip_core;
332 unsigned int gate_ip_sysrgt;
333 unsigned char res22[0x8];
334 unsigned int c2c_monitor;
335 unsigned char res23[0xec];
336 unsigned int clkout_cmu_core;
337 unsigned int clkout_cmu_core_div_stat;
338 unsigned char res24[0x5f8];
339 unsigned int dcgidx_map0;
340 unsigned int dcgidx_map1;
341 unsigned int dcgidx_map2;
342 unsigned char res25[0x14];
343 unsigned int dcgperf_map0;
344 unsigned int dcgperf_map1;
345 unsigned char res26[0x18];
346 unsigned int dvcidx_map;
347 unsigned char res27[0x1c];
348 unsigned int freq_cpu;
349 unsigned int freq_dpm;
350 unsigned char res28[0x18];
351 unsigned int dvsemclk_en;
352 unsigned int maxperf;
353 unsigned char res29[0xf78];
354 unsigned int c2c_config;
355 unsigned char res30[0x24fc];
356 unsigned int div_acp;
357 unsigned char res31[0xfc];
358 unsigned int div_stat_acp;
359 unsigned char res32[0x1fc];
360 unsigned int gate_ip_acp;
361 unsigned char res33[0xfc];
362 unsigned int div_syslft;
363 unsigned char res34[0xc];
364 unsigned int div_stat_syslft;
365 unsigned char res35[0x1c];
366 unsigned int gate_ip_syslft;
367 unsigned char res36[0xcc];
368 unsigned int clkout_cmu_acp;
369 unsigned int clkout_cmu_acp_div_stat;
370 unsigned char res37[0x8];
371 unsigned int ufmc_config;
372 unsigned char res38[0x38ec];
373 unsigned int div_isp0;
374 unsigned int div_isp1;
375 unsigned int div_isp2;
376 unsigned char res39[0xf4];
377 unsigned int div_stat_isp0;
378 unsigned int div_stat_isp1;
379 unsigned int div_stat_isp2;
380 unsigned char res40[0x3f4];
381 unsigned int gate_ip_isp0;
382 unsigned int gate_ip_isp1;
383 unsigned char res41[0xf8];
384 unsigned int gate_sclk_isp;
385 unsigned char res42[0xc];
386 unsigned int mcuisp_pwr_ctrl;
387 unsigned char res43[0xec];
388 unsigned int clkout_cmu_isp;
389 unsigned int clkout_cmu_isp_div_stat;
390 unsigned char res44[0x3618];
391 unsigned int cpll_lock;
392 unsigned char res45[0xc];
393 unsigned int epll_lock;
394 unsigned char res46[0xc];
395 unsigned int vpll_lock;
396 unsigned char res47[0xc];
397 unsigned int gpll_lock;
398 unsigned char res48[0xcc];
399 unsigned int cpll_con0;
400 unsigned int cpll_con1;
401 unsigned char res49[0x8];
402 unsigned int epll_con0;
403 unsigned int epll_con1;
404 unsigned int epll_con2;
405 unsigned char res50[0x4];
406 unsigned int vpll_con0;
407 unsigned int vpll_con1;
408 unsigned int vpll_con2;
409 unsigned char res51[0x4];
410 unsigned int gpll_con0;
411 unsigned int gpll_con1;
412 unsigned char res52[0xb8];
413 unsigned int src_top0;
414 unsigned int src_top1;
415 unsigned int src_top2;
416 unsigned int src_top3;
417 unsigned int src_gscl;
418 unsigned char res53[0x8];
419 unsigned int src_disp1_0;
420 unsigned char res54[0x10];
421 unsigned int src_mau;
422 unsigned int src_fsys;
423 unsigned int src_gen;
424 unsigned char res55[0x4];
425 unsigned int src_peric0;
426 unsigned int src_peric1;
427 unsigned char res56[0x18];
428 unsigned int sclk_src_isp;
429 unsigned char res57[0x9c];
430 unsigned int src_mask_top;
431 unsigned char res58[0xc];
432 unsigned int src_mask_gscl;
433 unsigned char res59[0x8];
434 unsigned int src_mask_disp1_0;
435 unsigned char res60[0x4];
436 unsigned int src_mask_mau;
437 unsigned char res61[0x8];
438 unsigned int src_mask_fsys;
439 unsigned int src_mask_gen;
440 unsigned char res62[0x8];
441 unsigned int src_mask_peric0;
442 unsigned int src_mask_peric1;
443 unsigned char res63[0x18];
444 unsigned int src_mask_isp;
445 unsigned char res67[0x9c];
446 unsigned int mux_stat_top0;
447 unsigned int mux_stat_top1;
448 unsigned int mux_stat_top2;
449 unsigned int mux_stat_top3;
450 unsigned char res68[0xf0];
451 unsigned int div_top0;
452 unsigned int div_top1;
453 unsigned char res69[0x8];
454 unsigned int div_gscl;
455 unsigned char res70[0x8];
456 unsigned int div_disp1_0;
457 unsigned char res71[0xc];
458 unsigned int div_gen;
459 unsigned char res72[0x4];
460 unsigned int div_mau;
461 unsigned int div_fsys0;
462 unsigned int div_fsys1;
463 unsigned int div_fsys2;
464 unsigned char res73[0x4];
465 unsigned int div_peric0;
466 unsigned int div_peric1;
467 unsigned int div_peric2;
468 unsigned int div_peric3;
469 unsigned int div_peric4;
470 unsigned int div_peric5;
471 unsigned char res74[0x10];
472 unsigned int sclk_div_isp;
473 unsigned char res75[0xc];
474 unsigned int div2_ratio0;
475 unsigned int div2_ratio1;
476 unsigned char res76[0x8];
477 unsigned int div4_ratio;
478 unsigned char res77[0x6c];
479 unsigned int div_stat_top0;
480 unsigned int div_stat_top1;
481 unsigned char res78[0x8];
482 unsigned int div_stat_gscl;
483 unsigned char res79[0x8];
484 unsigned int div_stat_disp1_0;
485 unsigned char res80[0xc];
486 unsigned int div_stat_gen;
487 unsigned char res81[0x4];
488 unsigned int div_stat_mau;
489 unsigned int div_stat_fsys0;
490 unsigned int div_stat_fsys1;
491 unsigned int div_stat_fsys2;
492 unsigned char res82[0x4];
493 unsigned int div_stat_peric0;
494 unsigned int div_stat_peric1;
495 unsigned int div_stat_peric2;
496 unsigned int div_stat_peric3;
497 unsigned int div_stat_peric4;
498 unsigned int div_stat_peric5;
499 unsigned char res83[0x10];
500 unsigned int sclk_div_stat_isp;
501 unsigned char res84[0xc];
502 unsigned int div2_stat0;
503 unsigned int div2_stat1;
504 unsigned char res85[0x8];
505 unsigned int div4_stat;
506 unsigned char res86[0x184];
507 unsigned int gate_top_sclk_disp1;
508 unsigned int gate_top_sclk_gen;
509 unsigned char res87[0xc];
510 unsigned int gate_top_sclk_mau;
511 unsigned int gate_top_sclk_fsys;
512 unsigned char res88[0xc];
513 unsigned int gate_top_sclk_peric;
514 unsigned char res89[0x1c];
515 unsigned int gate_top_sclk_isp;
516 unsigned char res90[0xac];
517 unsigned int gate_ip_gscl;
518 unsigned char res91[0x4];
519 unsigned int gate_ip_disp1;
520 unsigned int gate_ip_mfc;
521 unsigned int gate_ip_g3d;
522 unsigned int gate_ip_gen;
523 unsigned char res92[0xc];
524 unsigned int gate_ip_fsys;
525 unsigned char res93[0x8];
526 unsigned int gate_ip_peric;
527 unsigned char res94[0xc];
528 unsigned int gate_ip_peris;
529 unsigned char res95[0x1c];
530 unsigned int gate_block;
531 unsigned char res96[0x1c];
532 unsigned int mcuiop_pwr_ctrl;
533 unsigned char res97[0x5c];
534 unsigned int clkout_cmu_top;
535 unsigned int clkout_cmu_top_div_stat;
536 unsigned char res98[0x37f8];
537 unsigned int src_lex;
538 unsigned char res99[0x1fc];
539 unsigned int mux_stat_lex;
540 unsigned char res100[0xfc];
541 unsigned int div_lex;
542 unsigned char res101[0xfc];
543 unsigned int div_stat_lex;
544 unsigned char res102[0x1fc];
545 unsigned int gate_ip_lex;
546 unsigned char res103[0x1fc];
547 unsigned int clkout_cmu_lex;
548 unsigned int clkout_cmu_lex_div_stat;
549 unsigned char res104[0x3af8];
550 unsigned int div_r0x;
551 unsigned char res105[0xfc];
552 unsigned int div_stat_r0x;
553 unsigned char res106[0x1fc];
554 unsigned int gate_ip_r0x;
555 unsigned char res107[0x1fc];
556 unsigned int clkout_cmu_r0x;
557 unsigned int clkout_cmu_r0x_div_stat;
558 unsigned char res108[0x3af8];
559 unsigned int div_r1x;
560 unsigned char res109[0xfc];
561 unsigned int div_stat_r1x;
562 unsigned char res110[0x1fc];
563 unsigned int gate_ip_r1x;
564 unsigned char res111[0x1fc];
565 unsigned int clkout_cmu_r1x;
566 unsigned int clkout_cmu_r1x_div_stat;
567 unsigned char res112[0x3608];
568 unsigned int bpll_lock;
569 unsigned char res113[0xfc];
570 unsigned int bpll_con0;
571 unsigned int bpll_con1;
572 unsigned char res114[0xe8];
573 unsigned int src_cdrex;
574 unsigned char res115[0x1fc];
575 unsigned int mux_stat_cdrex;
576 unsigned char res116[0xfc];
577 unsigned int div_cdrex;
578 unsigned char res117[0xfc];
579 unsigned int div_stat_cdrex;
580 unsigned char res118[0x2fc];
581 unsigned int gate_ip_cdrex;
582 unsigned char res119[0x10];
583 unsigned int dmc_freq_ctrl;
584 unsigned char res120[0x4];
585 unsigned int drex2_pause;
586 unsigned char res121[0xe0];
587 unsigned int clkout_cmu_cdrex;
588 unsigned int clkout_cmu_cdrex_div_stat;
589 unsigned char res122[0x8];
590 unsigned int lpddr3phy_ctrl;
591 unsigned int lpddr3phy_con0;
592 unsigned int lpddr3phy_con1;
593 unsigned int lpddr3phy_con2;
594 unsigned int lpddr3phy_con3;
595 unsigned int pll_div2_sel;
596 unsigned char res123[0xf5d8];
600 #define MPLL_FOUT_SEL_SHIFT 4
601 #define MPLL_FOUT_SEL_MASK 0x1
602 #define BPLL_FOUT_SEL_SHIFT 0
603 #define BPLL_FOUT_SEL_MASK 0x1