xref: /OK3568_Linux_fs/kernel/arch/mips/include/asm/mach-rm/mc146818rtc.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun /*
2*4882a593Smuzhiyun  * This file is subject to the terms and conditions of the GNU General Public
3*4882a593Smuzhiyun  * License.  See the file "COPYING" in the main directory of this archive
4*4882a593Smuzhiyun  * for more details.
5*4882a593Smuzhiyun  *
6*4882a593Smuzhiyun  * Copyright (C) 2004 by Ralf Baechle
7*4882a593Smuzhiyun  *
8*4882a593Smuzhiyun  * RTC routines for PC style attached Dallas chip with ARC epoch.
9*4882a593Smuzhiyun  */
10*4882a593Smuzhiyun #ifndef __ASM_MACH_RM_MC146818RTC_H
11*4882a593Smuzhiyun #define __ASM_MACH_RM_MC146818RTC_H
12*4882a593Smuzhiyun 
13*4882a593Smuzhiyun #ifdef CONFIG_CPU_BIG_ENDIAN
14*4882a593Smuzhiyun #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
15*4882a593Smuzhiyun #else
16*4882a593Smuzhiyun #define mc146818_decode_year(year) ((year) + 1980)
17*4882a593Smuzhiyun #endif
18*4882a593Smuzhiyun 
19*4882a593Smuzhiyun #include <asm/mach-generic/mc146818rtc.h>
20*4882a593Smuzhiyun 
21*4882a593Smuzhiyun #endif /* __ASM_MACH_RM_MC146818RTC_H */
22