Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=49fa3c0869677facd846adc928c332b4c20cdc25
Commit:     49fa3c0869677facd846adc928c332b4c20cdc25
Parent:     821d313c257b9b04c3c82f0b303ee259c00dc620
Author:     Thomas Bogendoerfer <[EMAIL PROTECTED]>
AuthorDate: Sat Feb 3 14:06:10 2007 +0100
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Sun Mar 4 19:02:31 2007 +0000

    [MIPS] SNI: Fix mc146818_decode_year
    
    Big endian RMs uses a different mc146818_decode_year than little endian RMs
    Correct mc146818_decode_year for years before 2000
    
    Signed-off-by: Thomas Bogendoerfer <[EMAIL PROTECTED]>
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 include/asm-mips/mach-atlas/mc146818rtc.h   |    2 +-
 include/asm-mips/mach-generic/mc146818rtc.h |    2 +-
 include/asm-mips/mach-mips/mc146818rtc.h    |    2 +-
 include/asm-mips/mach-rm/mc146818rtc.h      |   10 +++++++---
 4 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/include/asm-mips/mach-atlas/mc146818rtc.h 
b/include/asm-mips/mach-atlas/mc146818rtc.h
index a73a569..51d337e 100644
--- a/include/asm-mips/mach-atlas/mc146818rtc.h
+++ b/include/asm-mips/mach-atlas/mc146818rtc.h
@@ -55,6 +55,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned 
long addr)
 
 #define RTC_ALWAYS_BCD 0
 
-#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1970)
+#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1900)
 
 #endif /* __ASM_MACH_ATLAS_MC146818RTC_H */
diff --git a/include/asm-mips/mach-generic/mc146818rtc.h 
b/include/asm-mips/mach-generic/mc146818rtc.h
index 90c2e6f..0b9a942 100644
--- a/include/asm-mips/mach-generic/mc146818rtc.h
+++ b/include/asm-mips/mach-generic/mc146818rtc.h
@@ -30,7 +30,7 @@ static inline void CMOS_WRITE(unsigned char data, unsigned 
long addr)
 #define RTC_ALWAYS_BCD 1
 
 #ifndef mc146818_decode_year
-#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1970)
+#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1900)
 #endif
 
 #endif /* __ASM_MACH_GENERIC_MC146818RTC_H */
diff --git a/include/asm-mips/mach-mips/mc146818rtc.h 
b/include/asm-mips/mach-mips/mc146818rtc.h
index 6730ba0..ea612f3 100644
--- a/include/asm-mips/mach-mips/mc146818rtc.h
+++ b/include/asm-mips/mach-mips/mc146818rtc.h
@@ -43,6 +43,6 @@ static inline void CMOS_WRITE(unsigned char data, unsigned 
long addr)
 
 #define RTC_ALWAYS_BCD 0
 
-#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1970)
+#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1900)
 
 #endif /* __ASM_MACH_MALTA_MC146818RTC_H */
diff --git a/include/asm-mips/mach-rm/mc146818rtc.h 
b/include/asm-mips/mach-rm/mc146818rtc.h
index d37ae68..103ae8e 100644
--- a/include/asm-mips/mach-rm/mc146818rtc.h
+++ b/include/asm-mips/mach-rm/mc146818rtc.h
@@ -7,11 +7,15 @@
  *
  * RTC routines for PC style attached Dallas chip with ARC epoch.
  */
-#ifndef __ASM_MACH_RM200_MC146818RTC_H
-#define __ASM_MACH_RM200_MC146818RTC_H
+#ifndef __ASM_MACH_RM_MC146818RTC_H
+#define __ASM_MACH_RM_MC146818RTC_H
 
+#if CONFIG_CPU_BIG_ENDIAN
+#define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 
1900)
+#else
 #define mc146818_decode_year(year) ((year) + 1980)
+#endif
 
 #include_next <mc146818rtc.h>
 
-#endif /* __ASM_MACH_RM200_MC146818RTC_H */
+#endif /* __ASM_MACH_RM_MC146818RTC_H */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to