linux-mips
[Top] [All Lists]

Re: IP22 RTC bug on 64bit 2.6 kernels ?

To: debian-mips@lists.debian.org
Subject: Re: IP22 RTC bug on 64bit 2.6 kernels ?
From: Julien BLACHE <jblache@debian.org>
Date: Sun, 09 Jul 2006 00:21:24 +0200
Cc: linux-mips@linux-mips.org
In-reply-to: <87fyhbhi1n.fsf@frigate.technologeek.org> (Julien BLACHE's message of "Sun, 09 Jul 2006 00:02:12 +0200")
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <87fyhbhi1n.fsf@frigate.technologeek.org>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Gnus/5.110006 (No Gnus v0.6) XEmacs/21.4.19 (linux)
Julien BLACHE <jblache@debian.org> wrote:

Hi,

> So, it looks like there is a bug in this area with (at least) 64bit
> 2.6 kernels. Is there any known bug ? Anything I can do to help track
> the problem down ?

Ok, it's brown paper bag time for someone :-)


This patch fixes a typo in arch/mips/sgi-ip22/ip22-time.c, leading to
the incorrect year being set into the RTC chip.

Signed-off-by: Julien BLACHE <jb@jblache.org>

--- arch/mips/sgi-ip22/ip22-time.c.orig 2006-07-08 22:17:02.000000000 +0000
+++ arch/mips/sgi-ip22/ip22-time.c      2006-07-08 22:17:29.000000000 +0000
@@ -76,7 +76,7 @@
        save_control = hpc3c0->rtcregs[RTC_CMD] & 0xff;
        hpc3c0->rtcregs[RTC_CMD] = save_control | RTC_TE;
 
-       hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_sec);
+       hpc3c0->rtcregs[RTC_YEAR] = BIN2BCD(tm.tm_year);
        hpc3c0->rtcregs[RTC_MONTH] = BIN2BCD(tm.tm_mon);
        hpc3c0->rtcregs[RTC_DATE] = BIN2BCD(tm.tm_mday);
        hpc3c0->rtcregs[RTC_HOURS] = BIN2BCD(tm.tm_hour);

Thanks,

JB.

-- 
 Julien BLACHE - Debian & GNU/Linux Developer - <jblache@debian.org> 
 
 Public key available on <http://www.jblache.org> - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 
<Prev in Thread] Current Thread [Next in Thread>