[Top] [All Lists]

Re: Updating RTC with date command

To: "Nori, Soma Sekhar" <>
Subject: Re: Updating RTC with date command
From: Ralf Baechle <>
Date: Tue, 19 Jul 2005 10:31:10 -0400
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/
On Tue, Jul 19, 2005 at 03:34:01PM +0530, Nori, Soma Sekhar wrote:

> I am trying to add RTC (ds1338) support to 2.6.10 mips kernel
> running on my 4kec board.
> I have populated the rtc_{get|set}_time and rtc_set_mmss pointers 
> and the date command shows the time correctly (as read from the RTC).
> However, when I try to update the time using date -s <time string> 
> the RTC does not get updated. (shows the old time when I boot-up again)
> In arch\mips\kernel\time.c the timer_interrupt calls rtc_set_mmss,
> but that call is made only when STA_UNSYNC is _not_ set in time_status
> variable. do_settimeofday/sys_stime _set_ this flag so the timer 
> interrupt does not call rtc_set_mmss.         
> In all, I could not figure out any other invocation of rtc_set_time or 
> rtc_set_mmss which could be setting the time in my case.
> Can somebody please help me understand how the RTC is supposed to be
> updated after user changes the time using the date command?

Not at all.  Try man hwclock.


<Prev in Thread] Current Thread [Next in Thread>