Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440911

[PATCH] amba: Support clk parents and rates assigned in DT

From Stephen Boyd <sboyd@codeaurora.org>
Newsgroups linux.kernel
Subject [PATCH] amba: Support clk parents and rates assigned in DT
Date 2016-07-11 23:10 +0200
Message-ID <rTQCK-3Y9-35@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


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>
Cc: Jorge Ramirez Ortiz <jorge.ramirez-ortiz@linaro.org>
Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
---
 drivers/amba/bus.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c
index a5b5c87e2114..a56fa2a1e9aa 100644
--- a/drivers/amba/bus.c
+++ b/drivers/amba/bus.c
@@ -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;
-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH] amba: Support clk parents and rates assigned in DT Stephen Boyd <sboyd@codeaurora.org> - 2016-07-11 23:10 +0200
  Re: [PATCH] amba: Support clk parents and rates assigned in DT Jorge Ramirez <jorge.ramirez-ortiz@linaro.org> - 2016-07-12 02:50 +0200

csiph-web