Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 /*
0003  * Machine dependent access functions for RTC registers.
0004  */
0005 #ifndef __ASM_SPARC_MC146818RTC_H
0006 #define __ASM_SPARC_MC146818RTC_H
0007 
0008 #include <asm/io.h>
0009 
0010 #ifndef RTC_PORT
0011 #define RTC_PORT(x) (0x70 + (x))
0012 #define RTC_ALWAYS_BCD  1   /* RTC operates in binary mode */
0013 #endif
0014 
0015 /*
0016  * The yet supported machines all access the RTC index register via
0017  * an ISA port access but the way to access the date register differs ...
0018  */
0019 #define CMOS_READ(addr) ({ \
0020 outb_p((addr),RTC_PORT(0)); \
0021 inb_p(RTC_PORT(1)); \
0022 })
0023 #define CMOS_WRITE(val, addr) ({ \
0024 outb_p((addr),RTC_PORT(0)); \
0025 outb_p((val),RTC_PORT(1)); \
0026 })
0027 
0028 #define RTC_IRQ 8
0029 
0030 #endif /* __ASM_SPARC_MC146818RTC_H */