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 8 9 #ifdef CONFIG_ATARI 10 /* RTC in Atari machines */ 11 12 #include <asm/atarihw.h> 13 14 #define ATARI_RTC_PORT(x) (TT_RTC_BAS + 2*(x)) 15 #define RTC_ALWAYS_BCD 0 16 17 #define CMOS_READ(addr) ({ \ 18 atari_outb_p((addr), ATARI_RTC_PORT(0)); \ 19 atari_inb_p(ATARI_RTC_PORT(1)); \ 20 }) 21 #define CMOS_WRITE(val, addr) ({ \ 22 atari_outb_p((addr), ATARI_RTC_PORT(0)); \ 23 atari_outb_p((val), ATARI_RTC_PORT(1)); \ 24 }) 25 #endif /* CONFIG_ATARI */ 26 27 #endif /* _ASM_MC146818RTC_H */ 28