diff options
-rw-r--r-- | arch/arm/Kconfig | 4 | ||||
-rw-r--r-- | arch/arm/kernel/time.c | 6 | ||||
-rw-r--r-- | include/asm-arm/mach/time.h | 2 | ||||
-rw-r--r-- | include/asm-arm/timeofday.h | 4 |
4 files changed, 16 insertions, 0 deletions
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 0810d27c039e..314ac6ba0ec4 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig | |||
@@ -17,6 +17,10 @@ config ARM | |||
17 | Europe. There is an ARM Linux project with a web page at | 17 | Europe. There is an ARM Linux project with a web page at |
18 | <http://www.arm.linux.org.uk/>. | 18 | <http://www.arm.linux.org.uk/>. |
19 | 19 | ||
20 | config GENERIC_TIME | ||
21 | bool | ||
22 | default n | ||
23 | |||
20 | config MMU | 24 | config MMU |
21 | bool | 25 | bool |
22 | default y | 26 | default y |
diff --git a/arch/arm/kernel/time.c b/arch/arm/kernel/time.c index 09a67d771857..d4dceb5f06e9 100644 --- a/arch/arm/kernel/time.c +++ b/arch/arm/kernel/time.c | |||
@@ -69,10 +69,12 @@ EXPORT_SYMBOL(profile_pc); | |||
69 | */ | 69 | */ |
70 | int (*set_rtc)(void); | 70 | int (*set_rtc)(void); |
71 | 71 | ||
72 | #ifndef CONFIG_GENERIC_TIME | ||
72 | static unsigned long dummy_gettimeoffset(void) | 73 | static unsigned long dummy_gettimeoffset(void) |
73 | { | 74 | { |
74 | return 0; | 75 | return 0; |
75 | } | 76 | } |
77 | #endif | ||
76 | 78 | ||
77 | /* | 79 | /* |
78 | * Scheduler clock - returns current time in nanosec units. | 80 | * Scheduler clock - returns current time in nanosec units. |
@@ -230,6 +232,7 @@ static inline void do_leds(void) | |||
230 | #define do_leds() | 232 | #define do_leds() |
231 | #endif | 233 | #endif |
232 | 234 | ||
235 | #ifndef CONFIG_GENERIC_TIME | ||
233 | void do_gettimeofday(struct timeval *tv) | 236 | void do_gettimeofday(struct timeval *tv) |
234 | { | 237 | { |
235 | unsigned long flags; | 238 | unsigned long flags; |
@@ -291,6 +294,7 @@ int do_settimeofday(struct timespec *tv) | |||
291 | } | 294 | } |
292 | 295 | ||
293 | EXPORT_SYMBOL(do_settimeofday); | 296 | EXPORT_SYMBOL(do_settimeofday); |
297 | #endif /* !CONFIG_GENERIC_TIME */ | ||
294 | 298 | ||
295 | /** | 299 | /** |
296 | * save_time_delta - Save the offset between system time and RTC time | 300 | * save_time_delta - Save the offset between system time and RTC time |
@@ -500,8 +504,10 @@ device_initcall(timer_init_sysfs); | |||
500 | 504 | ||
501 | void __init time_init(void) | 505 | void __init time_init(void) |
502 | { | 506 | { |
507 | #ifndef CONFIG_GENERIC_TIME | ||
503 | if (system_timer->offset == NULL) | 508 | if (system_timer->offset == NULL) |
504 | system_timer->offset = dummy_gettimeoffset; | 509 | system_timer->offset = dummy_gettimeoffset; |
510 | #endif | ||
505 | system_timer->init(); | 511 | system_timer->init(); |
506 | 512 | ||
507 | #ifdef CONFIG_NO_IDLE_HZ | 513 | #ifdef CONFIG_NO_IDLE_HZ |
diff --git a/include/asm-arm/mach/time.h b/include/asm-arm/mach/time.h index dee0bc336fe8..1eb93f5c0d6c 100644 --- a/include/asm-arm/mach/time.h +++ b/include/asm-arm/mach/time.h | |||
@@ -38,7 +38,9 @@ struct sys_timer { | |||
38 | void (*init)(void); | 38 | void (*init)(void); |
39 | void (*suspend)(void); | 39 | void (*suspend)(void); |
40 | void (*resume)(void); | 40 | void (*resume)(void); |
41 | #ifndef CONFIG_GENERIC_TIME | ||
41 | unsigned long (*offset)(void); | 42 | unsigned long (*offset)(void); |
43 | #endif | ||
42 | 44 | ||
43 | #ifdef CONFIG_NO_IDLE_HZ | 45 | #ifdef CONFIG_NO_IDLE_HZ |
44 | struct dyn_tick_timer *dyn_tick; | 46 | struct dyn_tick_timer *dyn_tick; |
diff --git a/include/asm-arm/timeofday.h b/include/asm-arm/timeofday.h new file mode 100644 index 000000000000..27254bd5b94f --- /dev/null +++ b/include/asm-arm/timeofday.h | |||
@@ -0,0 +1,4 @@ | |||
1 | #ifndef _ASM_ARM_TIMEOFDAY_H | ||
2 | #define _ASM_ARM_TIMEOFDAY_H | ||
3 | #include <asm-generic/timeofday.h> | ||
4 | #endif | ||