blob: 5a86724223524ca94eb587d7cbf9c85a6bc1a180 [file] [log] [blame]
The Android Open Source Project1dc9e472009-03-03 19:28:35 -08001/****************************************************************************
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