diff options
author | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2007-02-03 08:06:10 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2007-03-04 14:02:31 -0500 |
commit | 49fa3c0869677facd846adc928c332b4c20cdc25 (patch) | |
tree | 079bfcde64b0b1c1cb03853f93cb4242be76c0e2 /include/asm-mips/mach-rm/mc146818rtc.h | |
parent | 821d313c257b9b04c3c82f0b303ee259c00dc620 (diff) |
[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 <tsbogend@alpha.franken.de>
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/asm-mips/mach-rm/mc146818rtc.h')
-rw-r--r-- | include/asm-mips/mach-rm/mc146818rtc.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/include/asm-mips/mach-rm/mc146818rtc.h b/include/asm-mips/mach-rm/mc146818rtc.h index d37ae68dc6a3..103ae8ef590a 100644 --- a/include/asm-mips/mach-rm/mc146818rtc.h +++ b/include/asm-mips/mach-rm/mc146818rtc.h | |||
@@ -7,11 +7,15 @@ | |||
7 | * | 7 | * |
8 | * RTC routines for PC style attached Dallas chip with ARC epoch. | 8 | * RTC routines for PC style attached Dallas chip with ARC epoch. |
9 | */ | 9 | */ |
10 | #ifndef __ASM_MACH_RM200_MC146818RTC_H | 10 | #ifndef __ASM_MACH_RM_MC146818RTC_H |
11 | #define __ASM_MACH_RM200_MC146818RTC_H | 11 | #define __ASM_MACH_RM_MC146818RTC_H |
12 | 12 | ||
13 | #if CONFIG_CPU_BIG_ENDIAN | ||
14 | #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900) | ||
15 | #else | ||
13 | #define mc146818_decode_year(year) ((year) + 1980) | 16 | #define mc146818_decode_year(year) ((year) + 1980) |
17 | #endif | ||
14 | 18 | ||
15 | #include_next <mc146818rtc.h> | 19 | #include_next <mc146818rtc.h> |
16 | 20 | ||
17 | #endif /* __ASM_MACH_RM200_MC146818RTC_H */ | 21 | #endif /* __ASM_MACH_RM_MC146818RTC_H */ |