All of lore.kernel.org
 help / color / mirror / Atom feed
* ppc -> powerpc : where is 11 min rtc update gone ?
@ 2008-05-20 10:58 Philippe De Muyter
  2008-05-20 11:10 ` Paul Mackerras
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2008-05-20 10:58 UTC (permalink / raw)
  To: linuxppc-dev

Hi everybody,

I have a ARCH=powerpc linux-2.6.25-rc6 linux running with an i2c rtc chip,
and synchronized to a ntp server.

I noticed that my rtc chip does not get updated by the kernel, just like
it would be on all other architectures (included ppc).

Looking at the differences between ./arch/powerpc/kernel/time.c and
./arch/ppc/kernel/time.c, I see that 

		/*
		 * update the rtc when needed ...

code segement has disappeared
		
Is it expected to be done somewhere else (where ?) or is there another
good reason for this removal ?

Kind regards

Philippe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: ppc -> powerpc : where is 11 min rtc update gone ?
  2008-05-20 10:58 ppc -> powerpc : where is 11 min rtc update gone ? Philippe De Muyter
@ 2008-05-20 11:10 ` Paul Mackerras
  2008-05-20 14:07   ` powerpc + i2c/rtc : where is the 11 min update ? Philippe De Muyter
  0 siblings, 1 reply; 5+ messages in thread
From: Paul Mackerras @ 2008-05-20 11:10 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: linuxppc-dev

Philippe De Muyter writes:

> I have a ARCH=powerpc linux-2.6.25-rc6 linux running with an i2c rtc chip,
> and synchronized to a ntp server.
> 
> I noticed that my rtc chip does not get updated by the kernel, just like
> it would be on all other architectures (included ppc).

That is now supposed to be done by the code inside #ifdef
CONFIG_GENERIC_CMOS_UPDATE in kernel/time/ntp.c.

Paul.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: powerpc + i2c/rtc : where is the 11 min update ?
  2008-05-20 11:10 ` Paul Mackerras
@ 2008-05-20 14:07   ` Philippe De Muyter
  2008-05-21 21:57     ` RTC subsystem and 11 min rtc update Philippe De Muyter
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2008-05-20 14:07 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linuxppc-dev, linux-kernel

CCing lkml

On Tue, May 20, 2008 at 09:10:25PM +1000, Paul Mackerras wrote:
> Philippe De Muyter writes:
> 
> > I have a ARCH=powerpc linux-2.6.25-rc6 linux running with an i2c rtc chip,
> > and synchronized to a ntp server.
> > 
> > I noticed that my rtc chip does not get updated by the kernel, just like
> > it would be on all other architectures (included ppc).
> 
> That is now supposed to be done by the code inside #ifdef
> CONFIG_GENERIC_CMOS_UPDATE in kernel/time/ntp.c.
> 
> Paul.

Thanks.  I agree that is a good place.

But, here CONFIG_GENERIC_CMOS_UPDATE is defined and an i2c clock also,
and my rtc clock is not updated.  I see kernel/time/ntp.c::sync_cmos_clock
calling arch/powerpc/kernel/time.c::update_persistent_clock, where
ppc_md.set_rtc_time is NULL.

Who is supposed to initialize ppc_md.set_rtc_time to use an i2c clock and
when in the boot process may that happen ?

Or alternatively, should update_persistent_clock not be part of the rtc
subsystem ?

Philippe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RTC subsystem and 11 min rtc update
  2008-05-20 14:07   ` powerpc + i2c/rtc : where is the 11 min update ? Philippe De Muyter
@ 2008-05-21 21:57     ` Philippe De Muyter
  2008-05-21 22:18       ` Maciej W. Rozycki
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe De Muyter @ 2008-05-21 21:57 UTC (permalink / raw)
  To: linux-kernel

Hello everybody,

I have linux-2.6.25-rc6 running on a board with an i2c rtc chip,
and synchronized to a ntp server.  When my board starts, the current
time is correctly read from the rtc chip, but ...

I noticed that my rtc chip does not get updated by the kernel every 11 min,
on my powerpc board, just like it would be on all other architectures.

Paul Mackerras told me that that is now supposed to be done by the code
inside #ifdef CONFIG_GENERIC_CMOS_UPDATE in kernel/time/ntp.c.

I agree that is a good place.

But, here CONFIG_GENERIC_CMOS_UPDATE is well defined and an i2c clock also,
and my rtc clock is not updated.  I see kernel/time/ntp.c::sync_cmos_clock
calling arch/powerpc/kernel/time.c::update_persistent_clock, where
ppc_md.set_rtc_time is NULL. ppc_md.get_rtc_time is NULL as well, but
that does not prevent the initial reading of the rtc clock during the startup
of the kernel.

Should update_persistent_clock not be directly part of the rtc subsystem,
instead of falling in a detour or a dead-end in the arch subsystem ?

Philippe

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: RTC subsystem and 11 min rtc update
  2008-05-21 21:57     ` RTC subsystem and 11 min rtc update Philippe De Muyter
@ 2008-05-21 22:18       ` Maciej W. Rozycki
  0 siblings, 0 replies; 5+ messages in thread
From: Maciej W. Rozycki @ 2008-05-21 22:18 UTC (permalink / raw)
  To: Philippe De Muyter; +Cc: linux-kernel

On Wed, 21 May 2008, Philippe De Muyter wrote:

> Should update_persistent_clock not be directly part of the rtc subsystem,
> instead of falling in a detour or a dead-end in the arch subsystem ?

 See the recent discussion around my proposal:

http://www.ussg.iu.edu/hypermail/linux/kernel/0805.1/1772.html

I am about to update some of the architecture bits in arch/mips/sibyte,
but otherwise the patchset is ready to go.  Feel free to join the
discussion and/or update your platform to make use of the generic
rtc_read_persistent_clock() and rtc_update_persistent_clock() functions.  
Testing is always welcome too.

  Maciej

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-05-21 22:19 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 10:58 ppc -> powerpc : where is 11 min rtc update gone ? Philippe De Muyter
2008-05-20 11:10 ` Paul Mackerras
2008-05-20 14:07   ` powerpc + i2c/rtc : where is the 11 min update ? Philippe De Muyter
2008-05-21 21:57     ` RTC subsystem and 11 min rtc update Philippe De Muyter
2008-05-21 22:18       ` Maciej W. Rozycki

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.