Thread (1 message) 1 message, 1 author, 2003-05-15

Re: set_rtc_time() cleanup / normalization

From: Gabriel Paubert <hidden>
Date: 2003-05-15 10:45:42

On Thu, May 15, 2003 at 10:32:12AM +0200, Geert Uytterhoeven wrote:
On Thu, 15 May 2003, Richard Zidlicky wrote:
quoted
On Wed, May 14, 2003 at 05:42:24PM +0200, Gabriel Paubert wrote:
quoted
On Tue, May 13, 2003 at 02:03:51PM +0200, Richard Zidlicky wrote:
quoted
quoted
- RTC should be accessed by proper rtc device driver only
This model is already broken by the fact that you read the time
early in boot to get reasonable initial values. So I don't buy
at all this argument.
reading it early during boot is a bit different, no worry about
interrupts, long delays etc. Also this could be actually done
by accessing /dev/rtc.
Actually this breaks on machines where the RTC is on i2c, since i2c wasn't
initialized yet.
Well, that's tough, it should at least be read before the first
userspace program is sorted. Could it be read and passed from a
bootloader with a botinfo record (repeatedly read the clock until
you cross a second boundary and get the timebase at this point).

Something like BI_CLOCK
struct bi_clock {
	unsigned long timebase;
	unsigned long tv_sec;
}


Reading the clock is easy under OF, don't know about others.

	Gabriel

** Sent via the linuxppc-dev mail list. See http://lists.linuxppc.org/
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help