Skip to contentSkip to conversation

ARM: OMAP3+: DPLL: stop reparenting to same parent if already done

PATCH Applied Nishanth Menon 4 participants 4 messages Feb 5, 2014 – Feb 20, 2014

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

PATCH 1/1 ARM: OMAP3+: DPLL: stop reparenting to same parent if already done

omap3_noncore_dpll_set_rate forces a reparent to the same clk_ref for every call that takes place. This is an can be done only if a change is detected.

---
 arch/arm/mach-omap2/dpll3xxx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/dpll3xxx.c +1 -1
index 3185ced..d9bcbf7 100644
@@ -525,7 +525,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
 	* stuff is inherited for free
 	*/
 
-	if (!ret)
+	if (!ret && clk_get_parent(hw->clk) != new_parent)
 		__clk_reparent(hw->clk, new_parent);
 
 	return 0;
Signature · 1 line
1.7.9.5
maintainer
#1 lore raw
Quoted 5 lines · Nishanth Menon

omap3_noncore_dpll_set_rate forces a reparent to the same clk_ref for every call that takes place. This is an can be done only if a change is detected.

Would like to see acks on this too before applying.

Tony

Quoted 20 lines
---
 arch/arm/mach-omap2/dpll3xxx.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/dpll3xxx.c +1 -1
index 3185ced..d9bcbf7 100644
@@ -525,7 +525,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
 	* stuff is inherited for free
 	*/
 
-	if (!ret)
+	if (!ret && clk_get_parent(hw->clk) != new_parent)
 		__clk_reparent(hw->clk, new_parent);
 
 	return 0;
Signature · 1 line
1.7.9.5
#2 lore raw
Quoted 8 lines · Tony Lindgren
Quoted 5 lines · Nishanth Menon

omap3_noncore_dpll_set_rate forces a reparent to the same clk_ref for every call that takes place. This is an can be done only if a change is detected.

Would like to see acks on this too before applying.

Looks good to me, ack.

-Tero

Quoted 23 lines

Tony

Quoted 20 lines
---
  arch/arm/mach-omap2/dpll3xxx.c |    2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/mach-omap2/dpll3xxx.c +1 -2
index 3185ced..d9bcbf7 100644
@@ -525,7 +525,7 @@ int omap3_noncore_dpll_set_rate(struct clk_hw *hw, unsigned long rate,
  	* stuff is inherited for free
  	*/
 
-	if (!ret)
+	if (!ret && clk_get_parent(hw->clk) != new_parent)
  		__clk_reparent(hw->clk, new_parent);
 
  	return 0;
--

1.7.9.5

#3 lore raw
In reply to Nishanth Menon
Quoted 5 lines · Nishanth Menon

omap3_noncore_dpll_set_rate forces a reparent to the same clk_ref for every call that takes place. This is an can be done only if a change is detected.

Queued for v3.15 with Tero's ack unless the patch is updated to indicate that it's more than an optimization.

- Paul