Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/dec Fix error introduced with timecounters - RTC clo...
details: https://anonhg.NetBSD.org/src/rev/c4875c2c941e
branches: trunk
changeset: 754550:c4875c2c941e
user: mhitch <mhitch%NetBSD.org@localhost>
date: Mon May 03 18:04:56 2010 +0000
description:
Fix error introduced with timecounters - RTC clock register only uses
the last 2 digits of the year. Fixes setting the clock and keeps the
DECstation PROM happy and stops it from setting the date to Jan 1, 1972.
diffstat:
sys/dev/dec/mcclock.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 584fb4913899 -r c4875c2c941e sys/dev/dec/mcclock.c
--- a/sys/dev/dec/mcclock.c Mon May 03 17:15:58 2010 +0000
+++ b/sys/dev/dec/mcclock.c Mon May 03 18:04:56 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mcclock.c,v 1.24 2009/12/12 14:44:10 tsutsui Exp $ */
+/* $NetBSD: mcclock.c,v 1.25 2010/05/03 18:04:56 mhitch Exp $ */
/*
* Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.24 2009/12/12 14:44:10 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.25 2010/05/03 18:04:56 mhitch Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -232,7 +232,7 @@
regs[MC_DOW] = dt.dt_wday;
regs[MC_DOM] = dt.dt_day;
regs[MC_MONTH] = dt.dt_mon;
- regs[MC_YEAR] = dt.dt_year;
+ regs[MC_YEAR] = dt.dt_year - 1900; /* rt clock wants 2 digits */
s = splclock();
MC146818_PUTTOD(sc, ®s);
Home |
Main Index |
Thread Index |
Old Index