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