Common/typical fractional divider HW API
andriy.shevchenko at linux.intel.com
Fri Feb 5 08:12:09 PST 2016
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 at linux.intel.com>
Intel Finland Oy
More information about the linux-arm-kernel