From e7c2a72e2680827d6a733931273a93461c0d8d1b Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Tue, 14 Nov 1995 08:00:00 +0000 Subject: Import of Linux/MIPS 1.3.0 --- include/linux/mc146818rtc.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'include/linux/mc146818rtc.h') diff --git a/include/linux/mc146818rtc.h b/include/linux/mc146818rtc.h index 741aa2dc5..5f22761fd 100644 --- a/include/linux/mc146818rtc.h +++ b/include/linux/mc146818rtc.h @@ -12,13 +12,19 @@ #define _MC146818RTC_H #include +#ifndef RTC_PORT +#define RTC_PORT(x) (0x70 + (x)) +#define RTC_ADDR(x) (0x80 | (x)) +#define RTC_ALWAYS_BCD 1 +#endif + #define CMOS_READ(addr) ({ \ -outb_p(addr|0x80,0x70); \ -inb_p(0x71); \ +outb_p(RTC_ADDR(addr),RTC_PORT(0)); \ +inb_p(RTC_PORT(1)); \ }) #define CMOS_WRITE(val, addr) ({ \ -outb_p(addr|0x80,0x70); \ -outb_p(val,0x71); \ +outb_p(RTC_ADDR(addr),RTC_PORT(0)); \ +outb_p(val,RTC_PORT(1)); \ }) /********************************************************************** -- cgit v1.2.3