diff options
author | Kevin Hilman <khilman@mvista.com> | 2006-09-21 19:16:30 -0400 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-09-28 15:59:24 -0400 |
commit | 746140c71d537560bbd22c1b148fb21031c30e71 (patch) | |
tree | c9753521f7443f946b966d0e8bd19d60c71f99f9 /arch/arm/kernel/time.c | |
parent | 82606c66e943227afcec8a3c7b8428b99a7f88b8 (diff) |
[ARM] 3855/1: Add generic time support
This patch adds Generic time-of-day support for the ARM architecture.
The support is currently added using #ifdef's so that it can support
sub-arches that do not (yet) have a clocksource added. As sub-arches
add clocksource support, they should 'select GENERIC_TIME'
Signed-off-by: Deepak Saxena <dsaxena@mvista.com>
Signed-off-by: Daniel Walker <dwalker@mvista.com>
Signed-off-by: Kevin Hilman <khilman@mvista.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/kernel/time.c')
-rw-r--r-- | arch/arm/kernel/time.c | 6 |
1 files changed, 6 insertions, 0 deletions
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 |