summaryrefslogtreecommitdiffstats
path: root/arch/arm/kernel/time.c
diff options
context:
space:
mode:
authorKevin Hilman2006-09-22 01:16:30 +0200
committerRussell King2006-09-28 21:59:24 +0200
commit746140c71d537560bbd22c1b148fb21031c30e71 (patch)
treec9753521f7443f946b966d0e8bd19d60c71f99f9 /arch/arm/kernel/time.c
parent[ARM] 3873/1: S3C24XX: Add irq_chip names (diff)
downloadkernel-qcow2-linux-746140c71d537560bbd22c1b148fb21031c30e71.tar.gz
kernel-qcow2-linux-746140c71d537560bbd22c1b148fb21031c30e71.tar.xz
kernel-qcow2-linux-746140c71d537560bbd22c1b148fb21031c30e71.zip
[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.c6
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);
*/
int (*set_rtc)(void);
+#ifndef CONFIG_GENERIC_TIME
static unsigned long dummy_gettimeoffset(void)
{
return 0;
}
+#endif
/*
* Scheduler clock - returns current time in nanosec units.
@@ -230,6 +232,7 @@ static inline void do_leds(void)
#define do_leds()
#endif
+#ifndef CONFIG_GENERIC_TIME
void do_gettimeofday(struct timeval *tv)
{
unsigned long flags;
@@ -291,6 +294,7 @@ int do_settimeofday(struct timespec *tv)
}
EXPORT_SYMBOL(do_settimeofday);
+#endif /* !CONFIG_GENERIC_TIME */
/**
* save_time_delta - Save the offset between system time and RTC time
@@ -500,8 +504,10 @@ device_initcall(timer_init_sysfs);
void __init time_init(void)
{
+#ifndef CONFIG_GENERIC_TIME
if (system_timer->offset == NULL)
system_timer->offset = dummy_gettimeoffset;
+#endif
system_timer->init();
#ifdef CONFIG_NO_IDLE_HZ