diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2010-05-12 20:26:49 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-12 21:14:47 -0400 |
commit | fb0491146518c24b8ded5f9afa59b1df3749dea9 (patch) | |
tree | ffd64ab1d779de9d4f20444fc22b16a3f4636755 /arch/arm/mach-s5p6440/clock.c | |
parent | 7ebd467551ed6ae200d7835a84bbda0dcadaa511 (diff) |
ARM: S5P6440: Register apll/mpll/epll mout clocks.
This patch modifies the following.
1. Registers the mout_apll clksrc_clk clock.
2. The mout_mpll and mout_epll were registered as 'struct clk'
types and then their parents were setup using the s3c_set_clksrc
function. This patch reduces the two steps into one by registering
the mout_mpll and mout_epll clocks using the s3c_register_clksrc
function.
3. As per point 2 above, the init_parents array is no longer required.
So the mout clocks are now put together in a new array named 'sysclks'.
The sysclks array will list the system level clocks and more
clocks will be added to it in the subsequent patches.
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-s5p6440/clock.c')
-rw-r--r-- | arch/arm/mach-s5p6440/clock.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/arch/arm/mach-s5p6440/clock.c b/arch/arm/mach-s5p6440/clock.c index b2672e16e7a..3ad63f41309 100644 --- a/arch/arm/mach-s5p6440/clock.c +++ b/arch/arm/mach-s5p6440/clock.c | |||
@@ -574,7 +574,7 @@ static struct clksrc_clk clksrcs[] = { | |||
574 | }; | 574 | }; |
575 | 575 | ||
576 | /* Clock initialisation code */ | 576 | /* Clock initialisation code */ |
577 | static struct clksrc_clk *init_parents[] = { | 577 | static struct clksrc_clk *sysclks[] = { |
578 | &clk_mout_apll, | 578 | &clk_mout_apll, |
579 | &clk_mout_epll, | 579 | &clk_mout_epll, |
580 | &clk_mout_mpll, | 580 | &clk_mout_mpll, |
@@ -652,17 +652,12 @@ void __init_or_cpufreq s5p6440_setup_clocks(void) | |||
652 | clk_h_low.rate = hclk_low; | 652 | clk_h_low.rate = hclk_low; |
653 | clk_p_low.rate = pclk_low; | 653 | clk_p_low.rate = pclk_low; |
654 | 654 | ||
655 | for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++) | ||
656 | s3c_set_clksrc(init_parents[ptr], true); | ||
657 | |||
658 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) | 655 | for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) |
659 | s3c_set_clksrc(&clksrcs[ptr], true); | 656 | s3c_set_clksrc(&clksrcs[ptr], true); |
660 | } | 657 | } |
661 | 658 | ||
662 | static struct clk *clks[] __initdata = { | 659 | static struct clk *clks[] __initdata = { |
663 | &clk_ext, | 660 | &clk_ext, |
664 | &clk_mout_epll.clk, | ||
665 | &clk_mout_mpll.clk, | ||
666 | &clk_dout_mpll, | 661 | &clk_dout_mpll, |
667 | &clk_iis_cd_v40, | 662 | &clk_iis_cd_v40, |
668 | &clk_pcm_cd, | 663 | &clk_pcm_cd, |
@@ -680,6 +675,9 @@ void __init s5p6440_register_clocks(void) | |||
680 | if (ret > 0) | 675 | if (ret > 0) |
681 | printk(KERN_ERR "Failed to register %u clocks\n", ret); | 676 | printk(KERN_ERR "Failed to register %u clocks\n", ret); |
682 | 677 | ||
678 | for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++) | ||
679 | s3c_register_clksrc(sysclks[ptr], 1); | ||
680 | |||
683 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); | 681 | s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); |
684 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); | 682 | s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); |
685 | 683 | ||