mc146818rtc.h revision 4b29af0a1b8b25b43e4c0cb9bf066c52f3add9bd
1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ****************************************************************************
11 ****************************************************************************/
12#ifndef _ASM_MC146818RTC_H
13#define _ASM_MC146818RTC_H
14
15#include <asm/arch/irqs.h>
16#include <asm/io.h>
17
18#ifndef RTC_PORT
19#define RTC_PORT(x) (0x70 + (x))
20#define RTC_ALWAYS_BCD 1
21#endif
22
23#define CMOS_READ(addr) ({  outb_p((addr),RTC_PORT(0));  inb_p(RTC_PORT(1));  })
24#define CMOS_WRITE(val, addr) ({  outb_p((addr),RTC_PORT(0));  outb_p((val),RTC_PORT(1));  })
25
26#endif
27