mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: wni@nvidia.com
To: ccross@android.com, konkers@android.com, olof@lixom.net,
	linux@arm.linux.org.uk, linux-tegra@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Cc: swarren@nvidia.com, Wei Ni <wni@nvidia.com>
Subject: [PATCH v1] tegra: remove the clock sleepable WARNING
Date: Thu,  7 Apr 2011 11:30:00 +0800	[thread overview]
Message-ID: <1302147000-17854-1-git-send-email-wni@nvidia.com> (raw)

From: Wei Ni <wni@nvidia.com>

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).

Signed-off-by: Wei Ni <wni@nvidia.com>
---
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(-)

diff --git a/arch/arm/mach-tegra/clock.c b/arch/arm/mach-tegra/clock.c
index f556977..d0b6b45 100644
--- a/arch/arm/mach-tegra/clock.c
+++ b/arch/arm/mach-tegra/clock.c
@@ -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);
-- 
1.7.0


                 reply	other threads:[~2011-04-07  3:32 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1302147000-17854-1-git-send-email-wni@nvidia.com \
    --to=wni@nvidia.com \
    --cc=ccross@android.com \
    --cc=konkers@android.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=olof@lixom.net \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®