Hi,

 As I already pointed out, there are a few errors in RTC handling for
Alpha.  Also a few comments are misleading.  The following is an updated
patch that applies to 2.4.0-test8.

  Maciej

-- 
+  Maciej W. Rozycki, Technical University of Gdansk, Poland   +
+--------------------------------------------------------------+
+        e-mail: [EMAIL PROTECTED], PGP key available        +

diff -u --recursive --new-file linux-2.4.0-test8.macro/arch/alpha/kernel/time.c 
linux-2.4.0-test8/arch/alpha/kernel/time.c
--- linux-2.4.0-test8.macro/arch/alpha/kernel/time.c    Tue Aug 29 20:51:31 2000
+++ linux-2.4.0-test8/arch/alpha/kernel/time.c  Thu Sep 21 22:17:22 2000
@@ -36,6 +36,7 @@
 #include <linux/ioport.h>
 #include <linux/irq.h>
 #include <linux/interrupt.h>
+#include <linux/init.h>
 
 #include <asm/uaccess.h>
 #include <asm/io.h>
@@ -200,7 +201,7 @@
        init_rtc_irq();
 }
 
-void
+void __init
 time_init(void)
 {
        unsigned int year, mon, day, hour, min, sec, cc1, cc2, epoch;
@@ -267,17 +268,14 @@
                BCD_TO_BIN(year);
        }
 
-       /* PC-like is standard; used for year <= 20 || year >= 100 */
+       /* PC-like is standard; used for year < 20 || year >= 70 */
        epoch = 1900;
-       if (year > 20 && year < 48)
-               /* ARC console, used on some not so old boards */
+       if (year >= 20 && year < 48)
+               /* NT epoch */
                epoch = 1980;
        else if (year >= 48 && year < 70)
-               /* Digital UNIX, used on older boards (eg. AXPpxi33) */
+               /* Digital UNIX epoch */
                epoch = 1952;
-       else if (year >= 70 && year < 100)
-               /* Digital DECstations, very old... */
-               epoch = 1928;
 
        printk(KERN_INFO "Using epoch = %d\n", epoch);
 
diff -u --recursive --new-file linux-2.4.0-test8.macro/drivers/char/rtc.c 
linux-2.4.0-test8/drivers/char/rtc.c
--- linux-2.4.0-test8.macro/drivers/char/rtc.c  Sun Jul 30 22:09:48 2000
+++ linux-2.4.0-test8/drivers/char/rtc.c        Thu Sep 21 22:06:56 2000
@@ -693,7 +693,7 @@
        if (!(ctrl & RTC_DM_BINARY) || RTC_ALWAYS_BCD)
                BCD_TO_BIN(year);       /* This should never happen... */
        
-       if (year > 20 && year < 48) {
+       if (year >= 20 && year < 48) {
                epoch = 1980;
                guess = "ARC console";
        } else if (year >= 48 && year < 70) {

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to