Path: blob/master/arch/m32r/include/asm/mc146818rtc.h
10818 views
/*1* Machine dependent access functions for RTC registers.2*/3#ifndef _ASM_MC146818RTC_H4#define _ASM_MC146818RTC_H56#include <asm/io.h>78#ifndef RTC_PORT9#define RTC_PORT(x) ((x))10#define RTC_ALWAYS_BCD 1 /* RTC operates in binary mode */11#endif1213/*14* The yet supported machines all access the RTC index register via15* an ISA port access but the way to access the date register differs ...16*/17#define CMOS_READ(addr) ({ \18outb_p((addr),RTC_PORT(0)); \19inb_p(RTC_PORT(1)); \20})21#define CMOS_WRITE(val, addr) ({ \22outb_p((addr),RTC_PORT(0)); \23outb_p((val),RTC_PORT(1)); \24})2526#define RTC_IRQ 82728#endif /* _ASM_MC146818RTC_H */293031