x86: i8259A: remove redundant irq_descinitialization
[wrt350n-kernel.git] / include / asm-x86 / time.h
blob68779b048a3edba6f3371bb459735d8a170aec9f
1 #ifndef _ASMX86_TIME_H
2 #define _ASMX86_TIME_H
4 extern void (*late_time_init)(void);
5 extern void hpet_time_init(void);
7 #include <asm/mc146818rtc.h>
8 #ifdef CONFIG_X86_32
9 #include <linux/efi.h>
11 static inline unsigned long native_get_wallclock(void)
13 unsigned long retval;
15 if (efi_enabled)
16 retval = efi_get_time();
17 else
18 retval = mach_get_cmos_time();
20 return retval;
23 static inline int native_set_wallclock(unsigned long nowtime)
25 int retval;
27 if (efi_enabled)
28 retval = efi_set_rtc_mmss(nowtime);
29 else
30 retval = mach_set_rtc_mmss(nowtime);
32 return retval;
35 #else
36 extern void native_time_init_hook(void);
38 static inline unsigned long native_get_wallclock(void)
40 return mach_get_cmos_time();
43 static inline int native_set_wallclock(unsigned long nowtime)
45 return mach_set_rtc_mmss(nowtime);
48 #endif
50 #ifdef CONFIG_PARAVIRT
51 #include <asm/paravirt.h>
52 #else /* !CONFIG_PARAVIRT */
54 #define get_wallclock() native_get_wallclock()
55 #define set_wallclock(x) native_set_wallclock(x)
56 #define choose_time_init() hpet_time_init
58 #endif /* CONFIG_PARAVIRT */
60 #endif