Go to the documentation of this file.
4 #ifndef _ASM_X86_MC146818RTC_H
5 #define _ASM_X86_MC146818RTC_H
8 #include <asm/processor.h>
12 #define RTC_PORT(x) (0x70 + (x))
13 #define RTC_ALWAYS_BCD 1
16 #if defined(CONFIG_X86_32) && defined(__HAVE_ARCH_CMPXCHG)
34 extern volatile unsigned long cmos_lock;
50 if (
__cmpxchg(&cmos_lock, 0,
new,
sizeof(cmos_lock)) == 0)
67 return cmos_lock & 0xff;
70 #define lock_cmos_prefix(reg) \
72 unsigned long cmos_flags; \
73 local_irq_save(cmos_flags); \
76 #define lock_cmos_suffix(reg) \
78 local_irq_restore(cmos_flags); \
81 #define lock_cmos_prefix(reg) do {} while (0)
82 #define lock_cmos_suffix(reg) do {} while (0)
83 #define lock_cmos(reg) do { } while (0)
84 #define unlock_cmos() do { } while (0)
85 #define do_i_have_lock_cmos() 0
86 #define current_lock_cmos_reg() 0
93 #define CMOS_READ(addr) rtc_cmos_read(addr)
94 #define CMOS_WRITE(val, addr) rtc_cmos_write(val, addr)