diff options
author | Thomas Abraham <thomas.ab@samsung.com> | 2010-05-12 20:26:58 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2010-05-12 21:14:48 -0400 |
commit | 30d58349608c3a31dbea0cc9238f6d8edc21e299 (patch) | |
tree | 53c6ba8a569ae0d272d7ffb9a3ec60d9a74a5fe5 /arch/arm/mach-s5p6440/clock.c | |
parent | fb0491146518c24b8ded5f9afa59b1df3749dea9 (diff) |
ARM: S5P6440: Change dout_mpll clock type to clksrc_clk clock type.
This patch modifies the following.
1. Modifies the dout_mpll clock type as clksrc_clk clock type.
This modification allows the use of common clock code in
managing the dout_mpll clock (which otherwise would need
custom defined functions such as s5p6440_clk_doutmpll_get_rate).
2. s5p6440_clk_doutmpll_get_rate function is removed as it is
no longer needed.
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 | 28 |
1 files changed, 9 insertions, 19 deletions
diff --git a/arch/arm/mach-s5p6440/clock.c b/arch/arm/mach-s5p6440/clock.c index 3ad63f41309e..8bd6f15a2ac1 100644 --- a/arch/arm/mach-s5p6440/clock.c +++ b/arch/arm/mach-s5p6440/clock.c | |||
@@ -247,23 +247,13 @@ static struct clk_ops s5p6440_clkarm_ops = { | |||
247 | .round_rate = s5p6440_armclk_round_rate, | 247 | .round_rate = s5p6440_armclk_round_rate, |
248 | }; | 248 | }; |
249 | 249 | ||
250 | static unsigned long s5p6440_clk_doutmpll_get_rate(struct clk *clk) | 250 | static struct clksrc_clk clk_dout_mpll = { |
251 | { | 251 | .clk = { |
252 | unsigned long rate = clk_get_rate(clk->parent); | 252 | .name = "dout_mpll", |
253 | 253 | .id = -1, | |
254 | if (__raw_readl(S5P_CLK_DIV0) & S5P_CLKDIV0_MPLL_MASK) | 254 | .parent = &clk_mout_mpll.clk, |
255 | rate /= 2; | ||
256 | |||
257 | return rate; | ||
258 | } | ||
259 | |||
260 | static struct clk clk_dout_mpll = { | ||
261 | .name = "dout_mpll", | ||
262 | .id = -1, | ||
263 | .parent = &clk_mout_mpll.clk, | ||
264 | .ops = &(struct clk_ops) { | ||
265 | .get_rate = s5p6440_clk_doutmpll_get_rate, | ||
266 | }, | 255 | }, |
256 | .reg_div = { .reg = S5P_CLK_DIV0, .shift = 4, .size = 1 }, | ||
267 | }; | 257 | }; |
268 | 258 | ||
269 | int s5p6440_clk48m_ctrl(struct clk *clk, int enable) | 259 | int s5p6440_clk48m_ctrl(struct clk *clk, int enable) |
@@ -490,7 +480,7 @@ static struct clk clk_pcm_cd = { | |||
490 | 480 | ||
491 | static struct clk *clkset_spi_mmc_list[] = { | 481 | static struct clk *clkset_spi_mmc_list[] = { |
492 | &clk_mout_epll.clk, | 482 | &clk_mout_epll.clk, |
493 | &clk_dout_mpll, | 483 | &clk_dout_mpll.clk, |
494 | &clk_fin_epll, | 484 | &clk_fin_epll, |
495 | }; | 485 | }; |
496 | 486 | ||
@@ -501,7 +491,7 @@ static struct clksrc_sources clkset_spi_mmc = { | |||
501 | 491 | ||
502 | static struct clk *clkset_uart_list[] = { | 492 | static struct clk *clkset_uart_list[] = { |
503 | &clk_mout_epll.clk, | 493 | &clk_mout_epll.clk, |
504 | &clk_dout_mpll | 494 | &clk_dout_mpll.clk, |
505 | }; | 495 | }; |
506 | 496 | ||
507 | static struct clksrc_sources clkset_uart = { | 497 | static struct clksrc_sources clkset_uart = { |
@@ -578,6 +568,7 @@ static struct clksrc_clk *sysclks[] = { | |||
578 | &clk_mout_apll, | 568 | &clk_mout_apll, |
579 | &clk_mout_epll, | 569 | &clk_mout_epll, |
580 | &clk_mout_mpll, | 570 | &clk_mout_mpll, |
571 | &clk_dout_mpll, | ||
581 | }; | 572 | }; |
582 | 573 | ||
583 | void __init_or_cpufreq s5p6440_setup_clocks(void) | 574 | void __init_or_cpufreq s5p6440_setup_clocks(void) |
@@ -658,7 +649,6 @@ void __init_or_cpufreq s5p6440_setup_clocks(void) | |||
658 | 649 | ||
659 | static struct clk *clks[] __initdata = { | 650 | static struct clk *clks[] __initdata = { |
660 | &clk_ext, | 651 | &clk_ext, |
661 | &clk_dout_mpll, | ||
662 | &clk_iis_cd_v40, | 652 | &clk_iis_cd_v40, |
663 | &clk_pcm_cd, | 653 | &clk_pcm_cd, |
664 | &clk_p_low, | 654 | &clk_p_low, |