RTC/I2C problems

Kenneth Poole kpoole at mrv.com
Wed Apr 12 00:25:10 EST 2006


We had a similar problem with our 8xx implementation. The problem was
decrementer underflow. In the kernel initialization, calibrate_decr()
was called before set_dec(), so the decrementer can count down through 0
before the decrementer exception gets enabled. To fix this, we moved the
call to set_dec() from time_init() to calibrate_decr() before the
exception is enabled in the tbcsr.

Ken Poole


>Hi everybody.

>I have a problem with my RTC, i work on a MEN A12 board with MPC8245
and 
>when my kernel start it takes 8 min to run. I have find the problem but
i 
>don't know how to solve it. In time.c the function time_init execute
the 
>following lines :

>if (__USE_RTC()) {
>    /* 601 processor: dec counts down by 128 every 128ns */
>    tb_ticks_per_jiffy = DECREMENTER_COUNT_601;
>    /* mulhwu_scale_factor(1000000000, 1000000) is 0x418937 */
>    tb_to_us = 0x0x418937;
>}  else {
>    ppc_md.calibrate_decr();
>    tb_to_ns_scale = mulhwu(tb_to_us, 1000 << 10);
>}

>this is the ppc_md.calibrate_decr() function that takes a lot of time
and i 
>don't know how to solve the problem. USE_RTC is fixed at 0 for 6xx
config 
>maybe it must be at 1 ? My RTC run with SMBus (I2C). I work with ELDK
4.0 
>and linux 2.6.15.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20060411/dbfcd8da/attachment.htm 


More information about the Linuxppc-embedded mailing list