diff options
author | Mike Turquette <mturquette@linaro.org> | 2014-02-24 23:07:53 -0800 |
---|---|---|
committer | Mike Turquette <mturquette@linaro.org> | 2014-02-24 23:07:53 -0800 |
commit | ad077ceb8a90c7ef1fc15758ed3811448181ee80 (patch) | |
tree | dc090e24bb82c41c3785e539b9e60df6c48abfaf /drivers/clk/mvebu/armada-xp.c | |
parent | c05ab9a0cc8e2b958bb2db2f8f1d200e568a75d4 (diff) | |
parent | 10b7cdc0084c27a312e59e80420c6aac70c64753 (diff) |
Merge branch 'clk-fixes' into clk-next
Diffstat (limited to 'drivers/clk/mvebu/armada-xp.c')
-rw-r--r-- | drivers/clk/mvebu/armada-xp.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/drivers/clk/mvebu/armada-xp.c b/drivers/clk/mvebu/armada-xp.c index 9922c4475aa8..b3094315a3c0 100644 --- a/drivers/clk/mvebu/armada-xp.c +++ b/drivers/clk/mvebu/armada-xp.c @@ -158,13 +158,6 @@ static const struct coreclk_soc_desc axp_coreclks = { .num_ratios = ARRAY_SIZE(axp_coreclk_ratios), }; -static void __init axp_coreclk_init(struct device_node *np) -{ - mvebu_coreclk_setup(np, &axp_coreclks); -} -CLK_OF_DECLARE(axp_core_clk, "marvell,armada-xp-core-clock", - axp_coreclk_init); - /* * Clock Gating Control */ @@ -202,9 +195,14 @@ static const struct clk_gating_soc_desc axp_gating_desc[] __initconst = { { } }; -static void __init axp_clk_gating_init(struct device_node *np) +static void __init axp_clk_init(struct device_node *np) { - mvebu_clk_gating_setup(np, axp_gating_desc); + struct device_node *cgnp = + of_find_compatible_node(NULL, NULL, "marvell,armada-xp-gating-clock"); + + mvebu_coreclk_setup(np, &axp_coreclks); + + if (cgnp) + mvebu_clk_gating_setup(cgnp, axp_gating_desc); } -CLK_OF_DECLARE(axp_clk_gating, "marvell,armada-xp-gating-clock", - axp_clk_gating_init); +CLK_OF_DECLARE(axp_clk, "marvell,armada-xp-core-clock", axp_clk_init); |