board without RTC

Kumar Gala galak at kernel.crashing.org
Sun May 14 09:22:47 EST 2006


On May 13, 2006, at 8:10 AM, Joachim Denil wrote:

> Hello,
>
> Can someone tell me what the following functions should do in case  
> there is no RTC on the hardware board. My processor is a 405gpr.  
> Which of these i must implement. (maybe some code snippets...). I  
> think the most important one is calibrate_decr for it is necesary  
> to calibrate_delay function.
>
> Thanks...
>
> Joachim Denil
> Student
>
>
> long (*time_init)(void);
> int (*set_rtc_time)(unsigned long nowtime);
> unsigned long (*get_rtc_time)(void);
> unsigned char (*rtc_read_val)(int addr);
> void (*rtc_write_val)(int addr, unsigned char val);
> void (*calibrate_decr)(void);

You should only need time_init if you need to poke some registers or  
something to get the clocks going.  You are correct about  
calibrate_decr.  All the *rtc* you dont need to bother with.

- k



More information about the Linuxppc-embedded mailing list