[U-Boot] Uboot RTC question

Wolfgang Denk wd at denx.de
Fri Feb 5 21:41:37 CET 2010


Dear Steven Zedeck,

In message <27472886.post at talk.nabble.com> you wrote:
> 
> wd wrote:

There is absolutely no need to full-quote my message if you are not
referring to anything I wrote.

Hm, did you even read what I wrote?

> > We don't know what your board is, and if it's in mainline so we can
> > actually look at the code.
...
> As for my board, its based on the Atmel AT91SAM9RLEK board.

This is not an answer to my question.

I assume your code is NOT in mainline.

> I inherited this code. So I am still looking through the code to see where
> the RTC is being set.
> All I know at the moment is that whenever I power cycle and stop at the
> Uboot prompt, then type "date" I see that date/time:
> U-Boot> date
> at91_rtc_readtime(): 2007-00-01 00:00:xx
> Date: 2007-00-01     Time:  0:00:xx
> 
> xx increments depending on when I type the date command.
> I just wonder where this year/month is being initialized.

Well, eventually your RTC is not battery buffered, and when it comes
up from power-on it initiallizes it's registers with values that, when
read out, get interpreted as this specific date.

There is no such function as at91_rtc_readtime() in mainline code, so
locate it in your sources, and debug it.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"If the code and  the  comments  disagree,  then  both  are  probably
wrong."                                                - Norm Schryer


More information about the U-Boot mailing list