[U-Boot] [PATCH 2/2] Exynos: Fix ARM Clock frequency calculation
Minkyu Kang
promsoft at gmail.com
Mon Dec 19 09:26:48 CET 2011
On 19 December 2011 16:57, Wolfgang Denk <wd at denx.de> wrote:
> Dear Chander Kashyap,
>
> In message <1324275424-29468-3-git-send-email-chander.kashyap at linaro.org> you wrote:
>> Earliar ARM clock frequency was calculated by:
>> MOUTAPLL/(DIVAPLL + 1) which is actually returning SCLKAPLL.
>> It is fixed by calcuating it as follows:
>
> Um.... Comment and code disagree:
>
>> ARMCLK=MOUTCORE/(DIVCORE + 1)/DIVCORE2 + 1)
>
> ...or is this just missing a paren?
>
>> + dout_apll = get_pll_clk(APLL) / (core_ratio + 1);
>> + dout_apll /= (core2_ratio + 1);
>
> This gives
>
> ARMCLK=MOUTCORE/(DIVCORE + 1)/ (DIVCORE2 + 1)
>
> Please check if this is correct.
Wolfgang, you are right.
ARMCLK=MOUTCORE / (DIVCORE + 1) / (DIVCORE2 + 1) is right.
Dear Chander Kashyap,
> /* APLL_RATIO: [26:24] */
Please fix this comment also.
> - apll_ratio = (div >> 24) & 0x7;
> + core_ratio = (div >> 0) & 0x7;
> + core2_ratio = (div >> 28) & 0x7;
>
> - dout_apll = get_pll_clk(APLL) / (apll_ratio + 1);
> + dout_apll = get_pll_clk(APLL) / (core_ratio + 1);
This output is not dout_apll.
Please fix it.
> + dout_apll /= (core2_ratio + 1);
>
> return dout_apll;
Thanks
Minkyu Kang
--
from. prom.
www.promsoft.net
More information about the U-Boot
mailing list