* [U-Boot] Uboot RTC question
@ 2010-02-05 17:35 Steven Zedeck
2010-02-05 18:49 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Steven Zedeck @ 2010-02-05 17:35 UTC (permalink / raw)
To: u-boot
Hi,
I am using Uboot 2008.10. I know its old but thats what we used when we
started our project.
My question is why is it that when we get to the Uboot prompt upon a power
cycle, the date is set to:
2007-00-01 00:00:00
Where is that being set/initialized? I looked through the code and I can't
determine where this is being set.
Is that what the date should be? Does Uboot force it somewhere?
Our processor is the Atmel AT91SAM9RL.
thanks,
Steve
--
View this message in context: http://old.nabble.com/Uboot-RTC-question-tp27471322p27471322.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Uboot RTC question
2010-02-05 17:35 [U-Boot] Uboot RTC question Steven Zedeck
@ 2010-02-05 18:49 ` Wolfgang Denk
2010-02-05 19:33 ` Steven Zedeck
0 siblings, 1 reply; 4+ messages in thread
From: Wolfgang Denk @ 2010-02-05 18:49 UTC (permalink / raw)
To: u-boot
Dear Steven Zedeck,
In message <27471322.post@talk.nabble.com> you wrote:
>
> My question is why is it that when we get to the Uboot prompt upon a power
> cycle, the date is set to:
> 2007-00-01 00:00:00
>
> Where is that being set/initialized? I looked through the code and I can't
> determine where this is being set.
>
> Is that what the date should be? Does Uboot force it somewhere?
>
> Our processor is the Atmel AT91SAM9RL.
We don't know what your board is, and if it's in mainline so we can
actually look at the code.
In a quick scan I didn't see any code in mainline which sets such a
date (which is wrong, in any case, as there is no month 00 in any of
the common notations).
Is there a chance that this is actually your own custom code?
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
"Who is the oldest inhabitant of this village?"
"We haven't got one; we had one, but he died three weeks ago."
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Uboot RTC question
2010-02-05 18:49 ` Wolfgang Denk
@ 2010-02-05 19:33 ` Steven Zedeck
2010-02-05 20:41 ` Wolfgang Denk
0 siblings, 1 reply; 4+ messages in thread
From: Steven Zedeck @ 2010-02-05 19:33 UTC (permalink / raw)
To: u-boot
wd wrote:
>
> Dear Steven Zedeck,
>
> In message <27471322.post@talk.nabble.com> you wrote:
>>
>> My question is why is it that when we get to the Uboot prompt upon a
>> power
>> cycle, the date is set to:
>> 2007-00-01 00:00:00
>>
>> Where is that being set/initialized? I looked through the code and I
>> can't
>> determine where this is being set.
>>
>> Is that what the date should be? Does Uboot force it somewhere?
>>
>> Our processor is the Atmel AT91SAM9RL.
>
> We don't know what your board is, and if it's in mainline so we can
> actually look at the code.
>
> In a quick scan I didn't see any code in mainline which sets such a
> date (which is wrong, in any case, as there is no month 00 in any of
> the common notations).
>
> Is there a chance that this is actually your own custom code?
>
> 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
> "Who is the oldest inhabitant of this village?"
> "We haven't got one; we had one, but he died three weeks ago."
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
>
>
As for my board, its based on the Atmel AT91SAM9RLEK board.
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.
thanks,
Steve
--
View this message in context: http://old.nabble.com/Uboot-RTC-question-tp27471322p27472886.html
Sent from the Uboot - Users mailing list archive at Nabble.com.
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] Uboot RTC question
2010-02-05 19:33 ` Steven Zedeck
@ 2010-02-05 20:41 ` Wolfgang Denk
0 siblings, 0 replies; 4+ messages in thread
From: Wolfgang Denk @ 2010-02-05 20:41 UTC (permalink / raw)
To: u-boot
Dear Steven Zedeck,
In message <27472886.post@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
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-02-05 20:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-05 17:35 [U-Boot] Uboot RTC question Steven Zedeck
2010-02-05 18:49 ` Wolfgang Denk
2010-02-05 19:33 ` Steven Zedeck
2010-02-05 20:41 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox