public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] Exynos5: clock: Update the equation to calculate PLL output frequency
Date: Tue, 21 May 2013 20:19:09 +0900	[thread overview]
Message-ID: <519B582D.90109@samsung.com> (raw)
In-Reply-To: <1363955196-1217-1-git-send-email-akshay.s@samsung.com>

Dear Akshay Saraswat,

On 22/03/13 21:26, Akshay Saraswat wrote:
> According to the latest exynos5 user manual, the equation for
> calculating PLL output was changed to
> FOUT= MDIV x FIN/(PDIV x 2^SDIV)
> earlier it was
> FOUT= MDIV x FIN/(PDIV x 2^(SDIV -1))
> So updating the clock code accordingly.
> 
> Signed-off-by: Hatim Ali <hatim.rv@samsung.com>
> Signed-off-by: Akshay Saraswat <akshay.s@samsung.com>
> ---
>  arch/arm/cpu/armv7/exynos/clock.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c
> index 956427c..5299bc7 100644
> --- a/arch/arm/cpu/armv7/exynos/clock.c
> +++ b/arch/arm/cpu/armv7/exynos/clock.c
> @@ -73,10 +73,8 @@ static int exynos_get_pll_clk(int pllreg, unsigned int r, unsigned int k)
>  		/* FOUT = (MDIV + K / 1024) * FIN / (PDIV * 2^SDIV) */
>  		fout = (m + k / 1024) * (freq / (p * (1 << s)));
>  	} else {
> -		if (s < 1)
> -			s = 1;
> -		/* FOUT = MDIV * FIN / (PDIV * 2^(SDIV - 1)) */
> -		fout = m * (freq / (p * (1 << (s - 1))));
> +		/* FOUT = MDIV * FIN / (PDIV * 2^SDIV) */
> +		fout = m * (freq / (p * (1 << s)));
>  	}
>  
>  	return fout;
> 

applied to u-boot-samsung.

Thanks,
Minkyu Kang.

  parent reply	other threads:[~2013-05-21 11:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-22 12:26 [U-Boot] [PATCH] Exynos5: clock: Update the equation to calculate PLL output frequency Akshay Saraswat
2013-03-23  0:41 ` Simon Glass
2013-05-21 11:19 ` Minkyu Kang [this message]
  -- strict thread matches above, loose matches on Subject: below --
2013-03-27  8:58 Akshay Saraswat

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=519B582D.90109@samsung.com \
    --to=mk7.kang@samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox