mc146818rtc.h 598 B

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