0001
0002
0003
0004
0005 #ifndef _ASM_MC146818RTC_H
0006 #define _ASM_MC146818RTC_H
0007
0008 #include <linux/io.h>
0009 #include <linux/kernel.h>
0010
0011 #define RTC_IRQ BUILD_BUG_ON(1)
0012
0013 #ifndef RTC_PORT
0014 #define RTC_PORT(x) (0x70 + (x))
0015 #define RTC_ALWAYS_BCD 1
0016 #endif
0017
0018
0019
0020
0021
0022 #define CMOS_READ(addr) ({ \
0023 outb_p((addr),RTC_PORT(0)); \
0024 inb_p(RTC_PORT(1)); \
0025 })
0026 #define CMOS_WRITE(val, addr) ({ \
0027 outb_p((addr),RTC_PORT(0)); \
0028 outb_p((val),RTC_PORT(1)); \
0029 })
0030
0031 #endif