[U-Boot] [PATCH 1/1] sunxi: Fix pll1 clock calculation
Jagan Teki
jagan at amarulasolutions.com
Wed Oct 16 16:40:48 UTC 2019
On Fri, Sep 6, 2019 at 11:51 PM Jagan Teki <jagan at amarulasolutions.com> wrote:
>
> On Wed, Jul 31, 2019 at 6:46 PM Stefan Mavrodiev <stefan at olimex.com> wrote:
> >
> > clock_sun6i.c is used for sun6i, sun8i and sun50i SoC families.
> > PLL1 clock sets the default system clock, defined as:
> > sun6i: 1008000000
> > sun8i: 1008000000
> > sun50i: 816000000
> >
> > With the current calculation, m = 2 and k = 3. Solving for n,
> > this results 28. Solving back:
> > (24MHz * 28 * 3) / 2 = 1008MHz
> >
> > However if the requested clock is 816, n is 22.66 rounded
> > to 22, which results:
> > (24MHz * 28 * 3) / 2 = 792MHz
> >
> > Changing k to 4 satisfies both system clocks:
> > (24E6 * 21 * 4) / 2 = 1008MHz
> > (24E6 * 17 * 4) / 2 = 816MHz
> >
> > Signed-off-by: Stefan Mavrodiev <stefan at olimex.com>
> > ---
>
> Acked-by: Jagan Teki <jagan at amarulasolutions.com>
Applied to u-boot-sunxi/master
More information about the U-Boot
mailing list