Skip to contentSkip to conversation

tegra: remove the clock sleepable WARNING

PATCH New [email protected] 1 participant 1 message Apr 7, 2011

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

PATCH 1/1 tegra: remove the clock sleepable WARNING

From: Wei Ni <[email protected]>

The dvfs will try to init clock, it trickles down to the child clock. Part of that init is to set cansleep flag. When setting a clock as cansleep, in which case the entire list of clocks is traversed to set the children as cansleep as well. in here, the clk_set_cansleep can only be called on clocks that are the sole parent of all of their child clocks, meaning the child clock can not be reparented onto a different, possibly non-sleeping, clock. If the child clock has the set_parent callback, the driver warns that this case is not proper, it will show WARNING:
"can't make child clock xxx of xxx sleepable if it's parent could change" But Some clocks only has one parent, although they have set_parent callback. These clocks' flags is set to 0, not MUX, it means they can not be reparented. So we can remove this WARNING if !(flags & MUX).

---
v1: This patch against linux-tegra-2.6.37 branch in
git://android.git.kernel.org/kernel/tegra.git

 arch/arm/mach-tegra/clock.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
arch/arm/mach-tegra/clock.c +2 -1
index f556977..d0b6b45 100644
@@ -187,7 +187,8 @@ static void __clk_set_cansleep(struct clk *c)
 		if (child->parent != c)
 			continue;
 
-		WARN(child->ops && child->ops->set_parent,
+		WARN(child->ops && child->ops->set_parent
+			&& (child->flags & MUX),
 			"can't make child clock %s of %s "
 			"sleepable if it's parent could change",
 			child->name, c->name);
Signature · 1 line
1.7.0