The Android Open Source Project | 1dc9e47 | 2009-03-03 19:28:35 -0800 | [diff] [blame] | 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/io.h> |
| 16 | #include <asm/system.h> |
| 17 | #include <asm/processor.h> |
| 18 | #include <linux/mc146818rtc.h> |
| 19 | |
| 20 | #ifndef RTC_PORT |
| 21 | #define RTC_PORT(x) (0x70 + (x)) |
| 22 | #define RTC_ALWAYS_BCD 1 |
| 23 | #endif |
| 24 | |
| 25 | #ifdef __HAVE_ARCH_CMPXCHG |
| 26 | |
| 27 | #include <linux/smp.h> |
| 28 | |
| 29 | #define lock_cmos_prefix(reg) do { unsigned long cmos_flags; local_irq_save(cmos_flags); lock_cmos(reg) |
| 30 | #define lock_cmos_suffix(reg) unlock_cmos(); local_irq_restore(cmos_flags); } while (0) |
| 31 | #else |
| 32 | #define lock_cmos_prefix(reg) do {} while (0) |
| 33 | #define lock_cmos_suffix(reg) do {} while (0) |
| 34 | #define lock_cmos(reg) |
| 35 | #define unlock_cmos() |
| 36 | #define do_i_have_lock_cmos() 0 |
| 37 | #define current_lock_cmos_reg() 0 |
| 38 | #endif |
| 39 | #define CMOS_READ(addr) rtc_cmos_read(addr) |
| 40 | #define CMOS_WRITE(val, addr) rtc_cmos_write(val, addr) |
| 41 | |
| 42 | #define RTC_IRQ 8 |
| 43 | |
| 44 | #endif |