From: Minkyu Kang <mk7.kang@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] arm: exynos: fix the div value for set_mmc_clk
Date: Fri, 13 Feb 2015 17:25:55 +0900 [thread overview]
Message-ID: <54DDB513.5010303@samsung.com> (raw)
In-Reply-To: <1420703421-4420-1-git-send-email-jh80.chung@samsung.com>
On 08/01/15 16:50, Jaehoon Chung wrote:
> The most exynos used the "Ratio + 1" as div value.
> And value at register is "Ratio".
> So if want to set exact value, it needs to subtract one.
>
> Value at register ("Ratio") = div - 1
>
> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
> ---
> arch/arm/cpu/armv7/exynos/clock.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/exynos/clock.c b/arch/arm/cpu/armv7/exynos/clock.c
> index b31c13b..3110bb0 100644
> --- a/arch/arm/cpu/armv7/exynos/clock.c
> +++ b/arch/arm/cpu/armv7/exynos/clock.c
> @@ -1656,6 +1656,10 @@ unsigned long get_mmc_clk(int dev_index)
>
> void set_mmc_clk(int dev_index, unsigned int div)
> {
> + /* If want to set correct value, it needs to substract one from div.*/
> + if (div > 0)
> + div -= 1;
> +
> if (cpu_is_exynos5()) {
> if (proid_is_exynos5420() || proid_is_exynos5800())
> exynos5420_set_mmc_clk(dev_index, div);
>
applied to u-boot-samsung.
Thank,
Minkyu Kang.
next prev parent reply other threads:[~2015-02-13 8:25 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 7:50 [U-Boot] [PATCH] arm: exynos: fix the div value for set_mmc_clk Jaehoon Chung
2015-02-13 8:25 ` Minkyu Kang [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-11-20 8:17 Jaehoon Chung
2014-11-24 8:33 ` Minkyu Kang
2014-11-28 11:50 ` Jaehoon Chung
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=54DDB513.5010303@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