diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-09-01 08:02:29 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-09-01 08:02:29 +0000 |
commit | 49a3eb2420bbb4815461352ad25d810952f95ccf (patch) | |
tree | 2acfcfef1c3cab819fc6ca2ae28ee8a4f776cbb0 /arch/mips/dec/time.c | |
parent | f33ee78ea30b58cc1afb4785d8b19cbc2f069d78 (diff) |
Fix for broken handling of the year in the RTC by DECstation firmware.
Diffstat (limited to 'arch/mips/dec/time.c')
-rw-r--r-- | arch/mips/dec/time.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/mips/dec/time.c b/arch/mips/dec/time.c index 0f3998557..0ec07b2fd 100644 --- a/arch/mips/dec/time.c +++ b/arch/mips/dec/time.c @@ -527,11 +527,12 @@ void __init time_init(void) BCD_TO_BIN(year); } /* - * The DECstation RTC is used as a TOY (Time Of Year). - * The PROM will reset the year to either '70, '71 or '72. - * This hack will only work until Dec 31 2001. + * The PROM will reset the year to either '72 or '73. + * Therefore we store the real year separately, in one + * of unused BBU RAM locations. */ - year += 1928; + real_year = CMOS_READ(RTC_DEC_YEAR); + year += real_year - 72 + 2000; write_lock_irq(&xtime_lock); xtime.tv_sec = mktime(year, mon, day, hour, min, sec); |