Skip to contentSkip to conversation

amba: Support clk parents and rates assigned in DT

PATCH In review Stephen Boyd 3 participants 4 messages Jul 11, 2016 – Aug 19, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 amba: Support clk parents and rates assigned in DT

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 <[email protected]>
Cc Jorge Ramirez Ortiz <[email protected]>
---
 drivers/amba/bus.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/amba/bus.c +5 -0
index a5b5c87e2114..a56fa2a1e9aa 100644
@@ -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;
Signature · 2 lines
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project
Tested-by on v1 1/1
#1 lore raw
Quoted 7 lines · Stephen Boyd

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 <[email protected]>
Cc Jorge Ramirez Ortiz <[email protected]>
Quoted 27 lines
---
  drivers/amba/bus.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/amba/bus.c +5 -0
index a5b5c87e2114..a56fa2a1e9aa 100644
@@ -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;
#2 lore raw
In reply to Stephen Boyd
Quoted 24 lines · Stephen Boyd

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 <[email protected]>
Cc Jorge Ramirez Ortiz <[email protected]>
---
  drivers/amba/bus.c | 5 +++++
  1 file changed, 5 insertions(+)
drivers/amba/bus.c +1 -0
index a5b5c87e2114..a56fa2a1e9aa 100644
@@ -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>
 

drivers/amba/bus.c static int amba_probe(struct device *dev) · line 247

Quoted 10 lines
drivers/amba/bus.c +4 -0
@@ -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;

Stephen/Russell,

what is the status of this patch? has it been merged?

thanks

Jorge

#3 lore raw
Quoted 35 lines · Jorge Ramirez
Quoted 22 lines · Stephen Boyd

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 <[email protected]>
Cc Jorge Ramirez Ortiz <[email protected]>
---
 drivers/amba/bus.c | 5 +++++
 1 file changed, 5 insertions(+)
drivers/amba/bus.c +1 -0
index a5b5c87e2114..a56fa2a1e9aa 100644
@@ -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>

drivers/amba/bus.c static int amba_probe(struct device *dev) · line 246

Quoted 9 lines
drivers/amba/bus.c +4 -0
@@ -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;

Stephen/Russell,

Quoted 1 line

what is the status of this patch? has it been merged?

I assume by that comment that you don't follow linux-next. Please follow and test linux-next, so you can check for any regressions that may occur for your platforms in the next merge window, thanks.

You'll find the above patch in linux-next already.

Signature · 3 lines
RMK's Patch system: http://www.armlinux.org.uk/developer/patches/
FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up
according to speedtest.net.