mc146818rtc.h 501 B

12345678910111213141516171819202122232425
  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 RTC_PORT(x) (TT_RTC_BAS + 2*(x))
  10. #define CMOS_READ(addr) ({ \
  11. atari_outb_p((addr),RTC_PORT(0)); \
  12. atari_inb_p(RTC_PORT(1)); \
  13. })
  14. #define CMOS_WRITE(val, addr) ({ \
  15. atari_outb_p((addr),RTC_PORT(0)); \
  16. atari_outb_p((val),RTC_PORT(1)); \
  17. })
  18. #endif /* CONFIG_ATARI */
  19. #endif /* _ASM_MC146818RTC_H */