0001
0002
0003
0004
0005
0006
0007
0008
0009
0010 #ifndef __ASM_MACH_MALTA_MC146818RTC_H
0011 #define __ASM_MACH_MALTA_MC146818RTC_H
0012
0013 #include <asm/io.h>
0014 #include <asm/mips-boards/generic.h>
0015 #include <asm/mips-boards/malta.h>
0016
0017 #define RTC_PORT(x) (0x70 + (x))
0018 #define RTC_IRQ 8
0019
0020 static inline unsigned char CMOS_READ(unsigned long addr)
0021 {
0022 outb(addr, MALTA_RTC_ADR_REG);
0023 return inb(MALTA_RTC_DAT_REG);
0024 }
0025
0026 static inline void CMOS_WRITE(unsigned char data, unsigned long addr)
0027 {
0028 outb(addr, MALTA_RTC_ADR_REG);
0029 outb(data, MALTA_RTC_DAT_REG);
0030 }
0031
0032 #define RTC_ALWAYS_BCD 0
0033
0034 #define mc146818_decode_year(year) ((year) < 70 ? (year) + 2000 : (year) + 1900)
0035
0036 #endif