From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Mason <slash.tmp@free.fr>, linux-clk <linux-clk@vger.kernel.org>
Cc: Stephen Boyd <sboyd@codeaurora.org>,
Michael Turquette <mturquette@baylibre.com>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
Heikki Krogerus <heikki.krogerus@linux.intel.com>,
Sebastian Frias <sf84@laposte.net>,
Linux ARM <linux-arm-kernel@lists.infradead.org>
Subject: Re: Common/typical fractional divider HW API
Date: Fri, 05 Feb 2016 18:12:09 +0200 [thread overview]
Message-ID: <1454688729.31169.87.camel@linux.intel.com> (raw)
In-Reply-To: <56B4C775.50808@free.fr>
On Fri, 2016-02-05 at 17:01 +0100, Mason wrote:
> So, do you agree that
>
> DIV = 2^I * (1 + F/256)
>
> gives a more useful DIV distribution than
>
> DIV = I + F/16
If you can change hardware why not to use any existing approach which
suits better to your device?
I don't remember any existing, though I didn't check much, divider
register which takes something like that.
> > Also it's possible to convert clock providers for, e.g., UARTs to
> > use
> > this kind of divider.
>
> I'm not sure how to parse that. I'm using the divider driver
> for a CPU clock, to do D(V)FS in cpufreq.
If you are using custom stuff for custom hardware, I hope it's okay.
But if we are talking about generic solutions (like clk-fractional-
divider), I would suggest to consider existing users / hardware.
What I saw is mostly about
I [0 .. 2^n - 1]
F [0 .. 2^k - 1]
n + k < 32
And I + 1 / (2^k - F) as a formula.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
WARNING: multiple messages have this Message-ID (diff)
From: andriy.shevchenko@linux.intel.com (Andy Shevchenko)
To: linux-arm-kernel@lists.infradead.org
Subject: Common/typical fractional divider HW API
Date: Fri, 05 Feb 2016 18:12:09 +0200 [thread overview]
Message-ID: <1454688729.31169.87.camel@linux.intel.com> (raw)
In-Reply-To: <56B4C775.50808@free.fr>
On Fri, 2016-02-05 at 17:01 +0100, Mason wrote:
> So, do you agree that
>
> ? DIV = 2^I * (1 + F/256)
>
> gives a more useful DIV distribution than
>
> ? DIV = I + F/16
If you can change hardware why not to use any existing approach which
suits better to your device?
I don't remember any existing, though I didn't check much, divider
register which takes something like that.
> > Also it's possible to convert clock providers for, e.g., UARTs to
> > use
> > this kind of divider.
>
> I'm not sure how to parse that. I'm using the divider driver
> for a CPU clock, to do D(V)FS in cpufreq.
If you are using custom stuff for custom hardware, I hope it's okay.
But if we are talking about generic solutions (like clk-fractional-
divider), I would suggest to consider existing users / hardware.
What I saw is mostly about
I [0 .. 2^n - 1]
F [0 .. 2^k - 1]
n + k < 32
And I + 1 / (2^k - F) as a formula.
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
next prev parent reply other threads:[~2016-02-05 16:12 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-05 14:49 Common/typical fractional divider HW API Mason
2016-02-05 14:49 ` Mason
2016-02-05 15:05 ` Andy Shevchenko
2016-02-05 15:05 ` Andy Shevchenko
2016-02-05 16:01 ` Mason
2016-02-05 16:01 ` Mason
2016-02-05 16:12 ` Andy Shevchenko [this message]
2016-02-05 16:12 ` Andy Shevchenko
2016-02-05 16:29 ` Mason
2016-02-05 16:29 ` Mason
2016-02-05 16:43 ` Andy Shevchenko
2016-02-05 16:43 ` Andy Shevchenko
2016-02-07 16:04 ` Mason
2016-02-07 16:04 ` Mason
2016-02-15 15:35 ` Andy Shevchenko
2016-02-15 15:35 ` Andy Shevchenko
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=1454688729.31169.87.camel@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=heikki.krogerus@linux.intel.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rjw@rjwysocki.net \
--cc=sboyd@codeaurora.org \
--cc=sf84@laposte.net \
--cc=slash.tmp@free.fr \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.