All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jagan Teki <jagan@amarulasolutions.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 1/1] sunxi: Fix pll1 clock calculation
Date: Fri, 6 Sep 2019 23:51:43 +0530	[thread overview]
Message-ID: <CAMty3ZDp1i2VSyVzZsUfe=P8pwqHZMTT9pzDKea_oU57r0QAXQ@mail.gmail.com> (raw)
In-Reply-To: <20190731131552.18085-1-stefan@olimex.com>

On Wed, Jul 31, 2019 at 6:46 PM Stefan Mavrodiev <stefan@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@olimex.com>
> ---

Acked-by: Jagan Teki <jagan@amarulasolutions.com>

Need to test on respective sun boards, any results?

  parent reply	other threads:[~2019-09-06 18:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-31 13:15 [U-Boot] [PATCH 1/1] sunxi: Fix pll1 clock calculation Stefan Mavrodiev
2019-08-26 10:04 ` Stefan Mavrodiev
2019-09-06 18:21 ` Jagan Teki [this message]
2019-10-16 16:40   ` Jagan Teki

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='CAMty3ZDp1i2VSyVzZsUfe=P8pwqHZMTT9pzDKea_oU57r0QAXQ@mail.gmail.com' \
    --to=jagan@amarulasolutions.com \
    --cc=u-boot@lists.denx.de \
    /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.