2 * This file is subject to the terms and conditions of the GNU General Public
3 * License. See the file "COPYING" in the main directory of this archive
6 * mc146818rtc.h - register definitions for the Real-Time-Clock / CMOS RAM
7 * Copyright Torsten Duwe <duwe@informatik.uni-erlangen.de> 1993
8 * derived from Data Sheet, Copyright Motorola 1984 (!).
9 * It was written to be part of the Linux operating system.
11 * Copyright (C) 1998, 1999 Ralf Baechle
16 #include <asm/mc146818rtc.h>
18 /**********************************************************************
20 **********************************************************************/
21 #define RTC_HUNDREDTH_SECOND 0
24 #define RTC_MINUTES_ALARM 3
26 #define RTC_HOURS_ALARM 5
28 #define RTC_DAY_ALARM 7
37 /* RTC_*_alarm is always true if 2 MSBs are set */
38 # define RTC_ALARM_DONT_CARE 0xC0
42 * Bits in the month register
48 * Bits in the Command register
54 #define RTC_PU_LVL 0x10
55 #define RTC_IBH_LO 0x20
60 * Conversion between binary and BCD.
63 #define BCD_TO_BIN(val) ((val)=((val)&15) + ((val)>>4)*10)
67 #define BIN_TO_BCD(val) ((val)=(((val)/10)<<4) + (val)%10)
70 #endif /* _ASM_DS1286_h */