diff options
author | Tomasz Figa <t.figa@samsung.com> | 2013-08-26 13:09:11 -0400 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2013-09-06 16:34:05 -0400 |
commit | 22e9e7589e7bc6006af983f73e4a4057dbd9da66 (patch) | |
tree | 66b4939aa07d1c15f25ca6ded05e4cc27fe81e4c | |
parent | efb19a85cb0b44c06ed5ff7c397341ab852148e5 (diff) |
clk: samsung: exynos5250: Simplify registration of PLL rate tables
Since the _get_rate() helper has been modified to use __clk_lookup()
internally, checking of PLL input rates can be done using it and so the
registration code can be simplified.
Signed-off-by: Tomasz Figa <t.figa@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mike Turquette <mturquette@linaro.org>
-rw-r--r-- | drivers/clk/samsung/clk-exynos5250.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/drivers/clk/samsung/clk-exynos5250.c b/drivers/clk/samsung/clk-exynos5250.c index d90e59326252..adf32343c9f9 100644 --- a/drivers/clk/samsung/clk-exynos5250.c +++ b/drivers/clk/samsung/clk-exynos5250.c | |||
@@ -543,8 +543,6 @@ static struct of_device_id ext_clk_match[] __initdata = { | |||
543 | static void __init exynos5250_clk_init(struct device_node *np) | 543 | static void __init exynos5250_clk_init(struct device_node *np) |
544 | { | 544 | { |
545 | void __iomem *reg_base; | 545 | void __iomem *reg_base; |
546 | struct clk *vpllsrc; | ||
547 | unsigned long fin_pll_rate, mout_vpllsrc_rate = 0; | ||
548 | 546 | ||
549 | if (np) { | 547 | if (np) { |
550 | reg_base = of_iomap(np, 0); | 548 | reg_base = of_iomap(np, 0); |
@@ -563,16 +561,10 @@ static void __init exynos5250_clk_init(struct device_node *np) | |||
563 | samsung_clk_register_mux(exynos5250_pll_pmux_clks, | 561 | samsung_clk_register_mux(exynos5250_pll_pmux_clks, |
564 | ARRAY_SIZE(exynos5250_pll_pmux_clks)); | 562 | ARRAY_SIZE(exynos5250_pll_pmux_clks)); |
565 | 563 | ||
566 | fin_pll_rate = _get_rate("fin_pll"); | 564 | if (_get_rate("fin_pll") == 24 * MHZ) |
567 | |||
568 | if (fin_pll_rate == 24 * MHZ) | ||
569 | exynos5250_plls[epll].rate_table = epll_24mhz_tbl; | 565 | exynos5250_plls[epll].rate_table = epll_24mhz_tbl; |
570 | 566 | ||
571 | vpllsrc = __clk_lookup("mout_vpllsrc"); | 567 | if (_get_rate("mout_vpllsrc") == 24 * MHZ) |
572 | if (vpllsrc) | ||
573 | mout_vpllsrc_rate = clk_get_rate(vpllsrc); | ||
574 | |||
575 | if (mout_vpllsrc_rate == 24 * MHZ) | ||
576 | exynos5250_plls[vpll].rate_table = vpll_24mhz_tbl; | 568 | exynos5250_plls[vpll].rate_table = vpll_24mhz_tbl; |
577 | 569 | ||
578 | samsung_clk_register_pll(exynos5250_plls, ARRAY_SIZE(exynos5250_plls), | 570 | samsung_clk_register_pll(exynos5250_plls, ARRAY_SIZE(exynos5250_plls), |