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