ppc -> powerpc : where is 11 min rtc update gone ?
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
Quoted 5 lines · Philippe De Muyter
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.
Re: powerpc + i2c/rtc : where is the 11 min update ?
CCing lkml
Quoted 5 lines · Paul Mackerras
Quoted 3 lines · Philippe De Muyter
I have a ARCH=powerpc linux-2.6.25-rc6 linux running with an i2c rtc chip, and synchronized to a ntp server.
Quoted 7 lines
Quoted 2 lines
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_UPDATEinkernel/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
RTC subsystem and 11 min rtc update
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
Re: RTC subsystem and 11 min rtc update
Quoted 2 lines · Philippe De Muyter
Should
update_persistent_clocknot 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