[U-Boot] cmd_date.c error or itention?
Reinhard Meyer
reinhard.meyer at emk-elektronik.de
Mon Jul 5 17:37:57 CEST 2010
Wolfgang Denk schrieb:
> Dear Reinhard Meyer,
>
> In message <4C31ED2B.1020707 at emk-elektronik.de> you wrote:
>> As well as there is a difference between read error and file not found,
>> there well might be a difference in clock nonfunctional and time invalid...
>
> Indeed.
>
>> But alas, I will make rtc_get not return an error and zero out the tm
>> structure instead when the driver KNOWS the date is not correct.
>
> Why would you do that? This prevents anybody trying to track down
> problems from seeing what is really going on. When you retrun the
> real (incorrect) data, I can see if the attempt to set the date shows
> any affect at all - with your method I don't see anything at all.
>
So far no AT91SAM9xxx board has a date command in u-boot. The kernel as
it is will not set the system time when the offset register is zero. If
the register is non-zero the time will be used.
I'm just trying to have the same behaviour in u-boot.
Besides your argumentation is flawed: why try to READ the clock
when I am going to set it anyway? This reading and the following if just
increase the code size :)
Now setting the clock still gives the warning (puts() in the driver)
that the time is invalid (because the time is read before overwritten).
I think that is more irritating. So your suggestions is then to have
the driver not say anything at all, just return OK and a bogus value...
Reinhard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: reinhard_meyer.vcf
Type: text/x-vcard
Size: 370 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20100705/613c82f4/attachment.vcf
More information about the U-Boot
mailing list