blob: 4c5ac7a69e9e1b75fb7640d698f9ba0116122a0a [file] [log] [blame]
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001/* linux/arch/arm/mach-s5pv210/clock.c
2 *
3 * Copyright (c) 2010 Samsung Electronics Co., Ltd.
4 * http://www.samsung.com/
5 *
6 * S5PV210 - Clock support
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * published by the Free Software Foundation.
11*/
12
13#include <linux/init.h>
14#include <linux/module.h>
15#include <linux/kernel.h>
16#include <linux/list.h>
17#include <linux/errno.h>
18#include <linux/err.h>
19#include <linux/clk.h>
20#include <linux/sysdev.h>
21#include <linux/io.h>
22
23#include <mach/map.h>
24
25#include <plat/cpu-freq.h>
26#include <mach/regs-clock.h>
27#include <plat/clock.h>
28#include <plat/cpu.h>
29#include <plat/pll.h>
30#include <plat/s5p-clock.h>
31#include <plat/clock-clksrc.h>
32#include <plat/s5pv210.h>
33
Jaecheol Lee88695842010-10-12 09:19:26 +090034static unsigned long xtal;
35
Thomas Abraham59cda522010-05-17 09:38:01 +090036static struct clksrc_clk clk_mout_apll = {
37 .clk = {
38 .name = "mout_apll",
Thomas Abraham59cda522010-05-17 09:38:01 +090039 },
40 .sources = &clk_src_apll,
41 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 0, .size = 1 },
42};
43
44static struct clksrc_clk clk_mout_epll = {
45 .clk = {
46 .name = "mout_epll",
Thomas Abraham59cda522010-05-17 09:38:01 +090047 },
48 .sources = &clk_src_epll,
49 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 8, .size = 1 },
50};
51
52static struct clksrc_clk clk_mout_mpll = {
53 .clk = {
54 .name = "mout_mpll",
Thomas Abraham59cda522010-05-17 09:38:01 +090055 },
56 .sources = &clk_src_mpll,
57 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 4, .size = 1 },
58};
59
Thomas Abraham374e0bf2010-05-17 09:38:31 +090060static struct clk *clkset_armclk_list[] = {
61 [0] = &clk_mout_apll.clk,
62 [1] = &clk_mout_mpll.clk,
63};
64
65static struct clksrc_sources clkset_armclk = {
66 .sources = clkset_armclk_list,
67 .nr_sources = ARRAY_SIZE(clkset_armclk_list),
68};
69
70static struct clksrc_clk clk_armclk = {
71 .clk = {
72 .name = "armclk",
Thomas Abraham374e0bf2010-05-17 09:38:31 +090073 },
74 .sources = &clkset_armclk,
75 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 16, .size = 1 },
76 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 0, .size = 3 },
77};
78
Thomas Abrahamaf76a202010-05-17 09:38:34 +090079static struct clksrc_clk clk_hclk_msys = {
80 .clk = {
81 .name = "hclk_msys",
Thomas Abrahamaf76a202010-05-17 09:38:34 +090082 .parent = &clk_armclk.clk,
83 },
84 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 8, .size = 3 },
85};
86
Thomas Abraham6ed91a22010-05-17 09:38:42 +090087static struct clksrc_clk clk_pclk_msys = {
88 .clk = {
89 .name = "pclk_msys",
Thomas Abraham6ed91a22010-05-17 09:38:42 +090090 .parent = &clk_hclk_msys.clk,
91 },
92 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 12, .size = 3 },
93};
94
Thomas Abraham0fe967a2010-05-17 09:38:37 +090095static struct clksrc_clk clk_sclk_a2m = {
96 .clk = {
97 .name = "sclk_a2m",
Thomas Abraham0fe967a2010-05-17 09:38:37 +090098 .parent = &clk_mout_apll.clk,
99 },
100 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 3 },
101};
102
103static struct clk *clkset_hclk_sys_list[] = {
104 [0] = &clk_mout_mpll.clk,
105 [1] = &clk_sclk_a2m.clk,
106};
107
108static struct clksrc_sources clkset_hclk_sys = {
109 .sources = clkset_hclk_sys_list,
110 .nr_sources = ARRAY_SIZE(clkset_hclk_sys_list),
111};
112
113static struct clksrc_clk clk_hclk_dsys = {
114 .clk = {
115 .name = "hclk_dsys",
Thomas Abraham0fe967a2010-05-17 09:38:37 +0900116 },
117 .sources = &clkset_hclk_sys,
118 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 20, .size = 1 },
119 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 16, .size = 4 },
120};
121
Thomas Abraham58772cd2010-05-17 09:38:48 +0900122static struct clksrc_clk clk_pclk_dsys = {
123 .clk = {
124 .name = "pclk_dsys",
Thomas Abraham58772cd2010-05-17 09:38:48 +0900125 .parent = &clk_hclk_dsys.clk,
126 },
127 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 20, .size = 3 },
128};
129
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900130static struct clksrc_clk clk_hclk_psys = {
131 .clk = {
132 .name = "hclk_psys",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900133 },
134 .sources = &clkset_hclk_sys,
135 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 24, .size = 1 },
136 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 24, .size = 4 },
137};
138
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900139static struct clksrc_clk clk_pclk_psys = {
140 .clk = {
141 .name = "pclk_psys",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900142 .parent = &clk_hclk_psys.clk,
143 },
144 .reg_div = { .reg = S5P_CLK_DIV0, .shift = 28, .size = 3 },
145};
146
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900147static int s5pv210_clk_ip0_ctrl(struct clk *clk, int enable)
148{
149 return s5p_gatectrl(S5P_CLKGATE_IP0, clk, enable);
150}
151
152static int s5pv210_clk_ip1_ctrl(struct clk *clk, int enable)
153{
154 return s5p_gatectrl(S5P_CLKGATE_IP1, clk, enable);
155}
156
157static int s5pv210_clk_ip2_ctrl(struct clk *clk, int enable)
158{
159 return s5p_gatectrl(S5P_CLKGATE_IP2, clk, enable);
160}
161
162static int s5pv210_clk_ip3_ctrl(struct clk *clk, int enable)
163{
164 return s5p_gatectrl(S5P_CLKGATE_IP3, clk, enable);
165}
166
Thomas Abrahamf445dbd2010-05-17 09:38:52 +0900167static int s5pv210_clk_mask0_ctrl(struct clk *clk, int enable)
168{
169 return s5p_gatectrl(S5P_CLK_SRC_MASK0, clk, enable);
170}
171
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900172static int s5pv210_clk_mask1_ctrl(struct clk *clk, int enable)
173{
174 return s5p_gatectrl(S5P_CLK_SRC_MASK1, clk, enable);
175}
176
Tomasz Stanislawskifbf05562011-09-19 16:44:42 +0900177static int exynos4_clk_hdmiphy_ctrl(struct clk *clk, int enable)
178{
179 return s5p_gatectrl(S5P_HDMI_PHY_CONTROL, clk, enable);
180}
181
182static int exynos4_clk_dac_ctrl(struct clk *clk, int enable)
183{
184 return s5p_gatectrl(S5P_DAC_PHY_CONTROL, clk, enable);
185}
186
Thomas Abrahamf445dbd2010-05-17 09:38:52 +0900187static struct clk clk_sclk_hdmi27m = {
188 .name = "sclk_hdmi27m",
Thomas Abrahamf445dbd2010-05-17 09:38:52 +0900189 .rate = 27000000,
190};
191
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900192static struct clk clk_sclk_hdmiphy = {
193 .name = "sclk_hdmiphy",
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900194};
195
196static struct clk clk_sclk_usbphy0 = {
197 .name = "sclk_usbphy0",
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900198};
199
200static struct clk clk_sclk_usbphy1 = {
201 .name = "sclk_usbphy1",
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900202};
203
Thomas Abraham45834872010-05-17 09:39:00 +0900204static struct clk clk_pcmcdclk0 = {
205 .name = "pcmcdclk",
Thomas Abraham45834872010-05-17 09:39:00 +0900206};
207
208static struct clk clk_pcmcdclk1 = {
209 .name = "pcmcdclk",
Thomas Abraham45834872010-05-17 09:39:00 +0900210};
211
212static struct clk clk_pcmcdclk2 = {
213 .name = "pcmcdclk",
Thomas Abraham45834872010-05-17 09:39:00 +0900214};
215
Boojin Kimdafc9542011-09-02 09:44:37 +0900216static struct clk dummy_apb_pclk = {
217 .name = "apb_pclk",
218 .id = -1,
219};
220
Thomas Abrahamf445dbd2010-05-17 09:38:52 +0900221static struct clk *clkset_vpllsrc_list[] = {
222 [0] = &clk_fin_vpll,
223 [1] = &clk_sclk_hdmi27m,
224};
225
226static struct clksrc_sources clkset_vpllsrc = {
227 .sources = clkset_vpllsrc_list,
228 .nr_sources = ARRAY_SIZE(clkset_vpllsrc_list),
229};
230
231static struct clksrc_clk clk_vpllsrc = {
232 .clk = {
233 .name = "vpll_src",
Thomas Abrahamf445dbd2010-05-17 09:38:52 +0900234 .enable = s5pv210_clk_mask0_ctrl,
235 .ctrlbit = (1 << 7),
236 },
237 .sources = &clkset_vpllsrc,
238 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 28, .size = 1 },
239};
240
241static struct clk *clkset_sclk_vpll_list[] = {
242 [0] = &clk_vpllsrc.clk,
243 [1] = &clk_fout_vpll,
244};
245
246static struct clksrc_sources clkset_sclk_vpll = {
247 .sources = clkset_sclk_vpll_list,
248 .nr_sources = ARRAY_SIZE(clkset_sclk_vpll_list),
249};
250
251static struct clksrc_clk clk_sclk_vpll = {
252 .clk = {
253 .name = "sclk_vpll",
Thomas Abrahamf445dbd2010-05-17 09:38:52 +0900254 },
255 .sources = &clkset_sclk_vpll,
256 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 12, .size = 1 },
257};
258
Jaecheol Lee08f49d12010-10-12 09:19:30 +0900259static struct clk *clkset_moutdmc0src_list[] = {
260 [0] = &clk_sclk_a2m.clk,
261 [1] = &clk_mout_mpll.clk,
262 [2] = NULL,
263 [3] = NULL,
264};
265
266static struct clksrc_sources clkset_moutdmc0src = {
267 .sources = clkset_moutdmc0src_list,
268 .nr_sources = ARRAY_SIZE(clkset_moutdmc0src_list),
269};
270
271static struct clksrc_clk clk_mout_dmc0 = {
272 .clk = {
273 .name = "mout_dmc0",
Jaecheol Lee08f49d12010-10-12 09:19:30 +0900274 },
275 .sources = &clkset_moutdmc0src,
276 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 },
277};
278
279static struct clksrc_clk clk_sclk_dmc0 = {
280 .clk = {
281 .name = "sclk_dmc0",
Jaecheol Lee08f49d12010-10-12 09:19:30 +0900282 .parent = &clk_mout_dmc0.clk,
283 },
284 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 },
285};
286
Thomas Abraham664f5b22010-05-17 09:38:44 +0900287static unsigned long s5pv210_clk_imem_get_rate(struct clk *clk)
288{
289 return clk_get_rate(clk->parent) / 2;
290}
291
292static struct clk_ops clk_hclk_imem_ops = {
293 .get_rate = s5pv210_clk_imem_get_rate,
294};
295
Jaecheol Lee88695842010-10-12 09:19:26 +0900296static unsigned long s5pv210_clk_fout_apll_get_rate(struct clk *clk)
297{
298 return s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508);
299}
300
301static struct clk_ops clk_fout_apll_ops = {
302 .get_rate = s5pv210_clk_fout_apll_get_rate,
303};
304
Kukjin Kim3c0fa642011-01-04 17:51:30 +0900305static struct clk init_clocks_off[] = {
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900306 {
Boojin Kimdafc9542011-09-02 09:44:37 +0900307 .name = "dma",
Vladimir Zapolskiy1ce3ea62011-08-18 19:24:55 +0900308 .devname = "dma-pl330.0",
Seungwhan Youn313068f2010-10-19 18:10:53 +0900309 .parent = &clk_hclk_psys.clk,
310 .enable = s5pv210_clk_ip0_ctrl,
311 .ctrlbit = (1 << 3),
312 }, {
Boojin Kimdafc9542011-09-02 09:44:37 +0900313 .name = "dma",
Vladimir Zapolskiy1ce3ea62011-08-18 19:24:55 +0900314 .devname = "dma-pl330.1",
Seungwhan Youn313068f2010-10-19 18:10:53 +0900315 .parent = &clk_hclk_psys.clk,
316 .enable = s5pv210_clk_ip0_ctrl,
317 .ctrlbit = (1 << 4),
318 }, {
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900319 .name = "rot",
Thomas Abraham0fe967a2010-05-17 09:38:37 +0900320 .parent = &clk_hclk_dsys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900321 .enable = s5pv210_clk_ip0_ctrl,
322 .ctrlbit = (1<<29),
323 }, {
Marek Szyprowskida01c2f2010-09-10 19:43:12 +0900324 .name = "fimc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900325 .devname = "s5pv210-fimc.0",
Marek Szyprowskida01c2f2010-09-10 19:43:12 +0900326 .parent = &clk_hclk_dsys.clk,
327 .enable = s5pv210_clk_ip0_ctrl,
328 .ctrlbit = (1 << 24),
329 }, {
330 .name = "fimc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900331 .devname = "s5pv210-fimc.1",
Marek Szyprowskida01c2f2010-09-10 19:43:12 +0900332 .parent = &clk_hclk_dsys.clk,
333 .enable = s5pv210_clk_ip0_ctrl,
334 .ctrlbit = (1 << 25),
335 }, {
336 .name = "fimc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900337 .devname = "s5pv210-fimc.2",
Marek Szyprowskida01c2f2010-09-10 19:43:12 +0900338 .parent = &clk_hclk_dsys.clk,
339 .enable = s5pv210_clk_ip0_ctrl,
340 .ctrlbit = (1 << 26),
341 }, {
Kamil Debski0f75a962011-07-21 16:42:30 +0900342 .name = "mfc",
343 .devname = "s5p-mfc",
344 .parent = &clk_pclk_psys.clk,
345 .enable = s5pv210_clk_ip0_ctrl,
346 .ctrlbit = (1 << 16),
347 }, {
Tomasz Stanislawskifbf05562011-09-19 16:44:42 +0900348 .name = "dac",
349 .devname = "s5p-sdo",
350 .parent = &clk_hclk_dsys.clk,
351 .enable = s5pv210_clk_ip1_ctrl,
352 .ctrlbit = (1 << 10),
353 }, {
354 .name = "mixer",
355 .devname = "s5p-mixer",
356 .parent = &clk_hclk_dsys.clk,
357 .enable = s5pv210_clk_ip1_ctrl,
358 .ctrlbit = (1 << 9),
359 }, {
360 .name = "vp",
361 .devname = "s5p-mixer",
362 .parent = &clk_hclk_dsys.clk,
363 .enable = s5pv210_clk_ip1_ctrl,
364 .ctrlbit = (1 << 8),
365 }, {
366 .name = "hdmi",
367 .devname = "s5pv210-hdmi",
368 .parent = &clk_hclk_dsys.clk,
369 .enable = s5pv210_clk_ip1_ctrl,
370 .ctrlbit = (1 << 11),
371 }, {
372 .name = "hdmiphy",
373 .devname = "s5pv210-hdmi",
374 .enable = exynos4_clk_hdmiphy_ctrl,
375 .ctrlbit = (1 << 0),
376 }, {
377 .name = "dacphy",
378 .devname = "s5p-sdo",
379 .enable = exynos4_clk_dac_ctrl,
380 .ctrlbit = (1 << 0),
381 }, {
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900382 .name = "otg",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900383 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900384 .enable = s5pv210_clk_ip1_ctrl,
385 .ctrlbit = (1<<16),
386 }, {
387 .name = "usb-host",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900388 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900389 .enable = s5pv210_clk_ip1_ctrl,
390 .ctrlbit = (1<<17),
391 }, {
392 .name = "lcd",
Thomas Abraham0fe967a2010-05-17 09:38:37 +0900393 .parent = &clk_hclk_dsys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900394 .enable = s5pv210_clk_ip1_ctrl,
395 .ctrlbit = (1<<0),
396 }, {
397 .name = "cfcon",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900398 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900399 .enable = s5pv210_clk_ip1_ctrl,
400 .ctrlbit = (1<<25),
401 }, {
402 .name = "hsmmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900403 .devname = "s3c-sdhci.0",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900404 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900405 .enable = s5pv210_clk_ip2_ctrl,
406 .ctrlbit = (1<<16),
407 }, {
408 .name = "hsmmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900409 .devname = "s3c-sdhci.1",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900410 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900411 .enable = s5pv210_clk_ip2_ctrl,
412 .ctrlbit = (1<<17),
413 }, {
414 .name = "hsmmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900415 .devname = "s3c-sdhci.2",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900416 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900417 .enable = s5pv210_clk_ip2_ctrl,
418 .ctrlbit = (1<<18),
419 }, {
420 .name = "hsmmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900421 .devname = "s3c-sdhci.3",
Thomas Abrahamacfa2452010-05-17 09:38:40 +0900422 .parent = &clk_hclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900423 .enable = s5pv210_clk_ip2_ctrl,
424 .ctrlbit = (1<<19),
425 }, {
426 .name = "systimer",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900427 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900428 .enable = s5pv210_clk_ip3_ctrl,
429 .ctrlbit = (1<<16),
430 }, {
431 .name = "watchdog",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900432 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900433 .enable = s5pv210_clk_ip3_ctrl,
434 .ctrlbit = (1<<22),
435 }, {
436 .name = "rtc",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900437 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900438 .enable = s5pv210_clk_ip3_ctrl,
439 .ctrlbit = (1<<15),
440 }, {
441 .name = "i2c",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900442 .devname = "s3c2440-i2c.0",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900443 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900444 .enable = s5pv210_clk_ip3_ctrl,
445 .ctrlbit = (1<<7),
446 }, {
447 .name = "i2c",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900448 .devname = "s3c2440-i2c.1",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900449 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900450 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Hamf1c894d2010-08-21 09:18:19 +0900451 .ctrlbit = (1 << 10),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900452 }, {
453 .name = "i2c",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900454 .devname = "s3c2440-i2c.2",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900455 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900456 .enable = s5pv210_clk_ip3_ctrl,
457 .ctrlbit = (1<<9),
458 }, {
Tomasz Stanislawskic40e7e02011-09-16 18:44:36 +0900459 .name = "i2c",
460 .devname = "s3c2440-hdmiphy-i2c",
461 .parent = &clk_pclk_psys.clk,
462 .enable = s5pv210_clk_ip3_ctrl,
463 .ctrlbit = (1 << 11),
464 }, {
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900465 .name = "spi",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900466 .devname = "s3c64xx-spi.0",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900467 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900468 .enable = s5pv210_clk_ip3_ctrl,
469 .ctrlbit = (1<<12),
470 }, {
471 .name = "spi",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900472 .devname = "s3c64xx-spi.1",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900473 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900474 .enable = s5pv210_clk_ip3_ctrl,
475 .ctrlbit = (1<<13),
476 }, {
477 .name = "spi",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900478 .devname = "s3c64xx-spi.2",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900479 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900480 .enable = s5pv210_clk_ip3_ctrl,
481 .ctrlbit = (1<<14),
482 }, {
483 .name = "timers",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900484 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900485 .enable = s5pv210_clk_ip3_ctrl,
486 .ctrlbit = (1<<23),
487 }, {
488 .name = "adc",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900489 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900490 .enable = s5pv210_clk_ip3_ctrl,
491 .ctrlbit = (1<<24),
492 }, {
493 .name = "keypad",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900494 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900495 .enable = s5pv210_clk_ip3_ctrl,
496 .ctrlbit = (1<<21),
497 }, {
Jassi Brar9aa25702010-11-19 08:49:44 +0900498 .name = "iis",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900499 .devname = "samsung-i2s.0",
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900500 .parent = &clk_p,
501 .enable = s5pv210_clk_ip3_ctrl,
502 .ctrlbit = (1<<4),
503 }, {
Jassi Brar9aa25702010-11-19 08:49:44 +0900504 .name = "iis",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900505 .devname = "samsung-i2s.1",
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900506 .parent = &clk_p,
507 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900508 .ctrlbit = (1 << 5),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900509 }, {
Jassi Brar9aa25702010-11-19 08:49:44 +0900510 .name = "iis",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900511 .devname = "samsung-i2s.2",
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900512 .parent = &clk_p,
513 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900514 .ctrlbit = (1 << 6),
Seungwhan Younaa21ae32010-10-14 10:35:24 +0900515 }, {
516 .name = "spdif",
Seungwhan Younaa21ae32010-10-14 10:35:24 +0900517 .parent = &clk_p,
518 .enable = s5pv210_clk_ip3_ctrl,
519 .ctrlbit = (1 << 0),
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900520 },
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900521};
522
523static struct clk init_clocks[] = {
524 {
Thomas Abraham664f5b22010-05-17 09:38:44 +0900525 .name = "hclk_imem",
Thomas Abraham664f5b22010-05-17 09:38:44 +0900526 .parent = &clk_hclk_msys.clk,
527 .ctrlbit = (1 << 5),
528 .enable = s5pv210_clk_ip0_ctrl,
529 .ops = &clk_hclk_imem_ops,
530 }, {
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900531 .name = "uart",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900532 .devname = "s5pv210-uart.0",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900533 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900534 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900535 .ctrlbit = (1 << 17),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900536 }, {
537 .name = "uart",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900538 .devname = "s5pv210-uart.1",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900539 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900540 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900541 .ctrlbit = (1 << 18),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900542 }, {
543 .name = "uart",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900544 .devname = "s5pv210-uart.2",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900545 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900546 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900547 .ctrlbit = (1 << 19),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900548 }, {
549 .name = "uart",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900550 .devname = "s5pv210-uart.3",
Thomas Abrahamf44cf782010-05-17 09:38:50 +0900551 .parent = &clk_pclk_psys.clk,
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900552 .enable = s5pv210_clk_ip3_ctrl,
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900553 .ctrlbit = (1 << 20),
Thomas Abraham81f9bec2010-12-01 18:12:48 +0530554 }, {
555 .name = "sromc",
Thomas Abraham81f9bec2010-12-01 18:12:48 +0530556 .parent = &clk_hclk_psys.clk,
557 .enable = s5pv210_clk_ip1_ctrl,
558 .ctrlbit = (1 << 26),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900559 },
560};
561
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900562static struct clk *clkset_uart_list[] = {
563 [6] = &clk_mout_mpll.clk,
564 [7] = &clk_mout_epll.clk,
565};
566
567static struct clksrc_sources clkset_uart = {
568 .sources = clkset_uart_list,
569 .nr_sources = ARRAY_SIZE(clkset_uart_list),
570};
571
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900572static struct clk *clkset_group1_list[] = {
573 [0] = &clk_sclk_a2m.clk,
574 [1] = &clk_mout_mpll.clk,
575 [2] = &clk_mout_epll.clk,
576 [3] = &clk_sclk_vpll.clk,
577};
578
579static struct clksrc_sources clkset_group1 = {
580 .sources = clkset_group1_list,
581 .nr_sources = ARRAY_SIZE(clkset_group1_list),
582};
583
584static struct clk *clkset_sclk_onenand_list[] = {
585 [0] = &clk_hclk_psys.clk,
586 [1] = &clk_hclk_dsys.clk,
587};
588
589static struct clksrc_sources clkset_sclk_onenand = {
590 .sources = clkset_sclk_onenand_list,
591 .nr_sources = ARRAY_SIZE(clkset_sclk_onenand_list),
592};
593
Thomas Abraham9e206142010-05-17 09:38:57 +0900594static struct clk *clkset_sclk_dac_list[] = {
595 [0] = &clk_sclk_vpll.clk,
596 [1] = &clk_sclk_hdmiphy,
597};
598
599static struct clksrc_sources clkset_sclk_dac = {
600 .sources = clkset_sclk_dac_list,
601 .nr_sources = ARRAY_SIZE(clkset_sclk_dac_list),
602};
603
604static struct clksrc_clk clk_sclk_dac = {
605 .clk = {
606 .name = "sclk_dac",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900607 .enable = s5pv210_clk_mask0_ctrl,
608 .ctrlbit = (1 << 2),
Thomas Abraham9e206142010-05-17 09:38:57 +0900609 },
610 .sources = &clkset_sclk_dac,
611 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 8, .size = 1 },
612};
613
614static struct clksrc_clk clk_sclk_pixel = {
615 .clk = {
616 .name = "sclk_pixel",
Thomas Abraham9e206142010-05-17 09:38:57 +0900617 .parent = &clk_sclk_vpll.clk,
618 },
619 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 0, .size = 4},
620};
621
622static struct clk *clkset_sclk_hdmi_list[] = {
623 [0] = &clk_sclk_pixel.clk,
624 [1] = &clk_sclk_hdmiphy,
625};
626
627static struct clksrc_sources clkset_sclk_hdmi = {
628 .sources = clkset_sclk_hdmi_list,
629 .nr_sources = ARRAY_SIZE(clkset_sclk_hdmi_list),
630};
631
632static struct clksrc_clk clk_sclk_hdmi = {
633 .clk = {
634 .name = "sclk_hdmi",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900635 .enable = s5pv210_clk_mask0_ctrl,
636 .ctrlbit = (1 << 0),
Thomas Abraham9e206142010-05-17 09:38:57 +0900637 },
638 .sources = &clkset_sclk_hdmi,
639 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 0, .size = 1 },
640};
641
642static struct clk *clkset_sclk_mixer_list[] = {
643 [0] = &clk_sclk_dac.clk,
644 [1] = &clk_sclk_hdmi.clk,
645};
646
647static struct clksrc_sources clkset_sclk_mixer = {
648 .sources = clkset_sclk_mixer_list,
649 .nr_sources = ARRAY_SIZE(clkset_sclk_mixer_list),
650};
651
Tomasz Stanislawskifbf05562011-09-19 16:44:42 +0900652static struct clksrc_clk clk_sclk_mixer = {
653 .clk = {
654 .name = "sclk_mixer",
655 .enable = s5pv210_clk_mask0_ctrl,
656 .ctrlbit = (1 << 1),
657 },
658 .sources = &clkset_sclk_mixer,
659 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 4, .size = 1 },
660};
661
662static struct clksrc_clk *sclk_tv[] = {
663 &clk_sclk_dac,
664 &clk_sclk_pixel,
665 &clk_sclk_hdmi,
666 &clk_sclk_mixer,
667};
668
Thomas Abraham45834872010-05-17 09:39:00 +0900669static struct clk *clkset_sclk_audio0_list[] = {
670 [0] = &clk_ext_xtal_mux,
671 [1] = &clk_pcmcdclk0,
672 [2] = &clk_sclk_hdmi27m,
673 [3] = &clk_sclk_usbphy0,
674 [4] = &clk_sclk_usbphy1,
675 [5] = &clk_sclk_hdmiphy,
676 [6] = &clk_mout_mpll.clk,
677 [7] = &clk_mout_epll.clk,
678 [8] = &clk_sclk_vpll.clk,
679};
680
681static struct clksrc_sources clkset_sclk_audio0 = {
682 .sources = clkset_sclk_audio0_list,
683 .nr_sources = ARRAY_SIZE(clkset_sclk_audio0_list),
684};
685
686static struct clksrc_clk clk_sclk_audio0 = {
687 .clk = {
688 .name = "sclk_audio",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900689 .devname = "soc-audio.0",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900690 .enable = s5pv210_clk_mask0_ctrl,
691 .ctrlbit = (1 << 24),
Thomas Abraham45834872010-05-17 09:39:00 +0900692 },
693 .sources = &clkset_sclk_audio0,
694 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 0, .size = 4 },
695 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 0, .size = 4 },
696};
697
698static struct clk *clkset_sclk_audio1_list[] = {
699 [0] = &clk_ext_xtal_mux,
700 [1] = &clk_pcmcdclk1,
701 [2] = &clk_sclk_hdmi27m,
702 [3] = &clk_sclk_usbphy0,
703 [4] = &clk_sclk_usbphy1,
704 [5] = &clk_sclk_hdmiphy,
705 [6] = &clk_mout_mpll.clk,
706 [7] = &clk_mout_epll.clk,
707 [8] = &clk_sclk_vpll.clk,
708};
709
710static struct clksrc_sources clkset_sclk_audio1 = {
711 .sources = clkset_sclk_audio1_list,
712 .nr_sources = ARRAY_SIZE(clkset_sclk_audio1_list),
713};
714
715static struct clksrc_clk clk_sclk_audio1 = {
716 .clk = {
717 .name = "sclk_audio",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900718 .devname = "soc-audio.1",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900719 .enable = s5pv210_clk_mask0_ctrl,
720 .ctrlbit = (1 << 25),
Thomas Abraham45834872010-05-17 09:39:00 +0900721 },
722 .sources = &clkset_sclk_audio1,
723 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 4, .size = 4 },
724 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 4, .size = 4 },
725};
726
727static struct clk *clkset_sclk_audio2_list[] = {
728 [0] = &clk_ext_xtal_mux,
729 [1] = &clk_pcmcdclk0,
730 [2] = &clk_sclk_hdmi27m,
731 [3] = &clk_sclk_usbphy0,
732 [4] = &clk_sclk_usbphy1,
733 [5] = &clk_sclk_hdmiphy,
734 [6] = &clk_mout_mpll.clk,
735 [7] = &clk_mout_epll.clk,
736 [8] = &clk_sclk_vpll.clk,
737};
738
739static struct clksrc_sources clkset_sclk_audio2 = {
740 .sources = clkset_sclk_audio2_list,
741 .nr_sources = ARRAY_SIZE(clkset_sclk_audio2_list),
742};
743
744static struct clksrc_clk clk_sclk_audio2 = {
745 .clk = {
746 .name = "sclk_audio",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900747 .devname = "soc-audio.2",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900748 .enable = s5pv210_clk_mask0_ctrl,
749 .ctrlbit = (1 << 26),
Thomas Abraham45834872010-05-17 09:39:00 +0900750 },
751 .sources = &clkset_sclk_audio2,
752 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 8, .size = 4 },
753 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 8, .size = 4 },
754};
755
756static struct clk *clkset_sclk_spdif_list[] = {
757 [0] = &clk_sclk_audio0.clk,
758 [1] = &clk_sclk_audio1.clk,
759 [2] = &clk_sclk_audio2.clk,
760};
761
762static struct clksrc_sources clkset_sclk_spdif = {
763 .sources = clkset_sclk_spdif_list,
764 .nr_sources = ARRAY_SIZE(clkset_sclk_spdif_list),
765};
766
Seungwhan Younaa21ae32010-10-14 10:35:24 +0900767static struct clksrc_clk clk_sclk_spdif = {
768 .clk = {
769 .name = "sclk_spdif",
Seungwhan Younaa21ae32010-10-14 10:35:24 +0900770 .enable = s5pv210_clk_mask0_ctrl,
771 .ctrlbit = (1 << 27),
Naveen Krishna Chatradhi65f5eaa2011-07-18 14:44:19 +0900772 .ops = &s5p_sclk_spdif_ops,
Seungwhan Younaa21ae32010-10-14 10:35:24 +0900773 },
774 .sources = &clkset_sclk_spdif,
775 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 12, .size = 2 },
776};
777
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900778static struct clk *clkset_group2_list[] = {
779 [0] = &clk_ext_xtal_mux,
780 [1] = &clk_xusbxti,
781 [2] = &clk_sclk_hdmi27m,
782 [3] = &clk_sclk_usbphy0,
783 [4] = &clk_sclk_usbphy1,
784 [5] = &clk_sclk_hdmiphy,
785 [6] = &clk_mout_mpll.clk,
786 [7] = &clk_mout_epll.clk,
787 [8] = &clk_sclk_vpll.clk,
788};
789
790static struct clksrc_sources clkset_group2 = {
791 .sources = clkset_group2_list,
792 .nr_sources = ARRAY_SIZE(clkset_group2_list),
793};
794
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900795static struct clksrc_clk clksrcs[] = {
796 {
797 .clk = {
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900798 .name = "sclk_dmc",
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900799 },
800 .sources = &clkset_group1,
801 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 },
802 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 },
803 }, {
804 .clk = {
805 .name = "sclk_onenand",
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +0900806 },
807 .sources = &clkset_sclk_onenand,
808 .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 },
809 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 12, .size = 3 },
810 }, {
811 .clk = {
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900812 .name = "uclk1",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900813 .devname = "s5pv210-uart.0",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900814 .enable = s5pv210_clk_mask0_ctrl,
815 .ctrlbit = (1 << 12),
Kukjin Kim0c1945d2010-02-24 16:40:36 +0900816 },
817 .sources = &clkset_uart,
818 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 16, .size = 4 },
819 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 16, .size = 4 },
Thomas Abraham9e206142010-05-17 09:38:57 +0900820 }, {
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900821 .clk = {
822 .name = "uclk1",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900823 .devname = "s5pv210-uart.1",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900824 .enable = s5pv210_clk_mask0_ctrl,
825 .ctrlbit = (1 << 13),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900826 },
827 .sources = &clkset_uart,
828 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 20, .size = 4 },
829 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 20, .size = 4 },
830 }, {
831 .clk = {
832 .name = "uclk1",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900833 .devname = "s5pv210-uart.2",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900834 .enable = s5pv210_clk_mask0_ctrl,
835 .ctrlbit = (1 << 14),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900836 },
837 .sources = &clkset_uart,
838 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 24, .size = 4 },
839 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 24, .size = 4 },
840 }, {
841 .clk = {
842 .name = "uclk1",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900843 .devname = "s5pv210-uart.3",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900844 .enable = s5pv210_clk_mask0_ctrl,
845 .ctrlbit = (1 << 15),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900846 },
847 .sources = &clkset_uart,
848 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 28, .size = 4 },
849 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 28, .size = 4 },
850 }, {
Thomas Abraham9e206142010-05-17 09:38:57 +0900851 .clk = {
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900852 .name = "sclk_fimc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900853 .devname = "s5pv210-fimc.0",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900854 .enable = s5pv210_clk_mask1_ctrl,
855 .ctrlbit = (1 << 2),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900856 },
857 .sources = &clkset_group2,
858 .reg_src = { .reg = S5P_CLK_SRC3, .shift = 12, .size = 4 },
859 .reg_div = { .reg = S5P_CLK_DIV3, .shift = 12, .size = 4 },
860 }, {
861 .clk = {
862 .name = "sclk_fimc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900863 .devname = "s5pv210-fimc.1",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900864 .enable = s5pv210_clk_mask1_ctrl,
865 .ctrlbit = (1 << 3),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900866 },
867 .sources = &clkset_group2,
868 .reg_src = { .reg = S5P_CLK_SRC3, .shift = 16, .size = 4 },
869 .reg_div = { .reg = S5P_CLK_DIV3, .shift = 16, .size = 4 },
870 }, {
871 .clk = {
872 .name = "sclk_fimc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900873 .devname = "s5pv210-fimc.2",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900874 .enable = s5pv210_clk_mask1_ctrl,
875 .ctrlbit = (1 << 4),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900876 },
877 .sources = &clkset_group2,
878 .reg_src = { .reg = S5P_CLK_SRC3, .shift = 20, .size = 4 },
879 .reg_div = { .reg = S5P_CLK_DIV3, .shift = 20, .size = 4 },
880 }, {
881 .clk = {
Sylwester Nawrocki83427c22011-09-27 07:00:53 +0900882 .name = "sclk_cam0",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900883 .enable = s5pv210_clk_mask0_ctrl,
884 .ctrlbit = (1 << 3),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900885 },
886 .sources = &clkset_group2,
887 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 12, .size = 4 },
888 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 12, .size = 4 },
889 }, {
890 .clk = {
Sylwester Nawrocki83427c22011-09-27 07:00:53 +0900891 .name = "sclk_cam1",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900892 .enable = s5pv210_clk_mask0_ctrl,
893 .ctrlbit = (1 << 4),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900894 },
895 .sources = &clkset_group2,
896 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 16, .size = 4 },
897 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 16, .size = 4 },
898 }, {
899 .clk = {
900 .name = "sclk_fimd",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900901 .enable = s5pv210_clk_mask0_ctrl,
902 .ctrlbit = (1 << 5),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900903 },
904 .sources = &clkset_group2,
905 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 20, .size = 4 },
906 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 20, .size = 4 },
907 }, {
908 .clk = {
909 .name = "sclk_mmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900910 .devname = "s3c-sdhci.0",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900911 .enable = s5pv210_clk_mask0_ctrl,
912 .ctrlbit = (1 << 8),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900913 },
914 .sources = &clkset_group2,
915 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 0, .size = 4 },
916 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 0, .size = 4 },
917 }, {
918 .clk = {
919 .name = "sclk_mmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900920 .devname = "s3c-sdhci.1",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900921 .enable = s5pv210_clk_mask0_ctrl,
922 .ctrlbit = (1 << 9),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900923 },
924 .sources = &clkset_group2,
925 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 4, .size = 4 },
926 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 4, .size = 4 },
927 }, {
928 .clk = {
929 .name = "sclk_mmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900930 .devname = "s3c-sdhci.2",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900931 .enable = s5pv210_clk_mask0_ctrl,
932 .ctrlbit = (1 << 10),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900933 },
934 .sources = &clkset_group2,
935 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 8, .size = 4 },
936 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 8, .size = 4 },
937 }, {
938 .clk = {
939 .name = "sclk_mmc",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900940 .devname = "s3c-sdhci.3",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900941 .enable = s5pv210_clk_mask0_ctrl,
942 .ctrlbit = (1 << 11),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900943 },
944 .sources = &clkset_group2,
945 .reg_src = { .reg = S5P_CLK_SRC4, .shift = 12, .size = 4 },
946 .reg_div = { .reg = S5P_CLK_DIV4, .shift = 12, .size = 4 },
947 }, {
948 .clk = {
949 .name = "sclk_mfc",
Kamil Debski0f75a962011-07-21 16:42:30 +0900950 .devname = "s5p-mfc",
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900951 .enable = s5pv210_clk_ip0_ctrl,
952 .ctrlbit = (1 << 16),
953 },
954 .sources = &clkset_group1,
955 .reg_src = { .reg = S5P_CLK_SRC2, .shift = 4, .size = 2 },
956 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 4, .size = 4 },
957 }, {
958 .clk = {
959 .name = "sclk_g2d",
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900960 .enable = s5pv210_clk_ip0_ctrl,
961 .ctrlbit = (1 << 12),
962 },
963 .sources = &clkset_group1,
964 .reg_src = { .reg = S5P_CLK_SRC2, .shift = 8, .size = 2 },
965 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 8, .size = 4 },
966 }, {
967 .clk = {
968 .name = "sclk_g3d",
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900969 .enable = s5pv210_clk_ip0_ctrl,
970 .ctrlbit = (1 << 8),
971 },
972 .sources = &clkset_group1,
973 .reg_src = { .reg = S5P_CLK_SRC2, .shift = 0, .size = 2 },
974 .reg_div = { .reg = S5P_CLK_DIV2, .shift = 0, .size = 4 },
975 }, {
976 .clk = {
977 .name = "sclk_csis",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900978 .enable = s5pv210_clk_mask0_ctrl,
979 .ctrlbit = (1 << 6),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900980 },
981 .sources = &clkset_group2,
982 .reg_src = { .reg = S5P_CLK_SRC1, .shift = 24, .size = 4 },
983 .reg_div = { .reg = S5P_CLK_DIV1, .shift = 28, .size = 4 },
984 }, {
985 .clk = {
986 .name = "sclk_spi",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900987 .devname = "s3c64xx-spi.0",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900988 .enable = s5pv210_clk_mask0_ctrl,
989 .ctrlbit = (1 << 16),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +0900990 },
991 .sources = &clkset_group2,
992 .reg_src = { .reg = S5P_CLK_SRC5, .shift = 0, .size = 4 },
993 .reg_div = { .reg = S5P_CLK_DIV5, .shift = 0, .size = 4 },
994 }, {
995 .clk = {
996 .name = "sclk_spi",
Thomas Abrahamb2a9dd42011-06-14 19:12:27 +0900997 .devname = "s3c64xx-spi.1",
MyungJoo Ham154d62e2010-06-26 17:21:50 +0900998 .enable = s5pv210_clk_mask0_ctrl,
999 .ctrlbit = (1 << 17),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +09001000 },
1001 .sources = &clkset_group2,
1002 .reg_src = { .reg = S5P_CLK_SRC5, .shift = 4, .size = 4 },
1003 .reg_div = { .reg = S5P_CLK_DIV5, .shift = 4, .size = 4 },
1004 }, {
1005 .clk = {
1006 .name = "sclk_pwi",
MyungJoo Ham154d62e2010-06-26 17:21:50 +09001007 .enable = s5pv210_clk_mask0_ctrl,
1008 .ctrlbit = (1 << 29),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +09001009 },
1010 .sources = &clkset_group2,
1011 .reg_src = { .reg = S5P_CLK_SRC6, .shift = 20, .size = 4 },
1012 .reg_div = { .reg = S5P_CLK_DIV6, .shift = 24, .size = 4 },
1013 }, {
1014 .clk = {
1015 .name = "sclk_pwm",
MyungJoo Ham154d62e2010-06-26 17:21:50 +09001016 .enable = s5pv210_clk_mask0_ctrl,
1017 .ctrlbit = (1 << 19),
Thomas Abrahamf64cacc2010-05-17 09:39:03 +09001018 },
1019 .sources = &clkset_group2,
1020 .reg_src = { .reg = S5P_CLK_SRC5, .shift = 12, .size = 4 },
1021 .reg_div = { .reg = S5P_CLK_DIV5, .shift = 12, .size = 4 },
Thomas Abraham9e206142010-05-17 09:38:57 +09001022 },
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001023};
1024
1025/* Clock initialisation code */
Thomas Abrahameb1ef1e2010-05-17 09:38:12 +09001026static struct clksrc_clk *sysclks[] = {
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001027 &clk_mout_apll,
1028 &clk_mout_epll,
1029 &clk_mout_mpll,
Thomas Abraham374e0bf2010-05-17 09:38:31 +09001030 &clk_armclk,
Thomas Abrahamaf76a202010-05-17 09:38:34 +09001031 &clk_hclk_msys,
Thomas Abraham0fe967a2010-05-17 09:38:37 +09001032 &clk_sclk_a2m,
1033 &clk_hclk_dsys,
Thomas Abrahamacfa2452010-05-17 09:38:40 +09001034 &clk_hclk_psys,
Thomas Abraham6ed91a22010-05-17 09:38:42 +09001035 &clk_pclk_msys,
Thomas Abraham58772cd2010-05-17 09:38:48 +09001036 &clk_pclk_dsys,
Thomas Abrahamf44cf782010-05-17 09:38:50 +09001037 &clk_pclk_psys,
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001038 &clk_vpllsrc,
1039 &clk_sclk_vpll,
Jaecheol Lee08f49d12010-10-12 09:19:30 +09001040 &clk_mout_dmc0,
1041 &clk_sclk_dmc0,
Seungwhan Youn900fa012010-10-14 10:35:24 +09001042 &clk_sclk_audio0,
1043 &clk_sclk_audio1,
1044 &clk_sclk_audio2,
1045 &clk_sclk_spdif,
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001046};
1047
Seungwhan Younc9fa7a02010-10-14 10:39:28 +09001048static u32 epll_div[][6] = {
1049 { 48000000, 0, 48, 3, 3, 0 },
1050 { 96000000, 0, 48, 3, 2, 0 },
1051 { 144000000, 1, 72, 3, 2, 0 },
1052 { 192000000, 0, 48, 3, 1, 0 },
1053 { 288000000, 1, 72, 3, 1, 0 },
1054 { 32750000, 1, 65, 3, 4, 35127 },
1055 { 32768000, 1, 65, 3, 4, 35127 },
1056 { 45158400, 0, 45, 3, 3, 10355 },
1057 { 45000000, 0, 45, 3, 3, 10355 },
1058 { 45158000, 0, 45, 3, 3, 10355 },
1059 { 49125000, 0, 49, 3, 3, 9961 },
1060 { 49152000, 0, 49, 3, 3, 9961 },
1061 { 67737600, 1, 67, 3, 3, 48366 },
1062 { 67738000, 1, 67, 3, 3, 48366 },
1063 { 73800000, 1, 73, 3, 3, 47710 },
1064 { 73728000, 1, 73, 3, 3, 47710 },
1065 { 36000000, 1, 32, 3, 4, 0 },
1066 { 60000000, 1, 60, 3, 3, 0 },
1067 { 72000000, 1, 72, 3, 3, 0 },
1068 { 80000000, 1, 80, 3, 3, 0 },
1069 { 84000000, 0, 42, 3, 2, 0 },
1070 { 50000000, 0, 50, 3, 3, 0 },
1071};
1072
1073static int s5pv210_epll_set_rate(struct clk *clk, unsigned long rate)
1074{
1075 unsigned int epll_con, epll_con_k;
1076 unsigned int i;
1077
1078 /* Return if nothing changed */
1079 if (clk->rate == rate)
1080 return 0;
1081
1082 epll_con = __raw_readl(S5P_EPLL_CON);
1083 epll_con_k = __raw_readl(S5P_EPLL_CON1);
1084
1085 epll_con_k &= ~PLL46XX_KDIV_MASK;
1086 epll_con &= ~(1 << 27 |
1087 PLL46XX_MDIV_MASK << PLL46XX_MDIV_SHIFT |
1088 PLL46XX_PDIV_MASK << PLL46XX_PDIV_SHIFT |
1089 PLL46XX_SDIV_MASK << PLL46XX_SDIV_SHIFT);
1090
1091 for (i = 0; i < ARRAY_SIZE(epll_div); i++) {
1092 if (epll_div[i][0] == rate) {
1093 epll_con_k |= epll_div[i][5] << 0;
1094 epll_con |= (epll_div[i][1] << 27 |
1095 epll_div[i][2] << PLL46XX_MDIV_SHIFT |
1096 epll_div[i][3] << PLL46XX_PDIV_SHIFT |
1097 epll_div[i][4] << PLL46XX_SDIV_SHIFT);
1098 break;
1099 }
1100 }
1101
1102 if (i == ARRAY_SIZE(epll_div)) {
1103 printk(KERN_ERR "%s: Invalid Clock EPLL Frequency\n",
1104 __func__);
1105 return -EINVAL;
1106 }
1107
1108 __raw_writel(epll_con, S5P_EPLL_CON);
1109 __raw_writel(epll_con_k, S5P_EPLL_CON1);
1110
Seungwhan Youn96166742010-10-14 10:39:33 +09001111 printk(KERN_WARNING "EPLL Rate changes from %lu to %lu\n",
1112 clk->rate, rate);
1113
Seungwhan Younc9fa7a02010-10-14 10:39:28 +09001114 clk->rate = rate;
1115
1116 return 0;
1117}
1118
1119static struct clk_ops s5pv210_epll_ops = {
1120 .set_rate = s5pv210_epll_set_rate,
1121 .get_rate = s5p_epll_get_rate,
1122};
1123
Tomasz Stanislawskifbf05562011-09-19 16:44:42 +09001124static u32 vpll_div[][5] = {
1125 { 54000000, 3, 53, 3, 0 },
1126 { 108000000, 3, 53, 2, 0 },
1127};
1128
1129static unsigned long s5pv210_vpll_get_rate(struct clk *clk)
1130{
1131 return clk->rate;
1132}
1133
1134static int s5pv210_vpll_set_rate(struct clk *clk, unsigned long rate)
1135{
1136 unsigned int vpll_con;
1137 unsigned int i;
1138
1139 /* Return if nothing changed */
1140 if (clk->rate == rate)
1141 return 0;
1142
1143 vpll_con = __raw_readl(S5P_VPLL_CON);
1144 vpll_con &= ~(0x1 << 27 | \
1145 PLL90XX_MDIV_MASK << PLL90XX_MDIV_SHIFT | \
1146 PLL90XX_PDIV_MASK << PLL90XX_PDIV_SHIFT | \
1147 PLL90XX_SDIV_MASK << PLL90XX_SDIV_SHIFT);
1148
1149 for (i = 0; i < ARRAY_SIZE(vpll_div); i++) {
1150 if (vpll_div[i][0] == rate) {
1151 vpll_con |= vpll_div[i][1] << PLL90XX_PDIV_SHIFT;
1152 vpll_con |= vpll_div[i][2] << PLL90XX_MDIV_SHIFT;
1153 vpll_con |= vpll_div[i][3] << PLL90XX_SDIV_SHIFT;
1154 vpll_con |= vpll_div[i][4] << 27;
1155 break;
1156 }
1157 }
1158
1159 if (i == ARRAY_SIZE(vpll_div)) {
1160 printk(KERN_ERR "%s: Invalid Clock VPLL Frequency\n",
1161 __func__);
1162 return -EINVAL;
1163 }
1164
1165 __raw_writel(vpll_con, S5P_VPLL_CON);
1166
1167 /* Wait for VPLL lock */
1168 while (!(__raw_readl(S5P_VPLL_CON) & (1 << PLL90XX_LOCKED_SHIFT)))
1169 continue;
1170
1171 clk->rate = rate;
1172 return 0;
1173}
1174static struct clk_ops s5pv210_vpll_ops = {
1175 .get_rate = s5pv210_vpll_get_rate,
1176 .set_rate = s5pv210_vpll_set_rate,
1177};
1178
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001179void __init_or_cpufreq s5pv210_setup_clocks(void)
1180{
1181 struct clk *xtal_clk;
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001182 unsigned long vpllsrc;
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001183 unsigned long armclk;
Thomas Abrahamaf76a202010-05-17 09:38:34 +09001184 unsigned long hclk_msys;
Thomas Abraham0fe967a2010-05-17 09:38:37 +09001185 unsigned long hclk_dsys;
Thomas Abrahamacfa2452010-05-17 09:38:40 +09001186 unsigned long hclk_psys;
Thomas Abraham6ed91a22010-05-17 09:38:42 +09001187 unsigned long pclk_msys;
Thomas Abraham58772cd2010-05-17 09:38:48 +09001188 unsigned long pclk_dsys;
Thomas Abrahamf44cf782010-05-17 09:38:50 +09001189 unsigned long pclk_psys;
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001190 unsigned long apll;
1191 unsigned long mpll;
1192 unsigned long epll;
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001193 unsigned long vpll;
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001194 unsigned int ptr;
1195 u32 clkdiv0, clkdiv1;
1196
Seungwhan Younc9fa7a02010-10-14 10:39:28 +09001197 /* Set functions for clk_fout_epll */
1198 clk_fout_epll.enable = s5p_epll_enable;
1199 clk_fout_epll.ops = &s5pv210_epll_ops;
1200
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001201 printk(KERN_DEBUG "%s: registering clocks\n", __func__);
1202
1203 clkdiv0 = __raw_readl(S5P_CLK_DIV0);
1204 clkdiv1 = __raw_readl(S5P_CLK_DIV1);
1205
1206 printk(KERN_DEBUG "%s: clkdiv0 = %08x, clkdiv1 = %08x\n",
1207 __func__, clkdiv0, clkdiv1);
1208
1209 xtal_clk = clk_get(NULL, "xtal");
1210 BUG_ON(IS_ERR(xtal_clk));
1211
1212 xtal = clk_get_rate(xtal_clk);
1213 clk_put(xtal_clk);
1214
1215 printk(KERN_DEBUG "%s: xtal is %ld\n", __func__, xtal);
1216
1217 apll = s5p_get_pll45xx(xtal, __raw_readl(S5P_APLL_CON), pll_4508);
1218 mpll = s5p_get_pll45xx(xtal, __raw_readl(S5P_MPLL_CON), pll_4502);
Seungwhan Youn42a6e202010-10-14 10:39:15 +09001219 epll = s5p_get_pll46xx(xtal, __raw_readl(S5P_EPLL_CON),
1220 __raw_readl(S5P_EPLL_CON1), pll_4600);
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001221 vpllsrc = clk_get_rate(&clk_vpllsrc.clk);
1222 vpll = s5p_get_pll45xx(vpllsrc, __raw_readl(S5P_VPLL_CON), pll_4502);
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001223
Jaecheol Lee88695842010-10-12 09:19:26 +09001224 clk_fout_apll.ops = &clk_fout_apll_ops;
Thomas Abrahamc62ec6a2010-05-17 09:38:28 +09001225 clk_fout_mpll.rate = mpll;
1226 clk_fout_epll.rate = epll;
Tomasz Stanislawskifbf05562011-09-19 16:44:42 +09001227 clk_fout_vpll.ops = &s5pv210_vpll_ops;
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001228 clk_fout_vpll.rate = vpll;
Thomas Abrahamc62ec6a2010-05-17 09:38:28 +09001229
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001230 printk(KERN_INFO "S5PV210: PLL settings, A=%ld, M=%ld, E=%ld V=%ld",
1231 apll, mpll, epll, vpll);
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001232
Thomas Abraham374e0bf2010-05-17 09:38:31 +09001233 armclk = clk_get_rate(&clk_armclk.clk);
Thomas Abrahamaf76a202010-05-17 09:38:34 +09001234 hclk_msys = clk_get_rate(&clk_hclk_msys.clk);
Thomas Abraham0fe967a2010-05-17 09:38:37 +09001235 hclk_dsys = clk_get_rate(&clk_hclk_dsys.clk);
Thomas Abrahamacfa2452010-05-17 09:38:40 +09001236 hclk_psys = clk_get_rate(&clk_hclk_psys.clk);
Thomas Abraham6ed91a22010-05-17 09:38:42 +09001237 pclk_msys = clk_get_rate(&clk_pclk_msys.clk);
Thomas Abraham58772cd2010-05-17 09:38:48 +09001238 pclk_dsys = clk_get_rate(&clk_pclk_dsys.clk);
Thomas Abrahamf44cf782010-05-17 09:38:50 +09001239 pclk_psys = clk_get_rate(&clk_pclk_psys.clk);
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001240
Thomas Abrahamacfa2452010-05-17 09:38:40 +09001241 printk(KERN_INFO "S5PV210: ARMCLK=%ld, HCLKM=%ld, HCLKD=%ld\n"
1242 "HCLKP=%ld, PCLKM=%ld, PCLKD=%ld, PCLKP=%ld\n",
1243 armclk, hclk_msys, hclk_dsys, hclk_psys,
Thomas Abrahamf44cf782010-05-17 09:38:50 +09001244 pclk_msys, pclk_dsys, pclk_psys);
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001245
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001246 clk_f.rate = armclk;
Thomas Abrahamacfa2452010-05-17 09:38:40 +09001247 clk_h.rate = hclk_psys;
Thomas Abrahamf44cf782010-05-17 09:38:50 +09001248 clk_p.rate = pclk_psys;
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001249
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001250 for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
1251 s3c_set_clksrc(&clksrcs[ptr], true);
1252}
1253
1254static struct clk *clks[] __initdata = {
Thomas Abrahamf445dbd2010-05-17 09:38:52 +09001255 &clk_sclk_hdmi27m,
Thomas Abraham2cf4c2e2010-05-17 09:38:55 +09001256 &clk_sclk_hdmiphy,
1257 &clk_sclk_usbphy0,
1258 &clk_sclk_usbphy1,
Thomas Abraham45834872010-05-17 09:39:00 +09001259 &clk_pcmcdclk0,
1260 &clk_pcmcdclk1,
1261 &clk_pcmcdclk2,
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001262};
1263
1264void __init s5pv210_register_clocks(void)
1265{
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001266 int ptr;
1267
Kukjin Kim3c0fa642011-01-04 17:51:30 +09001268 s3c24xx_register_clocks(clks, ARRAY_SIZE(clks));
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001269
Thomas Abrahameb1ef1e2010-05-17 09:38:12 +09001270 for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
1271 s3c_register_clksrc(sysclks[ptr], 1);
1272
Tomasz Stanislawskifbf05562011-09-19 16:44:42 +09001273 for (ptr = 0; ptr < ARRAY_SIZE(sclk_tv); ptr++)
1274 s3c_register_clksrc(sclk_tv[ptr], 1);
1275
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001276 s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
1277 s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
1278
Kukjin Kim3c0fa642011-01-04 17:51:30 +09001279 s3c_register_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
1280 s3c_disable_clocks(init_clocks_off, ARRAY_SIZE(init_clocks_off));
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001281
Boojin Kimdafc9542011-09-02 09:44:37 +09001282 s3c24xx_register_clock(&dummy_apb_pclk);
Kukjin Kim0c1945d2010-02-24 16:40:36 +09001283 s3c_pwmclk_init();
1284}