mc146818rtc.h 559 B

123456789101112131415161718192021222324252627
  1. /*
  2. * Machine dependent access functions for RTC registers.
  3. */
  4. #ifndef _ASM_MC146818RTC_H
  5. #define _ASM_MC146818RTC_H
  6. #ifdef CONFIG_ATARI
  7. /* RTC in Atari machines */
  8. #include <asm/atarihw.h>
  9. #define ATARI_RTC_PORT(x) (TT_RTC_BAS + 2*(x))
  10. #define RTC_ALWAYS_BCD 0
  11. #define CMOS_READ(addr) ({ \
  12. atari_outb_p((addr), ATARI_RTC_PORT(0)); \
  13. atari_inb_p(ATARI_RTC_PORT(1)); \
  14. })
  15. #define CMOS_WRITE(val, addr) ({ \
  16. atari_outb_p((addr), ATARI_RTC_PORT(0)); \
  17. atari_outb_p((val), ATARI_RTC_PORT(1)); \
  18. })
  19. #endif /* CONFIG_ATARI */
  20. #endif /* _ASM_MC146818RTC_H */