On 19 December 2011 16:57, Wolfgang Denk <w...@denx.de> wrote: > Dear Chander Kashyap, > > In message <1324275424-29468-3-git-send-email-chander.kash...@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 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot