From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
To: linux-fbdev@vger.kernel.org
Subject: Re: [PATCH/RFC 3/3] ARM: mach-shmobile: implement parent clock
Date: Thu, 28 Oct 2010 06:29:54 +0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1010280819210.31298@axis700.grange> (raw)
In-Reply-To: <Pine.LNX.4.64.1010271821580.11687@axis700.grange>
On Thu, 28 Oct 2010, Paul Mundt wrote:
> On Wed, Oct 27, 2010 at 06:24:26PM +0200, Guennadi Liakhovetski wrote:
> > On ap4evb PLLC2 is used as a parent clock for the HDMI clock. To configure the
> > HDMI clock with the highest precision this patch scans all available PLLC2
> > frequencies and picks up the best one.
> >
> > Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
>
> So, what exactly does ap4evb_clk_optimize() do that you can't already do
> with either clk_rate_table_round() or clk_rate_div_range_round()?
No, it does something pretty different: it selects the best _parent_
frequency to optimize that of the _child_. So, it actually tells you "to
configure your clock as close as possible to frequency X you have to
reconfigure its parent with frequency Y." Which I don't think any of the
aforementioned functions does.
> I really don't want to see this sort of rate table access going on
> outside of the clock framework itself, so if we need to add or extend an
> existing helper for a new usecase then that is highly preferable to
> constantly reinventing things.
Well, there is a reason, why this is marked an "RFC":-) I also don't like
very much touching clock internals in platform code, but in a way it is
specific for each case. This implementation only works for clocks, whose
divisors are integer numbers in a certain range (without holes). Ok, with
clk_get_parent() the other two callbacks .clk_set_rate_parent() and
.clk_get_rate_parent() are automatically not needed, which is good! And I
would be happy to try to convert the ap4evb_clk_optimize() function into a
generic helper too, if we reach such an agreement.
Thanks
Guennadi
---
Guennadi Liakhovetski, Ph.D.
Freelance Open-Source Software Developer
http://www.open-technology.de/
next prev parent reply other threads:[~2010-10-28 6:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-27 16:24 [PATCH/RFC 3/3] ARM: mach-shmobile: implement parent clock optimization Guennadi Liakhovetski
2010-10-28 0:28 ` [PATCH/RFC 3/3] ARM: mach-shmobile: implement parent clock optimization for HDMI Paul Mundt
2010-10-28 6:29 ` Guennadi Liakhovetski [this message]
2010-10-28 6:53 ` Paul Mundt
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=Pine.LNX.4.64.1010280819210.31298@axis700.grange \
--to=g.liakhovetski@gmx.de \
--cc=linux-fbdev@vger.kernel.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