diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2010-05-16 20:38:55 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-16 21:37:38 -0400 |
commit | 2cf4c2e6301f19e08b7090c024b312f6e2c0f230 (patch) | |
tree | 0d01ad479d049b7d1e02df7e68eb3c6751dad9bb /arch/arm/mach-s5pv210/clock.c | |
parent | f445dbd5af7863dd7dce4685e39980419d4144eb (diff) |
ARM: S5PV210: Add new system clocks
This patch adds the following system clocks.
1. clk_sclk_hdmiphy
2. clk_sclk_usbphy0
3. clk_sclk_usbphy1
4. sclk_dmc (dram memory controller clock)
5. sclk_onenand
Signed-off-by: Thomas Abraham <thomas.ab@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch/arm/mach-s5pv210/clock.c')
-rw-r--r-- | arch/arm/mach-s5pv210/clock.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/arch/arm/mach-s5pv210/clock.c b/arch/arm/mach-s5pv210/clock.c index c86bff525dbe..2c7be15b5895 100644 --- a/arch/arm/mach-s5pv210/clock.c +++ b/arch/arm/mach-s5pv210/clock.c | |||
@@ -184,6 +184,21 @@ static struct clk clk_sclk_hdmi27m = { | |||
184 | .rate = 27000000, | 184 | .rate = 27000000, |
185 | }; | 185 | }; |
186 | 186 | ||
187 | static struct clk clk_sclk_hdmiphy = { | ||
188 | .name = "sclk_hdmiphy", | ||
189 | .id = -1, | ||
190 | }; | ||
191 | |||
192 | static struct clk clk_sclk_usbphy0 = { | ||
193 | .name = "sclk_usbphy0", | ||
194 | .id = -1, | ||
195 | }; | ||
196 | |||
197 | static struct clk clk_sclk_usbphy1 = { | ||
198 | .name = "sclk_usbphy1", | ||
199 | .id = -1, | ||
200 | }; | ||
201 | |||
187 | static struct clk *clkset_vpllsrc_list[] = { | 202 | static struct clk *clkset_vpllsrc_list[] = { |
188 | [0] = &clk_fin_vpll, | 203 | [0] = &clk_fin_vpll, |
189 | [1] = &clk_sclk_hdmi27m, | 204 | [1] = &clk_sclk_hdmi27m, |
@@ -426,9 +441,47 @@ static struct clksrc_sources clkset_uart = { | |||
426 | .nr_sources = ARRAY_SIZE(clkset_uart_list), | 441 | .nr_sources = ARRAY_SIZE(clkset_uart_list), |
427 | }; | 442 | }; |
428 | 443 | ||
444 | static struct clk *clkset_group1_list[] = { | ||
445 | [0] = &clk_sclk_a2m.clk, | ||
446 | [1] = &clk_mout_mpll.clk, | ||
447 | [2] = &clk_mout_epll.clk, | ||
448 | [3] = &clk_sclk_vpll.clk, | ||
449 | }; | ||
450 | |||
451 | static struct clksrc_sources clkset_group1 = { | ||
452 | .sources = clkset_group1_list, | ||
453 | .nr_sources = ARRAY_SIZE(clkset_group1_list), | ||
454 | }; | ||
455 | |||
456 | static struct clk *clkset_sclk_onenand_list[] = { | ||
457 | [0] = &clk_hclk_psys.clk, | ||
458 | [1] = &clk_hclk_dsys.clk, | ||
459 | }; | ||
460 | |||
461 | static struct clksrc_sources clkset_sclk_onenand = { | ||
462 | .sources = clkset_sclk_onenand_list, | ||
463 | .nr_sources = ARRAY_SIZE(clkset_sclk_onenand_list), | ||
464 | }; | ||
465 | |||
429 | static struct clksrc_clk clksrcs[] = { | 466 | static struct clksrc_clk clksrcs[] = { |
430 | { | 467 | { |
431 | .clk = { | 468 | .clk = { |
469 | .name = "sclk_dmc", | ||
470 | .id = -1, | ||
471 | }, | ||
472 | .sources = &clkset_group1, | ||
473 | .reg_src = { .reg = S5P_CLK_SRC6, .shift = 24, .size = 2 }, | ||
474 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 28, .size = 4 }, | ||
475 | }, { | ||
476 | .clk = { | ||
477 | .name = "sclk_onenand", | ||
478 | .id = -1, | ||
479 | }, | ||
480 | .sources = &clkset_sclk_onenand, | ||
481 | .reg_src = { .reg = S5P_CLK_SRC0, .shift = 28, .size = 1 }, | ||
482 | .reg_div = { .reg = S5P_CLK_DIV6, .shift = 12, .size = 3 }, | ||
483 | }, { | ||
484 | .clk = { | ||
432 | .name = "uclk1", | 485 | .name = "uclk1", |
433 | .id = -1, | 486 | .id = -1, |
434 | .ctrlbit = (1<<17), | 487 | .ctrlbit = (1<<17), |
@@ -529,6 +582,9 @@ void __init_or_cpufreq s5pv210_setup_clocks(void) | |||
529 | 582 | ||
530 | static struct clk *clks[] __initdata = { | 583 | static struct clk *clks[] __initdata = { |
531 | &clk_sclk_hdmi27m, | 584 | &clk_sclk_hdmi27m, |
585 | &clk_sclk_hdmiphy, | ||
586 | &clk_sclk_usbphy0, | ||
587 | &clk_sclk_usbphy1, | ||
532 | }; | 588 | }; |
533 | 589 | ||
534 | void __init s5pv210_register_clocks(void) | 590 | void __init s5pv210_register_clocks(void) |