summaryrefslogtreecommitdiffstats
path: root/sys/kern/subr_rtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/kern/subr_rtc.c')
-rw-r--r--sys/kern/subr_rtc.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/sys/kern/subr_rtc.c b/sys/kern/subr_rtc.c
index 120ad5f..ed2befc 100644
--- a/sys/kern/subr_rtc.c
+++ b/sys/kern/subr_rtc.c
@@ -1,12 +1,17 @@
/*-
* Copyright (c) 1988 University of Utah.
* Copyright (c) 1982, 1990, 1993
- * The Regents of the University of California. All rights reserved.
+ * The Regents of the University of California.
+ * Copyright (c) 2011 The FreeBSD Foundation
+ * All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* the Systems Programming Group of the University of Utah Computer
* Science Department.
*
+ * Portions of this software were developed by Julien Ridoux at the University
+ * of Melbourne under sponsorship from the FreeBSD Foundation.
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -50,12 +55,17 @@
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
+#include "opt_ffclock.h"
+
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/bus.h>
#include <sys/clock.h>
#include <sys/sysctl.h>
+#ifdef FFCLOCK
+#include <sys/timeffc.h>
+#endif
#include <sys/timetc.h>
#include "clock_if.h"
@@ -133,6 +143,9 @@ inittodr(time_t base)
ts.tv_sec += utc_offset();
timespecadd(&ts, &clock_adj);
tc_setclock(&ts);
+#ifdef FFCLOCK
+ ffclock_reset_clock(&ts);
+#endif
return;
wrong_time:
OpenPOWER on IntegriCloud