make oldconfig will rebuild these...
[linux-2.4.21-pre4.git] / include / asm-mips64 / mc146818rtc.h
1 /*
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
4  * for more details.
5  *
6  * Machine dependent access functions for RTC registers.
7  *
8  * Copyright (C) 1996, 1997, 1998 Ralf Baechle
9  */
10 #ifndef _ASM_MC146818RTC_H
11 #define _ASM_MC146818RTC_H
12
13 #include <asm/io.h>
14
15
16 /*
17  * This structure defines how to access various features of
18  * different machine types and how to access them.
19  */
20 struct rtc_ops {
21         /* How to access the RTC register in a DS1287.  */
22         unsigned char (*rtc_read_data)(unsigned long addr);
23         void (*rtc_write_data)(unsigned char data, unsigned long addr);
24         int (*rtc_bcd_mode)(void);
25 };
26
27 extern struct rtc_ops *rtc_ops;
28
29 /*
30  * The yet supported machines all access the RTC index register via
31  * an ISA port access but the way to access the date register differs ...
32  */
33 #define CMOS_READ(addr) ({ \
34 rtc_ops->rtc_read_data(addr); \
35 })
36 #define CMOS_WRITE(val, addr) ({ \
37 rtc_ops->rtc_write_data(val, addr); \
38 })
39 #define RTC_ALWAYS_BCD \
40 rtc_ops->rtc_bcd_mode()
41
42
43 #define RTC_PORT(x)     (0x70 + (x))
44 #define RTC_IRQ         8
45
46 #endif /* _ASM_MC146818RTC_H */