Commit fb049114 authored by Thomas Abraham's avatar Thomas Abraham Committed by Ben Dooks

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: default avatarThomas Abraham <thomas.ab@samsung.com>
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
Signed-off-by: default avatarBen Dooks <ben-linux@fluff.org>
parent 7ebd4675
...@@ -574,7 +574,7 @@ static struct clksrc_clk clksrcs[] = { ...@@ -574,7 +574,7 @@ static struct clksrc_clk clksrcs[] = {
}; };
/* Clock initialisation code */ /* Clock initialisation code */
static struct clksrc_clk *init_parents[] = { static struct clksrc_clk *sysclks[] = {
&clk_mout_apll, &clk_mout_apll,
&clk_mout_epll, &clk_mout_epll,
&clk_mout_mpll, &clk_mout_mpll,
...@@ -652,17 +652,12 @@ void __init_or_cpufreq s5p6440_setup_clocks(void) ...@@ -652,17 +652,12 @@ void __init_or_cpufreq s5p6440_setup_clocks(void)
clk_h_low.rate = hclk_low; clk_h_low.rate = hclk_low;
clk_p_low.rate = pclk_low; clk_p_low.rate = pclk_low;
for (ptr = 0; ptr < ARRAY_SIZE(init_parents); ptr++)
s3c_set_clksrc(init_parents[ptr], true);
for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++) for (ptr = 0; ptr < ARRAY_SIZE(clksrcs); ptr++)
s3c_set_clksrc(&clksrcs[ptr], true); s3c_set_clksrc(&clksrcs[ptr], true);
} }
static struct clk *clks[] __initdata = { static struct clk *clks[] __initdata = {
&clk_ext, &clk_ext,
&clk_mout_epll.clk,
&clk_mout_mpll.clk,
&clk_dout_mpll, &clk_dout_mpll,
&clk_iis_cd_v40, &clk_iis_cd_v40,
&clk_pcm_cd, &clk_pcm_cd,
...@@ -680,6 +675,9 @@ void __init s5p6440_register_clocks(void) ...@@ -680,6 +675,9 @@ void __init s5p6440_register_clocks(void)
if (ret > 0) if (ret > 0)
printk(KERN_ERR "Failed to register %u clocks\n", ret); printk(KERN_ERR "Failed to register %u clocks\n", ret);
for (ptr = 0; ptr < ARRAY_SIZE(sysclks); ptr++)
s3c_register_clksrc(sysclks[ptr], 1);
s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs)); s3c_register_clksrc(clksrcs, ARRAY_SIZE(clksrcs));
s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks)); s3c_register_clocks(init_clocks, ARRAY_SIZE(init_clocks));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment