From: mturquette@linaro.org (Mike Turquette)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] clk: vexpress: Add separate SP810 driver
Date: Mon, 22 Apr 2013 10:27:58 -0700 [thread overview]
Message-ID: <20130422172758.17530.12432@quantum> (raw)
In-Reply-To: <1366641279.3203.15.camel@hornet>
Quoting Pawel Moll (2013-04-22 07:34:39)
> On Mon, 2013-04-22 at 15:25 +0100, Russell King - ARM Linux wrote:
> > > /* Switch the parent if necessary */
> > > - if (old_parent != new_parent)
> > > + if (old_parent != new_parent) {
> > > + clk_prepare(new_parent);
> > > clk_set_parent(hw->clk, new_parent);
> > > + clk_unprepare(old_parent);
> > > + }
> > >
> > > So, to summarize, the patch that works for me is below.
> >
> > So what if the old parent clock wasn't prepared?
>
> The clk_prepare() does __clk_prepare(clk->parent) before
> clk->ops->prepare(clk->kw), so the old_parent is always prepared.
>
Yes, this hack is subtle. The reparent operation happens within the
.prepare callback, so the old parent chain is implicitly prepared.
Regards,
Mike
> Pawe?
prev parent reply other threads:[~2013-04-22 17:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-15 14:40 [PATCH] clk: vexpress: Add separate SP810 driver Pawel Moll
2013-03-18 10:54 ` Catalin Marinas
2013-04-10 10:25 ` Pawel Moll
2013-04-15 11:11 ` Pawel Moll
2013-04-17 22:26 ` Mike Turquette
2013-04-18 17:23 ` Pawel Moll
2013-04-18 20:22 ` Mike Turquette
2013-04-22 14:25 ` Russell King - ARM Linux
2013-04-22 14:34 ` Pawel Moll
2013-04-22 17:27 ` Mike Turquette [this message]
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=20130422172758.17530.12432@quantum \
--to=mturquette@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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