]> git.ipfire.org Git - people/arne_f/kernel.git/commitdiff
ARM: 8596/1: amba: Support clk parents and rates assigned in DT
authorStephen Boyd <sboyd@codeaurora.org>
Wed, 10 Aug 2016 19:17:34 +0000 (20:17 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Fri, 12 Aug 2016 15:47:07 +0000 (16:47 +0100)
Add the call to of_clk_set_defaults() into the amba probe path so
that devices on the amba bus can use the assigned rates and
parents feature of the common clock framework.

Cc: Michael Turquette <mturquette@baylibre.com>
Tested-by: Jorge Ramirez Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
drivers/amba/bus.c

index a5b5c87e21149f4df50d6dc21e6de016bbae29af..a56fa2a1e9aaf74b772a19fc8a00538933b71974 100644 (file)
@@ -19,6 +19,7 @@
 #include <linux/amba/bus.h>
 #include <linux/sizes.h>
 #include <linux/limits.h>
+#include <linux/clk/clk-conf.h>
 
 #include <asm/irq.h>
 
@@ -237,6 +238,10 @@ static int amba_probe(struct device *dev)
        int ret;
 
        do {
+               ret = of_clk_set_defaults(dev->of_node, false);
+               if (ret < 0)
+                       break;
+
                ret = dev_pm_domain_attach(dev, true);
                if (ret == -EPROBE_DEFER)
                        break;