summaryrefslogtreecommitdiff
path: root/drivers/clk/mvebu/armada-370.c
diff options
context:
space:
mode:
authorMike Turquette <mturquette@linaro.org>2014-02-19 09:41:40 +0400
committerMike Turquette <mturquette@linaro.org>2014-02-19 09:41:40 +0400
commit37a4493ee73b93c4d25e57d5ac975e4cb48165f5 (patch)
tree897a5792602fc400835155b8f4dd08bf72b6791b /drivers/clk/mvebu/armada-370.c
parent8510e7263ad9399e771e0f67517a0d5409390445 (diff)
parent58d516ae95cbf7eed44f85a01cdfad41f17b4197 (diff)
downloadlinux-37a4493ee73b93c4d25e57d5ac975e4cb48165f5.tar.xz
Merge tag 'mvebu-clk-fixes-3.14' of git://git.infradead.org/linux-mvebu into clk-fixes
mvebu clock fixes for v3.14 - kirkwood, dove, armada-xp, armada-370 - force clock init order broken by sorting DT ocp nodes by address - fixes boot failures on affected platforms
Diffstat (limited to 'drivers/clk/mvebu/armada-370.c')
-rw-r--r--drivers/clk/mvebu/armada-370.c21
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/clk/mvebu/armada-370.c b/drivers/clk/mvebu/armada-370.c
index 81a202d12a7a..bef198a83863 100644
--- a/drivers/clk/mvebu/armada-370.c
+++ b/drivers/clk/mvebu/armada-370.c
@@ -141,13 +141,6 @@ static const struct coreclk_soc_desc a370_coreclks = {
.num_ratios = ARRAY_SIZE(a370_coreclk_ratios),
};
-static void __init a370_coreclk_init(struct device_node *np)
-{
- mvebu_coreclk_setup(np, &a370_coreclks);
-}
-CLK_OF_DECLARE(a370_core_clk, "marvell,armada-370-core-clock",
- a370_coreclk_init);
-
/*
* Clock Gating Control
*/
@@ -168,9 +161,15 @@ static const struct clk_gating_soc_desc a370_gating_desc[] __initconst = {
{ }
};
-static void __init a370_clk_gating_init(struct device_node *np)
+static void __init a370_clk_init(struct device_node *np)
{
- mvebu_clk_gating_setup(np, a370_gating_desc);
+ struct device_node *cgnp =
+ of_find_compatible_node(NULL, NULL, "marvell,armada-370-gating-clock");
+
+ mvebu_coreclk_setup(np, &a370_coreclks);
+
+ if (cgnp)
+ mvebu_clk_gating_setup(cgnp, a370_gating_desc);
}
-CLK_OF_DECLARE(a370_clk_gating, "marvell,armada-370-gating-clock",
- a370_clk_gating_init);
+CLK_OF_DECLARE(a370_clk, "marvell,armada-370-core-clock", a370_clk_init);
+