linux-mips
[Top] [All Lists]

RE: Power loss and system time when not having a battery backed R TC

To: Attila Kinali <attila@kinali.ch>, linux-mips@linux-mips.org
Subject: RE: Power loss and system time when not having a battery backed R TC
From: Don Hiatt <Don_Hiatt@pmc-sierra.com>
Date: Wed, 28 Mar 2007 09:32:08 -0800
Original-recipient: rfc822;linux-mips@linux-mips.org
Sender: linux-mips-bounce@linux-mips.org
 

> -----Original Message-----
> From: linux-mips-bounce@linux-mips.org 
> [mailto:linux-mips-bounce@linux-mips.org] On Behalf Of Attila Kinali
> Sent: Wednesday, March 28, 2007 7:22 AM
> To: Markus Gothe
> Cc: linux-mips@linux-mips.org
> Subject: Re: Power loss and system time when not having a 
> battery backed RTC
> I already thought about storing the last known time somewhere 
> in the flash. But unfortunately the device can be unplugged 
> suddenly w/o correct shutdown (actualy this is the normal case).
> The only way around this i could came up with was to 
> periodically store the current time. But this is then a trade 
> off between jump back period length and how long the flash 
> will last the continous writes, with no sweet spot that looks good.
>
You could also modify your startup script check the date and if it
is 1970 you could set the date to sometime in 2007 (or whatever date
your product will finally ship). Sure the date will still be wrong but
not as wrong. :)

Cheers,

don


<Prev in Thread] Current Thread [Next in Thread>
  • RE: Power loss and system time when not having a battery backed R TC, Don Hiatt <=