0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011 #ifndef __ASM_MACH_JAZZ_MC146818RTC_H
0012 #define __ASM_MACH_JAZZ_MC146818RTC_H
0013
0014 #include <linux/delay.h>
0015
0016 #include <asm/io.h>
0017 #include <asm/jazz.h>
0018
0019 #define RTC_PORT(x) (0x70 + (x))
0020 #define RTC_IRQ 8
0021
0022 static inline unsigned char CMOS_READ(unsigned long addr)
0023 {
0024 outb_p(addr, RTC_PORT(0));
0025 return *(volatile char *)JAZZ_RTC_BASE;
0026 }
0027
0028 static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
0029 {
0030 outb_p(addr, RTC_PORT(0));
0031 *(volatile char *)JAZZ_RTC_BASE = data;
0032 }
0033
0034 #define RTC_ALWAYS_BCD 0
0035
0036 #define mc146818_decode_year(year) ((year) + 1980)
0037
0038 #endif