OSDN Git Service

Check in released NDK version r4.
[android-x86/prebuilt.git] / ndk / android-ndk-r4 / linux / platforms / android-3 / arch-arm / usr / include / asm / mc146818rtc.h
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