summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/sparc64/kernel/time.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c
index cc16fdcf98a..184321b88a6 100644
--- a/arch/sparc64/kernel/time.c
+++ b/arch/sparc64/kernel/time.c
@@ -405,6 +405,11 @@ static unsigned long timer_ticks_per_nsec_quotient __read_mostly;
int update_persistent_clock(struct timespec now)
{
+ struct rtc_device *rtc = rtc_class_open("rtc0");
+
+ if (rtc)
+ return rtc_set_mmss(rtc, now.tv_sec);
+
return set_rtc_mmss(now.tv_sec);
}