Re: IP22 RTC bug on 64bit 2.6 kernels ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Julien BLACHE <jblache@xxxxxxxxxx> 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@xxxxxxxxxxx>

--- 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@xxxxxxxxxx> 
 
 Public key available on <http://www.jblache.org> - KeyID: F5D6 5169 
 GPG Fingerprint : 935A 79F1 C8B3 3521 FD62 7CC7 CD61 4FD7 F5D6 5169 

[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux