diff -Nru link/arch/mips/kernel/time.c.orig link/arch/mips/kernel/time.c --- link/arch/mips/kernel/time.c.orig Wed Jul 16 10:52:57 2003 +++ link/arch/mips/kernel/time.c Wed Jul 23 09:52:53 2003 @@ -61,6 +61,7 @@ unsigned long (*rtc_get_time)(void) = null_rtc_get_time; int (*rtc_set_time)(unsigned long) = null_rtc_set_time; +int (*rtc_set_mmss)(unsigned long); /* @@ -370,12 +371,16 @@ xtime.tv_sec > last_rtc_update + 660 && xtime.tv_usec >= 500000 - ((unsigned) tick) / 2 && xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) { - if (rtc_set_time(xtime.tv_sec) == 0) { + int ret; + if (rtc_set_mmss) + ret = rtc_set_mmss(xtime.tv_sec); + else + ret = rtc_set_time(xtime.tv_sec); + if (ret == 0) last_rtc_update = xtime.tv_sec; - } else { - last_rtc_update = xtime.tv_sec - 600; + else /* do it again in 60 s */ - } + last_rtc_update = xtime.tv_sec - 600; } read_unlock (&xtime_lock); diff -Nru link/include/asm-mips/time.h.orig link/include/asm-mips/time.h --- link/include/asm-mips/time.h.orig Wed Jul 16 11:49:53 2003 +++ link/include/asm-mips/time.h Wed Jul 23 09:51:58 2003 @@ -27,9 +27,12 @@ * RTC ops. By default, they point a no-RTC functions. * rtc_get_time - mktime(year, mon, day, hour, min, sec) in seconds. * rtc_set_time - reverse the above translation and set time to RTC. + * rtc_set_mmss - similar to rtc_set_time, but only mim and sec need + * to be set. Used by RTC sync-up. */ extern unsigned long (*rtc_get_time)(void); extern int (*rtc_set_time)(unsigned long); +extern int (*rtc_set_mmss)(unsigned long); /* * to_tm() converts system time back to (year, mon, day, hour, min, sec).