File Index
Files and directories
Sign in
FILE

mc146818rtc.h

File preview with syntax highlighting.

linux-6.19.14/arch/m68k/include/asm/mc146818rtc.h C
 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) ({ \
18atari_outb_p((addr), ATARI_RTC_PORT(0)); \
19atari_inb_p(ATARI_RTC_PORT(1)); \
20})
21#define CMOS_WRITE(val, addr) ({ \
22atari_outb_p((addr), ATARI_RTC_PORT(0)); \
23atari_outb_p((val), ATARI_RTC_PORT(1)); \
24})
25#endif /* CONFIG_ATARI */
26
27#endif /* _ASM_MC146818RTC_H */
~/ Read-only file preview.