Skip to contentSkip to conversation

arm: dts: socfpga: Change some types of gate-clk type to periph-clk type

PATCH New dinguyen at altera.com 1 participant 3 messages Sep 17, 2013 – Oct 1, 2013

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

PATCH 1/2 arm: dts: socfpga: Change some types of gate-clk type to periph-clk type

From: Dinh Nguyen <[email protected]>

Some of the clocks that were designated gate-clk did not have a gate, so change those clocks to be of periph-clk type.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Mike Turquette <[email protected]>
Cc devicetree at vger.kernel.org
CC linux-arm-kernel at lists.infradead.org
---
 arch/arm/boot/dts/socfpga.dtsi |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm/boot/dts/socfpga.dtsi +4 -3
index 1ee6079..acd6c3a 100644
@@ -245,14 +245,14 @@
 
 				mpu_periph_clk: mpu_periph_clk {
 					#clock-cells = <0>;
-					compatible = "altr,socfpga-gate-clk";
+					compatible = "altr,socfpga-perip-clk";
 					clocks = <&mpuclk>;
 					fixed-divider = <4>;
 					};
 
 				mpu_l2_ram_clk: mpu_l2_ram_clk {
 					#clock-cells = <0>;
-					compatible = "altr,socfpga-gate-clk";
+					compatible = "altr,socfpga-perip-clk";
 					clocks = <&mpuclk>;
 					fixed-divider = <2>;
 					};
@@ -266,8 +266,9 @@
 
 				l3_main_clk: l3_main_clk {
 					#clock-cells = <0>;
-					compatible = "altr,socfpga-gate-clk";
+					compatible = "altr,socfpga-perip-clk";
 					clocks = <&mainclk>;
+					fixed-divider = <1>;
 					};
 
 				l3_mp_clk: l3_mp_clk {
Signature · 1 line
1.7.9.5
#1 lore raw

PATCH 1/2 arm: dts: socfpga: Change some types of gate-clk type to periph-clk type

Hi,

Just wondering if I can get any comments on this patch set?

Thanks,
Dinh

Quoted 50 lines · Dinh Nguyen

From: Dinh Nguyen <[email protected]>

Some of the clocks that were designated gate-clk did not have a gate, so change those clocks to be of periph-clk type.

Cc Rob Herring <[email protected]>
Cc Pawel Moll <[email protected]>
Cc Mark Rutland <[email protected]>
Cc Stephen Warren <[email protected]>
Cc Ian Campbell <[email protected]>
Cc Mike Turquette <[email protected]>
Cc devicetree at vger.kernel.org
CC linux-arm-kernel at lists.infradead.org
---
 arch/arm/boot/dts/socfpga.dtsi |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
arch/arm/boot/dts/socfpga.dtsi +4 -3
index 1ee6079..acd6c3a 100644
@@ -245,14 +245,14 @@
 
 				mpu_periph_clk: mpu_periph_clk {
 					#clock-cells = <0>;
-					compatible = "altr,socfpga-gate-clk";
+					compatible = "altr,socfpga-perip-clk";
 					clocks = <&mpuclk>;
 					fixed-divider = <4>;
 					};
 
 				mpu_l2_ram_clk: mpu_l2_ram_clk {
 					#clock-cells = <0>;
-					compatible = "altr,socfpga-gate-clk";
+					compatible = "altr,socfpga-perip-clk";
 					clocks = <&mpuclk>;
 					fixed-divider = <2>;
 					};
@@ -266,8 +266,9 @@
 
 				l3_main_clk: l3_main_clk {
 					#clock-cells = <0>;
-					compatible = "altr,socfpga-gate-clk";
+					compatible = "altr,socfpga-perip-clk";
 					clocks = <&mainclk>;
+					fixed-divider = <1>;
 					};
 
 				l3_mp_clk: l3_mp_clk {
#2 lore raw

PATCH 2/2 arm: socfpga: Remove check for "reg" property in socfpga_clk_init

In reply to dinguyen at altera.com

From: Dinh Nguyen <[email protected]>

The function socfpga_clk_init() can support clocks that do not have a divider register, but a fixed-divider that can be read from DTS. Therefore, the "reg" property is not a failing condition for socfpga_clk_init().

Cc Mike Turquette <[email protected]>
Cc Sachin Kamat <[email protected]>
Cc linux-arm-kernel at lists.infradead.org
---
 drivers/clk/socfpga/clk.c |    4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
drivers/clk/socfpga/clk.c +1 -3
index 81dd31a..c378489 100644
@@ -121,9 +121,7 @@ static __init struct clk *socfpga_clk_init(struct device_node *node,
 	int rc;
 	u32 fixed_div;
 
-	rc = of_property_read_u32(node, "reg", &reg);
-	if (WARN_ON(rc))
-		return NULL;
+	of_property_read_u32(node, "reg", &reg);
 
 	socfpga_clk = kzalloc(sizeof(*socfpga_clk), GFP_KERNEL);
 	if (WARN_ON(!socfpga_clk))
Signature · 1 line
1.7.9.5