49fa3c0869
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>
21 lines
607 B
C
21 lines
607 B
C
/*
|
|
* This file is subject to the terms and conditions of the GNU General Public
|
|
* License. See the file "COPYING" in the main directory of this archive
|
|
* for more details.
|
|
*
|
|
* Copyright (C) 2004 by Ralf Baechle
|
|
*
|
|
* RTC routines for PC style attached Dallas chip with ARC epoch.
|
|
*/
|
|
#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_RM_MC146818RTC_H */
|